mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Move attribute type coercion out of parsing and into serialization
This commit is contained in:
+2
-4
@@ -257,8 +257,7 @@ std::vector<mvt_layer> parse_layers(int fd, int z, unsigned x, unsigned y, std::
|
||||
int tp = -1;
|
||||
std::string s;
|
||||
|
||||
std::map<std::string, int> nullmap;
|
||||
stringify_value(properties->values[i], tp, s, "Filter output", jp->line, j, "", &nullmap);
|
||||
stringify_value(properties->values[i], tp, s, "Filter output", jp->line, j, "");
|
||||
if (tp >= 0) {
|
||||
mvt_value v = stringified_to_mvt_value(tp, s.c_str());
|
||||
l->second.tag(feature, std::string(properties->keys[i]->string), v);
|
||||
@@ -487,8 +486,7 @@ serial_feature parse_feature(json_pull *jp, int z, unsigned x, unsigned y, std::
|
||||
serial_val v;
|
||||
v.type = -1;
|
||||
|
||||
std::map<std::string, int> nullmap;
|
||||
stringify_value(properties->values[i], v.type, v.s, "Filter output", jp->line, j, "", &nullmap);
|
||||
stringify_value(properties->values[i], v.type, v.s, "Filter output", jp->line, j, "");
|
||||
|
||||
if (v.type >= 0) {
|
||||
sf.full_keys.push_back(std::string(properties->keys[i]->string));
|
||||
|
||||
Reference in New Issue
Block a user