mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Observe attribute exclusion when joining from sql queries
This commit is contained in:
+9
-4
@@ -279,14 +279,19 @@ void append_tile(std::string message, int z, unsigned x, unsigned y, std::map<st
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (f < joined.size()) {
|
if (f < joined.size()) {
|
||||||
|
if (joined[f].size() > 0) {
|
||||||
|
matched = true;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto const &kv : joined[f]) {
|
for (auto const &kv : joined[f]) {
|
||||||
if (kv.first == attribute_for_id) {
|
if (kv.first == attribute_for_id) {
|
||||||
outfeature.has_id = true;
|
outfeature.has_id = true;
|
||||||
outfeature.id = mvt_value_to_long_long(kv.second);
|
outfeature.id = mvt_value_to_long_long(kv.second);
|
||||||
} else if (kv.second.type != mvt_null) {
|
} else if (include.count(kv.first) || (!exclude_all && exclude.count(kv.first) == 0 && exclude_attributes.count(kv.first) == 0)) {
|
||||||
attributes.insert(std::pair<std::string, std::pair<mvt_value, serial_val>>(kv.first, std::pair<mvt_value, serial_val>(kv.second, mvt_value_to_serial_val(kv.second))));
|
if (kv.second.type != mvt_null) {
|
||||||
key_order.push_back(kv.first);
|
attributes.insert(std::pair<std::string, std::pair<mvt_value, serial_val>>(kv.first, std::pair<mvt_value, serial_val>(kv.second, mvt_value_to_serial_val(kv.second))));
|
||||||
matched = true;
|
key_order.push_back(kv.first);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user