mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
Reduce tippecanoe memory usage (#5)
* Change JSON objects to a union type to use less memory * Stop storing the string representation of JSON numbers * Restore the ability to create features with large integer attributes * Make sure large-integer feature IDs still behave as before * Add missing #include * Don't preallocate as much space for arrays and objects * Treat inability to check free disk space as a warning, not an error * Update changelog and version
This commit is contained in:
+3
-3
@@ -72,7 +72,7 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
int i;
|
||||
int is_geometry = 0;
|
||||
for (i = 0; i < GEOM_TYPES; i++) {
|
||||
if (strcmp(type->string, geometry_names[i]) == 0) {
|
||||
if (strcmp(type->value.string.string, geometry_names[i]) == 0) {
|
||||
is_geometry = 1;
|
||||
break;
|
||||
}
|
||||
@@ -124,8 +124,8 @@ void parse_json(json_feature_action *jfa, json_pull *jp) {
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(type->string, "Feature") != 0) {
|
||||
if (strcmp(type->string, "FeatureCollection") == 0) {
|
||||
if (strcmp(type->value.string.string, "Feature") != 0) {
|
||||
if (strcmp(type->value.string.string, "FeatureCollection") == 0) {
|
||||
jfa->check_crs(j);
|
||||
json_free(j);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user