mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Send dot-dropping through the same pipeline.
The first feature in a tile can never be dropped, since there is no previous feature to attach its properties to. Remove the previous special case that reset the dropping counter at the first feature within each tile proper (as opposed to the first feature in each tile, including its buffer, which is now the one that is guaranteed to be preserved).
This commit is contained in:
+9
-1
@@ -25,7 +25,7 @@ struct lonlat {
|
||||
}
|
||||
};
|
||||
|
||||
void layer_to_geojson(FILE *fp, mvt_layer const &layer, unsigned z, unsigned x, unsigned y, bool comma, bool name, bool zoom, unsigned long long index, long long sequence, long long extent, bool complain) {
|
||||
void layer_to_geojson(FILE *fp, mvt_layer const &layer, unsigned z, unsigned x, unsigned y, bool comma, bool name, bool zoom, bool dropped, unsigned long long index, long long sequence, long long extent, bool complain) {
|
||||
for (size_t f = 0; f < layer.features.size(); f++) {
|
||||
mvt_feature const &feat = layer.features[f];
|
||||
|
||||
@@ -62,6 +62,14 @@ void layer_to_geojson(FILE *fp, mvt_layer const &layer, unsigned z, unsigned x,
|
||||
need_comma = true;
|
||||
}
|
||||
|
||||
if (dropped) {
|
||||
if (need_comma) {
|
||||
fprintf(fp, ", ");
|
||||
}
|
||||
fprintf(fp, "\"dropped\": %s", feat.dropped ? "true" : "false");
|
||||
need_comma = true;
|
||||
}
|
||||
|
||||
if (index != 0) {
|
||||
if (need_comma) {
|
||||
fprintf(fp, ", ");
|
||||
|
||||
Reference in New Issue
Block a user