mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-04-08 03:24:12 +00:00
Put the feature-rejoining experiments behind an option flag
This commit is contained in:
parent
2294ff02aa
commit
086832d5e3
1
main.cpp
1
main.cpp
@ -2405,6 +2405,7 @@ int main(int argc, char **argv) {
|
||||
{"buffer", required_argument, 0, 'b'},
|
||||
{"no-clipping", no_argument, &prevent[P_CLIPPING], 1},
|
||||
{"no-duplication", no_argument, &prevent[P_DUPLICATION], 1},
|
||||
{"join-features-across-tiles", no_argument, &additional[A_JOIN_FEATURES_ACROSS_TILES], 1},
|
||||
|
||||
{"Reordering features within each tile", 0, 0, 0},
|
||||
{"preserve-input-order", no_argument, &prevent[P_INPUT_ORDER], 1},
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define A_DETECT_WRAPAROUND ((int) 'w')
|
||||
#define A_EXTEND_ZOOMS ((int) 'e')
|
||||
#define A_CLUSTER_DENSEST_AS_NEEDED ((int) 'C')
|
||||
#define A_JOIN_FEATURES_ACROSS_TILES ((int) 'j')
|
||||
|
||||
#define P_SIMPLIFY ((int) 's')
|
||||
#define P_SIMPLIFY_LOW ((int) 'S')
|
||||
|
@ -81,7 +81,7 @@ void parse_geometry(int t, json_object *j, drawvec &out, int op, const char *fna
|
||||
}
|
||||
|
||||
draw d(op, x, y);
|
||||
d.id = 12345;
|
||||
d.id = 0;
|
||||
out.push_back(d);
|
||||
} else {
|
||||
fprintf(stderr, "%s:%d: malformed point\n", fname, line);
|
||||
|
16
tile.cpp
16
tile.cpp
@ -295,14 +295,16 @@ void rewrite(drawvec &geom, int z, int nextzoom, int maxzoom, long long *bbox, u
|
||||
geom2.push_back(draw(geom[i].op, (geom[i].x + sx) >> geometry_scale, (geom[i].y + sy) >> geometry_scale, geom[i].id));
|
||||
}
|
||||
|
||||
if (bbox2[0] != bbox2[2] || bbox2[1] != bbox2[3]) {
|
||||
// Feature is being split across multiple child tiles,
|
||||
// so we must give the feature an ID if it doesn't
|
||||
// already have one, and must give IDs to all the nodes
|
||||
// where it crosses a tile boundary.
|
||||
if (additional[A_JOIN_FEATURES_ACROSS_TILES]) {
|
||||
if (bbox2[0] != bbox2[2] || bbox2[1] != bbox2[3]) {
|
||||
// Feature is being split across multiple child tiles,
|
||||
// so we must give the feature an ID if it doesn't
|
||||
// already have one, and must give IDs to all the nodes
|
||||
// where it crosses a tile boundary.
|
||||
|
||||
if (clipid == 0) {
|
||||
clipid = (*clipids)[tiling_seg]++ * CPUS + tiling_seg + 1;
|
||||
if (clipid == 0) {
|
||||
clipid = (*clipids)[tiling_seg]++ * CPUS + tiling_seg + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user