mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Allow --set-attribute to override existing attribute values (#123)
* Allow --set-attribute to override existing attribute values * Bump version number
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
# 2.28.1
|
||||
|
||||
* Allow --set-attribute to override an existing attribute value
|
||||
|
||||
# 2.28.0
|
||||
|
||||
* Add --preserve-point-density-threshold option to reduce blank areas of the map at low zooms
|
||||
|
||||
+13
-2
@@ -630,8 +630,19 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
|
||||
}
|
||||
|
||||
for (auto &kv : set_attributes) {
|
||||
sf.full_keys.push_back(kv.first);
|
||||
sf.full_values.push_back(kv.second);
|
||||
bool found = false;
|
||||
for (size_t i = 0; i < sf.full_keys.size(); i++) {
|
||||
if (sf.full_keys[i] == kv.first) {
|
||||
sf.full_values[i] = kv.second;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
sf.full_keys.push_back(kv.first);
|
||||
sf.full_values.push_back(kv.second);
|
||||
}
|
||||
}
|
||||
|
||||
for (ssize_t i = (ssize_t) sf.full_keys.size() - 1; i >= 0; i--) {
|
||||
|
||||
+6315
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
||||
#ifndef VERSION_HPP
|
||||
#define VERSION_HPP
|
||||
|
||||
#define VERSION "v2.28.0"
|
||||
#define VERSION "v2.28.1"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user