mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Be more systematic about nulls and undefined attribute values
It is an error to write a null attribute to a tile, but null attributes found within existing tiles will be decoded into JSON as null.
This commit is contained in:
@@ -337,6 +337,12 @@ void layer_to_geojson(mvt_layer const &layer, unsigned z, unsigned x, unsigned y
|
||||
} else if (val.type == mvt_bool) {
|
||||
state.json_write_string(key);
|
||||
state.json_write_bool(val.numeric_value.bool_value);
|
||||
} else if (val.type == mvt_null) {
|
||||
state.json_write_string(key);
|
||||
state.json_write_null();
|
||||
} else {
|
||||
fprintf(stderr, "Internal error: property with unknown type\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user