Merge branch 'master' into decode-mvt

This commit is contained in:
Eric Fischer 2019-02-20 12:06:06 -08:00
commit 90afdf8fb2
6 changed files with 139 additions and 14 deletions

View File

@ -1,8 +1,12 @@
## 1.32.11
## 1.32.12
* Accept .mvt as well as .pbf in directories of tiles
* Allow tippecanoe-decode and tile-join of directories with no metadata
## 1.32.11
* Don't let attribute exclusion apply to the attribute that has been specified
to become the feature ID
## 1.32.10
* Fix a bug that disallowed a per-feature minzoom of 0

View File

@ -583,18 +583,6 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
}
for (ssize_t i = (ssize_t) sf.full_keys.size() - 1; i >= 0; i--) {
if (sst->exclude_all) {
if (sst->include->count(sf.full_keys[i]) == 0) {
sf.full_keys.erase(sf.full_keys.begin() + i);
sf.full_values.erase(sf.full_values.begin() + i);
continue;
}
} else if (sst->exclude->count(sf.full_keys[i]) != 0) {
sf.full_keys.erase(sf.full_keys.begin() + i);
sf.full_values.erase(sf.full_values.begin() + i);
continue;
}
coerce_value(sf.full_keys[i], sf.full_values[i].type, sf.full_values[i].s, sst->attribute_types);
if (sf.full_keys[i] == attribute_for_id) {
@ -633,6 +621,19 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
}
}
}
if (sst->exclude_all) {
if (sst->include->count(sf.full_keys[i]) == 0) {
sf.full_keys.erase(sf.full_keys.begin() + i);
sf.full_values.erase(sf.full_values.begin() + i);
continue;
}
} else if (sst->exclude->count(sf.full_keys[i]) != 0) {
sf.full_keys.erase(sf.full_keys.begin() + i);
sf.full_values.erase(sf.full_values.begin() + i);
continue;
}
}
if (!sst->filters) {

View File

@ -0,0 +1,40 @@
{ "type": "FeatureCollection", "properties": {
"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",
"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",
"type": "overlay",
"version": "2"
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "id": 12345, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 0.966797, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 1.933594, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 2.988281, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 3.955078, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 4.921875, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 5.976562, 1.054628 ] } }
,
{ "type": "Feature", "id": 27, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 6.943359, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 7.998047, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 8.964844, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 9.931641, 1.054628 ] } }
,
{ "type": "Feature", "id": 27, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 11.953125, 1.054628 ] } }
] }
] }
] }

View File

@ -0,0 +1,40 @@
{ "type": "FeatureCollection", "properties": {
"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",
"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",
"type": "overlay",
"version": "2"
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "id": 12345, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 0.966797, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 1.933594, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 2.988281, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 3.955078, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 4.921875, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 5.976562, 1.054628 ] } }
,
{ "type": "Feature", "id": 27, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 6.943359, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 7.998047, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 8.964844, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 9.931641, 1.054628 ] } }
,
{ "type": "Feature", "id": 27, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 1.054628 ] } }
,
{ "type": "Feature", "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 11.953125, 1.054628 ] } }
] }
] }
] }

View File

@ -0,0 +1,40 @@
{ "type": "FeatureCollection", "properties": {
"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",
"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",
"type": "overlay",
"version": "2"
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "id": 12345, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 0.966797, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 1.933594, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 2.988281, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 3.955078, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 4.921875, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 5.976562, 1.054628 ] } }
,
{ "type": "Feature", "id": 27, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 6.943359, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 7.998047, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 8.964844, 1.054628 ] } }
,
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 9.931641, 1.054628 ] } }
,
{ "type": "Feature", "id": 27, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 1.054628 ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 11.953125, 1.054628 ] } }
] }
] }
] }

View File

@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP
#define VERSION "v1.32.11"
#define VERSION "v1.32.12"
#endif