Compare commits

..
Author SHA1 Message Date
Ryan Clark a888304b19 Don't truncate multi-byte characters in json output (#428)
don't truncate multi-byte characters in json output
2026-11-16 16:54:24 -07:00
13 changed files with 31 additions and 150 deletions
-14
View File
@@ -1,17 +1,3 @@
# 2.82.1
* Fix `--use-attribute-for-id` rejecting an attribute value of 0 as a
"too-large" feature ID. The check that an ID round-trips through `strtoull`
stripped all leading zeroes, turning "0" into an empty string, so the
feature was left with no ID and kept the attribute instead. (#421)
* Fix `--use-attribute-for-id` turning a negative attribute value into a huge
feature ID (-1 became 18446744073709551615). Negative values now warn and
stay attributes, as negative top-level IDs already did. (#421)
* Fix `--use-attribute-for-id` rejecting 18446744073709551615, the largest
feature ID that can be represented, as "too-large". (#421)
* Fix `--use-attribute-for-id` with `-aI` warning that an empty string was a
"too-large" feature ID; it is now reported as not a number. (#421)
# 2.82.0
* Fix corruption of a JSON array when a non-final element was removed from it.
+2 -1
View File
@@ -12,6 +12,7 @@
#include <errno.h>
#include "geojson-loop.hpp"
#include "jsonpull/jsonpull.h"
#include "text.hpp"
// XXX duplicated
#define GEOM_TYPES 6
@@ -29,7 +30,7 @@ static void json_context(json_object *j) {
std::string s = json_stringify(j);
if (s.size() >= 500) {
s.resize(497);
s = truncate_string(s, 497);
s.append("...");
}
+1 -1
View File
@@ -46,7 +46,7 @@ void json_context(json_object *j) {
std::string s = json_stringify(j);
if (s.size() >= 500) {
s.resize(497);
s = truncate_string(s, 497);
s.append("...");
}
+6 -22
View File
@@ -1,7 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <string>
#include <vector>
@@ -380,11 +379,10 @@ static long long scale_geometry(struct serialization_state *sst, long long *bbox
}
static std::string strip_zeroes(std::string s) {
// Doesn't do anything special with '-' followed by leading zeros,
// since the caller has already rejected negative IDs.
//
// Keeps the final digit, so that an ID of 0 compares equal to "0".
while (s.size() > 1 && s[0] == '0') {
// Doesn't do anything special with '-' followed by leading zeros
// since integer IDs must be positive
while (s.size() > 0 && s[0] == '0') {
s.erase(s.begin());
}
@@ -813,30 +811,16 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
}
if (*sf.full_keys[i] == attribute_for_id) {
std::string const &id_string = sf.full_values[i].s;
bool negative = id_string.size() > 0 && id_string[0] == '-';
// strtoull() would accept an empty string, skip leading whitespace or a '+',
// and wrap a negative number around to a huge positive one, so require that
// the value start with a digit (or a '-', to give a better warning below).
if ((sf.full_values[i].type != mvt_double && !additional[A_CONVERT_NUMERIC_IDS]) ||
(!negative && (id_string.size() == 0 || !isdigit((unsigned char) id_string[0])))) {
if (sf.full_values[i].type != mvt_double && !additional[A_CONVERT_NUMERIC_IDS]) {
static bool warned = false;
if (!warned) {
fprintf(stderr, "Warning: Attribute \"%s\"=\"%s\" as feature ID is not a number\n", sf.full_keys[i]->c_str(), sf.full_values[i].s.c_str());
warned = true;
}
} else if (negative) {
static bool warned_neg = false;
if (!warned_neg) {
fprintf(stderr, "Warning: Can't represent negative feature ID %s\n", id_string.c_str());
warned_neg = true;
}
} else {
char *err;
unsigned long long id_value = strtoull(id_string.c_str(), &err, 10);
long long id_value = strtoull(sf.full_values[i].s.c_str(), &err, 10);
if (err != NULL && *err != '\0') {
static bool warned_frac = false;
-6
View File
@@ -10,9 +10,3 @@
{ "type": "Feature", "id": 1234, "properties": { "yes": "no", "special": 98237489273489274389728497289472839478297489274892734892, "something": false }, "geometry": { "type": "Point", "coordinates": [ 10, 1 ] } }
{ "type": "Feature", "properties": { "yes": "no", "special": 27, "something": false }, "geometry": { "type": "Point", "coordinates": [ 11, 1 ] } }
{ "type": "Feature", "properties": { "yes": "no", "special": "01005", "something": false }, "geometry": { "type": "Point", "coordinates": [ 12, 1 ] } }
{ "type": "Feature", "properties": { "yes": "no", "special": 0, "something": false }, "geometry": { "type": "Point", "coordinates": [ 13, 1 ] } }
{ "type": "Feature", "properties": { "yes": "no", "special": "0", "something": false }, "geometry": { "type": "Point", "coordinates": [ 14, 1 ] } }
{ "type": "Feature", "properties": { "yes": "no", "special": -1, "something": false }, "geometry": { "type": "Point", "coordinates": [ 15, 1 ] } }
{ "type": "Feature", "properties": { "yes": "no", "special": "-1", "something": false }, "geometry": { "type": "Point", "coordinates": [ 16, 1 ] } }
{ "type": "Feature", "properties": { "yes": "no", "special": "", "something": false }, "geometry": { "type": "Point", "coordinates": [ 17, 1 ] } }
{ "type": "Feature", "properties": { "yes": "no", "special": 18446744073709551615, "something": false }, "geometry": { "type": "Point", "coordinates": [ 18, 1 ] } }
+3 -15
View File
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,12.000000,1.000000",
"bounds": "1.000000,1.000000,12.000000,1.000000",
"center": "1.000000,1.000000,0",
"description": "tests/stringid/out/-z0.json.check.mbtiles",
"format": "pbf",
"generator_options": "./tippecanoe -q -a@ -f -o tests/stringid/out/-z0.json.check.mbtiles -z0 tests/stringid/in.json",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"special\":\"Mixed\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":11,\"type\":\"mixed\",\"values\":[\"\",\"-1\",-1,\"0\",0,\"01005\",18446744073709551615,\"27\",27,27.5,9.823748927348929e+55],\"min\":-1,\"max\":9.823748927348929e+55},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"special\":\"Mixed\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":12,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":5,\"type\":\"mixed\",\"values\":[\"01005\",\"27\",27,27.5,9.823748927348929e+55],\"min\":27,\"max\":9.823748927348929e+55},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0.json.check.mbtiles",
@@ -37,18 +37,6 @@
{ "type": "Feature", "properties": { "yes": "no", "special": 27, "something": false }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "01005", "something": false }, "geometry": { "type": "Point", "coordinates": [ 12.041016, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": 0, "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.007812, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "0", "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.974609, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": -1, "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.029297, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "-1", "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.996094, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "", "something": false }, "geometry": { "type": "Point", "coordinates": [ 16.962891, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": 18446744073709551615, "something": false }, "geometry": { "type": "Point", "coordinates": [ 18.017578, 0.966751 ] } }
] }
] }
] }
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,12.000000,1.000000",
"bounds": "1.000000,1.000000,12.000000,1.000000",
"center": "1.000000,1.000000,0",
"description": "tests/stringid/out/-z0_--use-attribute-for-id_special.json.check.mbtiles",
"format": "pbf",
"generator_options": "./tippecanoe -q -a@ -f -o tests/stringid/out/-z0_--use-attribute-for-id_special.json.check.mbtiles -z0 --use-attribute-for-id special tests/stringid/in.json",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"special\":\"Mixed\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":8,\"type\":\"mixed\",\"values\":[\"\",\"-1\",-1,\"0\",\"01005\",\"27\",27.5,9.823748927348929e+55],\"min\":-1,\"max\":9.823748927348929e+55},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"special\":\"Mixed\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":12,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":4,\"type\":\"mixed\",\"values\":[\"01005\",\"27\",27.5,9.823748927348929e+55],\"min\":27.5,\"max\":9.823748927348929e+55},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_--use-attribute-for-id_special.json.check.mbtiles",
@@ -37,18 +37,6 @@
{ "type": "Feature", "id": 27, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "01005", "something": false }, "geometry": { "type": "Point", "coordinates": [ 12.041016, 0.966751 ] } }
,
{ "type": "Feature", "id": 0, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.007812, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "0", "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.974609, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": -1, "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.029297, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "-1", "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.996094, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "", "something": false }, "geometry": { "type": "Point", "coordinates": [ 16.962891, 0.966751 ] } }
,
{ "type": "Feature", "id": 18446744073709551615, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 18.017578, 0.966751 ] } }
] }
] }
] }
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,12.000000,1.000000",
"bounds": "1.000000,1.000000,12.000000,1.000000",
"center": "1.000000,1.000000,0",
"description": "tests/stringid/out/-z0_--use-attribute-for-id_special_-X.json.check.mbtiles",
"format": "pbf",
"generator_options": "./tippecanoe -q -a@ -f -o tests/stringid/out/-z0_--use-attribute-for-id_special_-X.json.check.mbtiles -z0 --use-attribute-for-id special -X tests/stringid/in.json",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":12,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_--use-attribute-for-id_special_-X.json.check.mbtiles",
@@ -37,18 +37,6 @@
{ "type": "Feature", "id": 27, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 12.041016, 0.966751 ] } }
,
{ "type": "Feature", "id": 0, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 13.007812, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 13.974609, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 15.029297, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 15.996094, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 16.962891, 0.966751 ] } }
,
{ "type": "Feature", "id": 18446744073709551615, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 18.017578, 0.966751 ] } }
] }
] }
] }
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,12.000000,1.000000",
"bounds": "1.000000,1.000000,12.000000,1.000000",
"center": "1.000000,1.000000,0",
"description": "tests/stringid/out/-z0_--use-attribute-for-id_special_-xspecial.json.check.mbtiles",
"format": "pbf",
"generator_options": "./tippecanoe -q -a@ -f -o tests/stringid/out/-z0_--use-attribute-for-id_special_-xspecial.json.check.mbtiles -z0 --use-attribute-for-id special -xspecial tests/stringid/in.json",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":2,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":12,\"geometry\":\"Point\",\"attributeCount\":2,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_--use-attribute-for-id_special_-xspecial.json.check.mbtiles",
@@ -37,18 +37,6 @@
{ "type": "Feature", "id": 27, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 12.041016, 0.966751 ] } }
,
{ "type": "Feature", "id": 0, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.007812, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.974609, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.029297, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.996094, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 16.962891, 0.966751 ] } }
,
{ "type": "Feature", "id": 18446744073709551615, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 18.017578, 0.966751 ] } }
] }
] }
] }
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,12.000000,1.000000",
"bounds": "1.000000,1.000000,12.000000,1.000000",
"center": "1.000000,1.000000,0",
"description": "tests/stringid/out/-z0_--use-attribute-for-id_special_-yother.json.check.mbtiles",
"format": "pbf",
"generator_options": "./tippecanoe -q -a@ -f -o tests/stringid/out/-z0_--use-attribute-for-id_special_-yother.json.check.mbtiles -z0 --use-attribute-for-id special -yother tests/stringid/in.json",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":12,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_--use-attribute-for-id_special_-yother.json.check.mbtiles",
@@ -37,18 +37,6 @@
{ "type": "Feature", "id": 27, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 12.041016, 0.966751 ] } }
,
{ "type": "Feature", "id": 0, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 13.007812, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 13.974609, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 15.029297, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 15.996094, 0.966751 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 16.962891, 0.966751 ] } }
,
{ "type": "Feature", "id": 18446744073709551615, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 18.017578, 0.966751 ] } }
] }
] }
] }
+3 -15
View File
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,12.000000,1.000000",
"bounds": "1.000000,1.000000,12.000000,1.000000",
"center": "1.000000,1.000000,0",
"description": "tests/stringid/out/-z0_-aI.json.check.mbtiles",
"format": "pbf",
"generator_options": "./tippecanoe -q -a@ -f -o tests/stringid/out/-z0_-aI.json.check.mbtiles -z0 -aI tests/stringid/in.json",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"special\":\"Mixed\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":11,\"type\":\"mixed\",\"values\":[\"\",\"-1\",-1,\"0\",0,\"01005\",18446744073709551615,\"27\",27,27.5,9.823748927348929e+55],\"min\":-1,\"max\":9.823748927348929e+55},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"special\":\"Mixed\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":12,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":5,\"type\":\"mixed\",\"values\":[\"01005\",\"27\",27,27.5,9.823748927348929e+55],\"min\":27,\"max\":9.823748927348929e+55},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_-aI.json.check.mbtiles",
@@ -37,18 +37,6 @@
{ "type": "Feature", "properties": { "yes": "no", "special": 27, "something": false }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "01005", "something": false }, "geometry": { "type": "Point", "coordinates": [ 12.041016, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": 0, "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.007812, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "0", "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.974609, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": -1, "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.029297, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "-1", "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.996094, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "", "something": false }, "geometry": { "type": "Point", "coordinates": [ 16.962891, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": 18446744073709551615, "something": false }, "geometry": { "type": "Point", "coordinates": [ 18.017578, 0.966751 ] } }
] }
] }
] }
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,12.000000,1.000000",
"bounds": "1.000000,1.000000,12.000000,1.000000",
"center": "1.000000,1.000000,0",
"description": "tests/stringid/out/-z0_-aI_--use-attribute-for-id_special.json.check.mbtiles",
"format": "pbf",
"generator_options": "./tippecanoe -q -a@ -f -o tests/stringid/out/-z0_-aI_--use-attribute-for-id_special.json.check.mbtiles -z0 -aI --use-attribute-for-id special tests/stringid/in.json",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"special\":\"Mixed\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":5,\"type\":\"mixed\",\"values\":[\"\",\"-1\",-1,27.5,9.823748927348929e+55],\"min\":-1,\"max\":9.823748927348929e+55},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{\"something\":\"Boolean\",\"special\":\"Number\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":12,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":2,\"type\":\"number\",\"values\":[27.5,9.823748927348929e+55],\"min\":27.5,\"max\":9.823748927348929e+55},{\"attribute\":\"yes\",\"count\":1,\"type\":\"string\",\"values\":[\"no\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_-aI_--use-attribute-for-id_special.json.check.mbtiles",
@@ -37,18 +37,6 @@
{ "type": "Feature", "id": 27, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 0.966751 ] } }
,
{ "type": "Feature", "id": 1005, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 12.041016, 0.966751 ] } }
,
{ "type": "Feature", "id": 0, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.007812, 0.966751 ] } }
,
{ "type": "Feature", "id": 0, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 13.974609, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": -1, "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.029297, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "-1", "something": false }, "geometry": { "type": "Point", "coordinates": [ 15.996094, 0.966751 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "special": "", "something": false }, "geometry": { "type": "Point", "coordinates": [ 16.962891, 0.966751 ] } }
,
{ "type": "Feature", "id": 18446744073709551615, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 18.017578, 0.966751 ] } }
] }
] }
] }
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP
#define VERSION "v2.82.1"
#define VERSION "v2.82.0"
#endif