Add a new option to set an initial value for an attribute in each feature (#115)

* Starting on --set-attributes

* Add a JSON form to accumulate-attribute

* Fix formatting

* Set attributes, JSON form

* Also handle setting attributes to unquoted values

* Factoring out character-mangling in the names of tests

* Rename tests for new quoting convention

* Test for JSON form of attribute setting

* Test for JSON form of attribute accumulation

* Forgot to increment the version
This commit is contained in:
Erica Fischer
2023-07-14 10:47:55 -07:00
committed by GitHub
parent 48e769c94c
commit 1c3bd5352c
28 changed files with 1145 additions and 66 deletions
+3
View File
@@ -5,8 +5,10 @@
#include <atomic>
#include <string>
#include <vector>
#include <map>
#include "json_logger.hpp"
#include "serial.hpp"
struct index {
long long start = 0;
@@ -58,6 +60,7 @@ extern std::string attribute_for_id;
extern int tiny_polygon_size;
extern size_t limit_tile_feature_count;
extern size_t limit_tile_feature_count_at_maxzoom;
extern std::map<std::string, serial_val> set_attributes;
struct order_field {
std::string name;