Reject negative attribute IDs and accept the largest unsigned one

--use-attribute-for-id parsed the attribute with strtoull() into a
signed long long. strtoull() wraps "-1" around to ULLONG_MAX, which
std::to_string() then printed back as "-1", so the round-trip check
passed and the feature got the ID 18446744073709551615. The same
signedness made the genuine value 18446744073709551615 print as "-1"
and be rejected as too large.

Store the ID as unsigned long long, and reject values that start with
'-' with the same "negative feature ID" warning used for top-level IDs.
Also require the value to start with a digit, so an empty string (or
one with leading whitespace or '+') is reported as not a number instead
of as a too-large ID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQTWcgZdZ5kwoNa4bxA
This commit is contained in:
Claude
2026-11-11 19:44:22 +00:00
parent 0dd272824d
commit e7a2c6ac49
10 changed files with 112 additions and 30 deletions
+10 -3
View File
@@ -1,9 +1,16 @@
# 2.82.1
* Fix `--use-attribute-for-id` rejecting an attribute value of 0 as a
"too-large" feature ID. The leading-zero stripping used to check that the ID
round-tripped stripped "0" down to an empty string, so the feature was left
with no ID and kept the attribute instead.
"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
+21 -6
View File
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <string>
#include <vector>
@@ -379,10 +380,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 integer IDs must be positive
// Keep the final digit so that an ID of 0 compares equal to "0"
// 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') {
s.erase(s.begin());
}
@@ -812,16 +813,30 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
}
if (*sf.full_keys[i] == attribute_for_id) {
if (sf.full_values[i].type != mvt_double && !additional[A_CONVERT_NUMERIC_IDS]) {
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])))) {
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;
long long id_value = strtoull(sf.full_values[i].s.c_str(), &err, 10);
unsigned long long id_value = strtoull(id_string.c_str(), &err, 10);
if (err != NULL && *err != '\0') {
static bool warned_frac = false;
+4
View File
@@ -12,3 +12,7 @@
{ "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 ] } }
+11 -3
View File
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,14.000000,1.000000",
"bounds": "1.000000,1.000000,14.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.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\":14,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":7,\"type\":\"mixed\",\"values\":[\"0\",0,\"01005\",\"27\",27,27.5,9.823748927348929e+55],\"min\":0,\"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\":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\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0.json.check.mbtiles",
@@ -41,6 +41,14 @@
{ "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,14.000000,1.000000",
"bounds": "1.000000,1.000000,14.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.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\":14,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":5,\"type\":\"mixed\",\"values\":[\"0\",\"01005\",\"27\",27.5,9.823748927348929e+55],\"min\":27.5,\"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\":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\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_--use-attribute-for-id_special.json.check.mbtiles",
@@ -41,6 +41,14 @@
{ "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,14.000000,1.000000",
"bounds": "1.000000,1.000000,14.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.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\":14,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_--use-attribute-for-id_special_-X.json.check.mbtiles",
@@ -41,6 +41,14 @@
{ "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,14.000000,1.000000",
"bounds": "1.000000,1.000000,14.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.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\":14,\"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\":18,\"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",
@@ -41,6 +41,14 @@
{ "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,14.000000,1.000000",
"bounds": "1.000000,1.000000,14.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.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\":14,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"json": "{\"vector_layers\":[{\"id\":\"in\",\"description\":\"\",\"minzoom\":0,\"maxzoom\":0,\"fields\":{}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":18,\"geometry\":\"Point\",\"attributeCount\":0,\"attributes\":[]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_--use-attribute-for-id_special_-yother.json.check.mbtiles",
@@ -41,6 +41,14 @@
{ "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 ] } }
] }
] }
] }
+11 -3
View File
@@ -1,11 +1,11 @@
{ "type": "FeatureCollection", "properties": {
"antimeridian_adjusted_bounds": "1.000000,1.000000,14.000000,1.000000",
"bounds": "1.000000,1.000000,14.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.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\":14,\"geometry\":\"Point\",\"attributeCount\":3,\"attributes\":[{\"attribute\":\"something\",\"count\":1,\"type\":\"boolean\",\"values\":[false]},{\"attribute\":\"special\",\"count\":7,\"type\":\"mixed\",\"values\":[\"0\",0,\"01005\",\"27\",27,27.5,9.823748927348929e+55],\"min\":0,\"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\":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\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_-aI.json.check.mbtiles",
@@ -41,6 +41,14 @@
{ "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,14.000000,1.000000",
"bounds": "1.000000,1.000000,14.000000,1.000000",
"antimeridian_adjusted_bounds": "1.000000,1.000000,18.000000,1.000000",
"bounds": "1.000000,1.000000,18.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\":\"Number\",\"yes\":\"String\"}}],\"tilestats\":{\"layerCount\":1,\"layers\":[{\"layer\":\"in\",\"count\":14,\"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\"]}]}]}}",
"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\"]}]}]}}",
"maxzoom": "0",
"minzoom": "0",
"name": "tests/stringid/out/-z0_-aI_--use-attribute-for-id_special.json.check.mbtiles",
@@ -41,6 +41,14 @@
{ "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 ] } }
] }
] }
] }