mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-01 16:58:05 +00:00
Don't exclude the attribute that is specified to be the feature ID
This commit is contained in:
parent
9387fe6546
commit
435a788c3f
@ -1,3 +1,8 @@
|
||||
## 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
|
||||
|
25
serial.cpp
25
serial.cpp
@ -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) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 5.976562, 1.054628 ] } }
|
||||
,
|
||||
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 6.943359, 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 ] } }
|
||||
,
|
||||
@ -32,7 +32,7 @@
|
||||
,
|
||||
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 9.931641, 1.054628 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 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 ] } }
|
||||
] }
|
||||
|
@ -24,7 +24,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 5.976562, 1.054628 ] } }
|
||||
,
|
||||
{ "type": "Feature", "id": 1234, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 6.943359, 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 ] } }
|
||||
,
|
||||
@ -32,7 +32,7 @@
|
||||
,
|
||||
{ "type": "Feature", "id": 1234, "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 9.931641, 1.054628 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "yes": "no", "something": false }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 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 ] } }
|
||||
] }
|
||||
|
@ -24,7 +24,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 5.976562, 1.054628 ] } }
|
||||
,
|
||||
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 6.943359, 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 ] } }
|
||||
,
|
||||
@ -32,7 +32,7 @@
|
||||
,
|
||||
{ "type": "Feature", "id": 1234, "properties": { }, "geometry": { "type": "Point", "coordinates": [ 9.931641, 1.054628 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Point", "coordinates": [ 10.986328, 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 ] } }
|
||||
] }
|
||||
|
@ -1,6 +1,6 @@
|
||||
#ifndef VERSION_HPP
|
||||
#define VERSION_HPP
|
||||
|
||||
#define VERSION "v1.32.10"
|
||||
#define VERSION "v1.32.11"
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user