Merge pull request #215 from mapbox/no-clipping

Add an option not to clip features if they appear in the tile at all
This commit is contained in:
Eric Fischer 2016-04-21 10:36:51 -07:00
commit 2607a76c63
15 changed files with 6644 additions and 14 deletions

View File

@ -1,3 +1,7 @@
## 1.9.15
* Add option not to clip features
## 1.9.14
* Clean up polygons after coalescing, if necessary

View File

@ -128,6 +128,8 @@ resolution is obtained than by using a smaller _maxzoom_ or _detail_.
* -pd or --force-feature-limit: Dynamically drop some fraction of features from large tiles to keep them under the 500K size limit. It will probably look ugly at the tile boundaries.
* -pi or --preserve-input-order: Preserve the original input order of features as the drawing order instead of ordering geographically. (This is implemented as a restoration of the original order at the end, so that dot-dropping is still geographic, which means it also undoes -ao).
* -pp or --no-polygon-splitting: Don't split complex polygons (over 700 vertices after simplification) into multiple features.
* -pc or --no-clipping: Don't clip features to the size of the tile. If a feature overlaps the tile's bounds or buffer at all, it is included completely. Be careful: this can produce very large tilesets, especially with large polygons.
* -pD or --no-duplication: As with --no-clipping, each feature is included intact instead of cut to tile boundaries. In addition, it is included only in a single tile per zoom level rather than potentially in multiple copies. Clients of the tileset must check adjacent tiles (possibly some distance away) to ensure they have all features.
* -q or --quiet: Work quietly instead of reporting progress
Example

View File

@ -2512,6 +2512,8 @@ int main(int argc, char **argv) {
}
static struct option long_options[] = {
{"output", required_argument, 0, 'o'},
{"name", required_argument, 0, 'n'},
{"layer", required_argument, 0, 'l'},
{"attribution", required_argument, 0, 'A'},
@ -2522,7 +2524,6 @@ int main(int argc, char **argv) {
{"full-detail", required_argument, 0, 'd'},
{"low-detail", required_argument, 0, 'D'},
{"minimum-detail", required_argument, 0, 'm'},
{"output", required_argument, 0, 'o'},
{"exclude", required_argument, 0, 'x'},
{"include", required_argument, 0, 'y'},
{"drop-rate", required_argument, 0, 'r'},
@ -2553,6 +2554,8 @@ int main(int argc, char **argv) {
{"force-feature-limit", no_argument, &prevent[P_DYNAMIC_DROP], 1},
{"preseve-input-order", no_argument, &prevent[P_INPUT_ORDER], 1},
{"no-polygon-splitting", no_argument, &prevent[P_POLYGON_SPLIT], 1},
{"no-clipping", no_argument, &prevent[P_CLIPPING], 1},
{"no-duplication", no_argument, &prevent[P_DUPLICATION], 1},
{0, 0, 0, 0},
};
@ -2736,8 +2739,31 @@ int main(int argc, char **argv) {
read_parallel = 1;
break;
default:
fprintf(stderr, "Usage: %s -o out.mbtiles [-n name] [-l source] [-z maxzoom] [-Z minzoom] [-B basezoom] [-d detail] [-D lower-detail] [-m min-detail] [-x excluded-field ...] [-y included-field ...] [-X] [-r droprate] [-b buffer] [-t tmpdir] [-a rco] [-p sfkld] [-q] [-P] [file.json ...]\n", argv[0]);
default: {
int width = 7 + strlen(argv[0]);
fprintf(stderr, "Usage: %s", argv[0]);
int i;
for (i = 0; long_options[i].name != NULL; i++) {
if (width + strlen(long_options[i].name) + 9 >= 80) {
fprintf(stderr, "\n ");
width = 8;
}
width += strlen(long_options[i].name) + 9;
if (strcmp(long_options[i].name, "output") == 0) {
fprintf(stderr, " --%s=output.mbtiles", long_options[i].name);
width += 9;
} else if (long_options[i].has_arg) {
fprintf(stderr, " [--%s=...]", long_options[i].name);
} else {
fprintf(stderr, " [--%s]", long_options[i].name);
}
}
if (width + 16 >= 80) {
fprintf(stderr, "\n ");
width = 8;
}
fprintf(stderr, " [file.json ...]");
}
exit(EXIT_FAILURE);
}
}

View File

@ -648,6 +648,15 @@ int quick_check(long long *bbox, int z, int detail, long long buffer) {
return 2;
}
bool point_within_tile(long long x, long long y, int z, int detail, long long buffer) {
// No adjustment for buffer, because the point must be
// strictly within the tile to appear exactly once
long long area = 1LL << (32 - z);
return x >= 0 && y >= 0 && x < area && y < area;
}
drawvec clip_lines(drawvec &geom, int z, int detail, long long buffer) {
drawvec out;
@ -800,7 +809,7 @@ drawvec impose_tile_boundaries(drawvec &geom, long long extent) {
return out;
}
drawvec simplify_lines(drawvec &geom, int z, int detail) {
drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds) {
int res = 1 << (32 - detail - z);
long long area = 0xFFFFFFFF;
if (z != 0) {
@ -817,7 +826,9 @@ drawvec simplify_lines(drawvec &geom, int z, int detail) {
}
}
geom = impose_tile_boundaries(geom, area);
if (mark_tile_bounds) {
geom = impose_tile_boundaries(geom, area);
}
for (size_t i = 0; i < geom.size(); i++) {
if (geom[i].op == VT_MOVETO) {

View File

@ -25,8 +25,9 @@ drawvec simple_clip_poly(drawvec &geom, int z, int detail, int buffer);
drawvec close_poly(drawvec &geom);
drawvec reduce_tiny_poly(drawvec &geom, int z, int detail, bool *reduced, double *accum_area);
drawvec clip_lines(drawvec &geom, int z, int detail, long long buffer);
bool point_within_tile(long long x, long long y, int z, int detail, long long buffer);
int quick_check(long long *bbox, int z, int detail, long long buffer);
drawvec simplify_lines(drawvec &geom, int z, int detail);
drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds);
drawvec reorder_lines(drawvec &geom);
drawvec fix_polygon(drawvec &geom);
std::vector<drawvec> chop_polygon(std::vector<drawvec> &geoms);

View File

@ -163,6 +163,10 @@ which may not be what you want.
.IP \(bu 2
\-pp or \-\-no\-polygon\-splitting: Don't split complex polygons (over 700 vertices after simplification) into multiple features.
.IP \(bu 2
\-pc or \-\-no\-clipping: Don't clip features to the size of the tile. If a feature overlaps the tile's bounds or buffer at all, it is included completely. Be careful: this can produce very large tilesets, especially with large polygons.
.IP \(bu 2
\-pD or \-\-no\-duplication: As with \-\-no\-clipping, each feature is included intact instead of cut to tile boundaries. In addition, it is included only in a single tile per zoom level rather than potentially in multiple copies. Clients of the tileset must check adjacent tiles (possibly some distance away) to ensure they have all features.
.IP \(bu 2
\-q or \-\-quiet: Work quietly instead of reporting progress
.RE
.SH Example

4
tests/curve/in.json Normal file
View File

@ -0,0 +1,4 @@
{"type":"FeatureCollection","features":[
{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-99,83],[-117,71],[-118,26],[-97,-38],[-75,-66],[-33,-77],[93,-79],[145,-77],[145,-74],[90,-74],[-28,-73],[-63,-63],[-82,-33],[-103,32],[-106,70],[-82,82],[-99,83]]]}},
{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[109,83],[-101,83],[-139,74],[-139,-76],[-111,-82],[160,-82],[170,-80],[-92,-77],[-112,-75],[-119,71],[-88,80],[135,80],[109,83]]]}}
]}

130
tests/curve/out/-z2.json Normal file
View File

@ -0,0 +1,130 @@
{ "type": "FeatureCollection", "properties": {
"bounds": "-139.000000,-82.000000,170.000000,83.000000",
"center": "-135.000000,75.782195,2",
"description": "tests/curve/out/-z2.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 2, \"fields\": {} } ] }",
"maxzoom": "2",
"minzoom": "0",
"name": "tests/curve/out/-z2.json.check.mbtiles",
"type": "overlay",
"version": "2"
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.009169 ], [ -106.083984, 70.020587 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.931641, -73.995328 ], [ 144.931641, -76.999935 ], [ 92.988281, -78.988187 ], [ -33.046875, -76.999935 ], [ -75.058594, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.070312, 71.016960 ], [ -99.052734, 83.004844 ], [ -82.001953, 82.009169 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.012423 ], [ -88.066406, 80.012423 ], [ -119.003906, 71.016960 ], [ -112.060547, -74.982183 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.019543 ], [ -101.074219, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.012423 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 1 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -92.724609, 0.000000 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 0.000000, -73.226700 ], [ 3.515625, -73.264704 ], [ 3.515625, -77.608282 ], [ 0.000000, -77.551572 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.982270 ], [ -97.031250, -37.996163 ], [ -109.731445, 0.000000 ], [ -110.786133, 3.513421 ], [ -93.779297, 3.513421 ], [ -92.724609, 0.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -115.751953, 0.000000 ], [ -112.016602, -74.993566 ], [ -92.021484, -76.999935 ], [ 0.000000, -78.134493 ], [ 3.515625, -78.179588 ], [ 3.515625, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 3.513421 ], [ -115.883789, 3.513421 ], [ -115.751953, 0.000000 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.003058 ], [ -106.040039, 70.005567 ], [ -103.007812, 32.026706 ], [ -92.724609, 0.000000 ], [ -91.625977, -3.513421 ], [ -108.632812, -3.513421 ], [ -109.731445, 0.000000 ], [ -118.037109, 26.037042 ], [ -117.026367, 71.002660 ], [ -99.008789, 83.004844 ], [ -82.001953, 82.003058 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.515625, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -115.751953, 0.000000 ], [ -115.620117, -3.513421 ], [ -139.042969, -3.513421 ], [ -139.042969, 74.007440 ], [ -101.030273, 83.004844 ], [ 3.515625, 83.004844 ], [ 3.515625, 80.004799 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 1 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.000000, -73.226700 ], [ 90.000000, -73.995328 ], [ 144.975586, -73.995328 ], [ 144.975586, -76.999935 ], [ 92.988281, -78.996578 ], [ 0.000000, -77.551572 ], [ -3.515625, -77.494607 ], [ -3.515625, -73.201317 ], [ 0.000000, -73.226700 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.000000, -78.134493 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -3.515625, -81.996942 ], [ -3.515625, -78.098296 ], [ 0.000000, -78.134493 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.004799 ], [ -3.515625, 80.004799 ], [ -3.515625, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.004799 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 3 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -112.873535, -66.513260 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ -90.000000, -77.024626 ], [ -88.242188, -77.044346 ], [ -88.242188, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, -65.802776 ], [ -112.917480, -65.802776 ], [ -112.873535, -66.513260 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 2 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -92.702637, 0.000000 ], [ -90.000000, -8.733077 ], [ -88.242188, -14.370834 ], [ -88.242188, -51.371780 ], [ -90.000000, -48.936935 ], [ -97.009277, -37.996163 ], [ -109.709473, 0.000000 ], [ -110.258789, 1.757537 ], [ -93.229980, 1.757537 ], [ -92.702637, 0.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -115.751953, 0.000000 ], [ -112.873535, -66.513260 ], [ -112.807617, -67.204032 ], [ -139.020996, -67.204032 ], [ -139.020996, 1.757537 ], [ -115.817871, 1.757537 ], [ -115.751953, 0.000000 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 1 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -105.600586, 66.513260 ], [ -103.007812, 32.008076 ], [ -92.702637, 0.000000 ], [ -92.175293, -1.757537 ], [ -109.182129, -1.757537 ], [ -109.731445, 0.000000 ], [ -118.015137, 26.017298 ], [ -117.180176, 66.513260 ], [ -117.158203, 67.204032 ], [ -105.666504, 67.204032 ], [ -105.600586, 66.513260 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -118.608398, 66.513260 ], [ -115.751953, 0.000000 ], [ -115.686035, -1.757537 ], [ -139.020996, -1.757537 ], [ -139.020996, 67.204032 ], [ -118.674316, 67.204032 ], [ -118.608398, 66.513260 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -90.000000, 82.489081 ], [ -88.242188, 82.384973 ], [ -88.242188, 79.839471 ], [ -90.000000, 79.134119 ], [ -106.018066, 70.005567 ], [ -105.600586, 66.513260 ], [ -105.512695, 65.802776 ], [ -117.202148, 65.802776 ], [ -117.180176, 66.513260 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -90.000000, 82.489081 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -88.242188, 79.951265 ], [ -90.000000, 79.576460 ], [ -119.003906, 71.002660 ], [ -118.608398, 66.513260 ], [ -118.564453, 65.802776 ], [ -139.020996, 65.802776 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ -88.242188, 83.002167 ], [ -88.242188, 79.951265 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 1, "y": 3 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -52.382812, -66.513260 ], [ -28.015137, -72.996909 ], [ 0.000000, -73.233040 ], [ 1.757812, -73.245712 ], [ 1.757812, -77.575232 ], [ 0.000000, -77.546835 ], [ -33.002930, -76.999935 ], [ -73.498535, -66.513260 ], [ -75.014648, -65.991212 ], [ -75.234375, -65.802776 ], [ -54.645996, -65.802776 ], [ -52.382812, -66.513260 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -90.000000, -77.024626 ], [ 0.000000, -78.134493 ], [ 1.757812, -78.157062 ], [ 1.757812, -81.996942 ], [ -91.757812, -81.996942 ], [ -91.757812, -76.999935 ], [ -90.000000, -77.024626 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 1, "y": 2 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -90.000000, -8.733077 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -52.382812, -66.513260 ], [ -50.119629, -67.204032 ], [ -71.433105, -67.204032 ], [ -73.498535, -66.513260 ], [ -75.014648, -65.991212 ], [ -90.000000, -48.936935 ], [ -91.757812, -46.377254 ], [ -91.757812, -3.030812 ], [ -90.000000, -8.733077 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 1, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -90.000000, 82.489081 ], [ -82.001953, 82.000000 ], [ -90.000000, 79.134119 ], [ -91.757812, 78.376004 ], [ -91.757812, 82.591775 ], [ -90.000000, 82.489081 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 1.757812, 80.000984 ], [ -88.000488, 80.000984 ], [ -90.000000, 79.576460 ], [ -91.757812, 79.191956 ], [ -91.757812, 83.002167 ], [ 1.757812, 83.002167 ], [ 1.757812, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 2, "y": 3 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.000000, -73.233040 ], [ 90.000000, -73.995328 ], [ 91.757812, -73.995328 ], [ 91.757812, -78.975588 ], [ 90.000000, -78.950349 ], [ 0.000000, -77.551572 ], [ -1.757812, -77.523122 ], [ -1.757812, -73.220358 ], [ 0.000000, -73.233040 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.000000, -78.139010 ], [ 90.000000, -79.158943 ], [ 91.757812, -79.179588 ], [ 91.757812, -81.996942 ], [ -1.757812, -81.996942 ], [ -1.757812, -78.116408 ], [ 0.000000, -78.139010 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 2, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 91.757812, 80.000984 ], [ -1.757812, 80.000984 ], [ -1.757812, 83.002167 ], [ 91.757812, 83.002167 ], [ 91.757812, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 3 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ 90.000000, -78.950349 ], [ 88.242188, -78.925053 ], [ 88.242188, -73.977144 ], [ 90.000000, -73.995328 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 90.000000, -79.158943 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ 88.242188, -81.996942 ], [ 88.242188, -79.142400 ], [ 90.000000, -79.158943 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ 88.242188, 80.000984 ], [ 88.242188, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
] }

View File

@ -0,0 +1,130 @@
{ "type": "FeatureCollection", "properties": {
"bounds": "-139.000000,-82.000000,170.000000,83.000000",
"center": "-135.000000,75.782195,2",
"description": "tests/curve/out/-z2_--no-clipping.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 2, \"fields\": {} } ] }",
"maxzoom": "2",
"minzoom": "0",
"name": "tests/curve/out/-z2_--no-clipping.json.check.mbtiles",
"type": "overlay",
"version": "2"
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.009169 ], [ -106.083984, 70.020587 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.931641, -73.995328 ], [ 144.931641, -76.999935 ], [ 92.988281, -78.988187 ], [ -33.046875, -76.999935 ], [ -75.058594, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.070312, 71.016960 ], [ -99.052734, 83.004844 ], [ -82.001953, 82.009169 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.012423 ], [ -88.066406, 80.012423 ], [ -119.003906, 71.016960 ], [ -112.060547, -74.982183 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.019543 ], [ -101.074219, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.012423 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 1 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.003058 ], [ -106.040039, 70.005567 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.975586, -73.995328 ], [ 144.975586, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.026367, 71.002660 ], [ -99.008789, 83.004844 ], [ -82.001953, 82.003058 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.993566 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.007440 ], [ -101.030273, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.004799 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.003058 ], [ -106.040039, 70.005567 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.975586, -73.995328 ], [ 144.975586, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.026367, 71.002660 ], [ -99.008789, 83.004844 ], [ -82.001953, 82.003058 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.993566 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.007440 ], [ -101.030273, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.004799 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 1 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.003058 ], [ -106.040039, 70.005567 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.975586, -73.995328 ], [ 144.975586, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.026367, 71.002660 ], [ -99.008789, 83.004844 ], [ -82.001953, 82.003058 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.993566 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.007440 ], [ -101.030273, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.004799 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.993566 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.007440 ], [ -101.030273, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.004799 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 3 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 2 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 1 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 1, "y": 3 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 1, "y": 2 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 1, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 2, "y": 3 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 2, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 3 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 3, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
] }

View File

@ -0,0 +1,36 @@
{ "type": "FeatureCollection", "properties": {
"bounds": "-139.000000,-82.000000,170.000000,83.000000",
"center": "45.000000,33.256630,2",
"description": "tests/curve/out/-z2_--no-duplication.json.check.mbtiles",
"format": "pbf",
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 2, \"fields\": {} } ] }",
"maxzoom": "2",
"minzoom": "0",
"name": "tests/curve/out/-z2_--no-duplication.json.check.mbtiles",
"type": "overlay",
"version": "2"
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.009169 ], [ -106.083984, 70.020587 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.931641, -73.995328 ], [ 144.931641, -76.999935 ], [ 92.988281, -78.988187 ], [ -33.046875, -76.999935 ], [ -75.058594, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.070312, 71.016960 ], [ -99.052734, 83.004844 ], [ -82.001953, 82.009169 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.012423 ], [ -88.066406, 80.012423 ], [ -119.003906, 71.016960 ], [ -112.060547, -74.982183 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.019543 ], [ -101.074219, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.012423 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.003058 ], [ -106.040039, 70.005567 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.975586, -73.995328 ], [ 144.975586, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.026367, 71.002660 ], [ -99.008789, 83.004844 ], [ -82.001953, 82.003058 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.993566 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.007440 ], [ -101.030273, 83.004844 ], [ 108.984375, 83.004844 ], [ 135.000000, 80.004799 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 2, "y": 1 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ] ] ] } }
] }
] }
] }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

42
tile.cc
View File

@ -510,7 +510,7 @@ void *partial_feature_worker(void *v) {
geom = remove_noop(geom, t, 32 - z - line_detail);
}
geom = simplify_lines(geom, z, line_detail);
geom = simplify_lines(geom, z, line_detail, !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]));
}
}
@ -757,18 +757,45 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
}
}
if (quick != 1) {
// Can't accept the quick check if guaranteeing no duplication, since the
// overlap might have been in the buffer.
if (quick != 1 || prevent[P_DUPLICATION]) {
drawvec clipped;
// Do the clipping, even if we are going to include the whole feature,
// so that we can know whether the feature itself, or only the feature's
// bounding box, touches the tile.
if (t == VT_LINE) {
geom = clip_lines(geom, z, line_detail, buffer);
clipped = clip_lines(geom, z, line_detail, buffer);
}
if (t == VT_POLYGON) {
geom = simple_clip_poly(geom, z, line_detail, buffer);
clipped = simple_clip_poly(geom, z, line_detail, buffer);
}
if (t == VT_POINT) {
geom = clip_point(geom, z, line_detail, buffer);
clipped = clip_point(geom, z, line_detail, buffer);
}
geom = remove_noop(geom, t, 0);
clipped = remove_noop(clipped, t, 0);
// Must clip at z0 even if we don't want clipping, to handle features
// that are duplicated across the date line
if (prevent[P_DUPLICATION] && z != 0) {
if (point_within_tile((bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2, z, line_detail, buffer)) {
// geom is unchanged
} else {
geom.clear();
}
} else if (prevent[P_CLIPPING] && z != 0) {
if (clipped.size() == 0) {
geom.clear();
} else {
// geom is unchanged
}
} else {
geom = clipped;
}
}
if (geom.size() > 0) {
@ -946,7 +973,8 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
for (size_t x = 0; x < features[j].size(); x++) {
if (features[j][x].coalesced && features[j][x].type == VT_LINE) {
features[j][x].geom = remove_noop(features[j][x].geom, features[j][x].type, 0);
features[j][x].geom = simplify_lines(features[j][x].geom, 32, 0);
features[j][x].geom = simplify_lines(features[j][x].geom, 32, 0,
!(prevent[P_CLIPPING] || prevent[P_DUPLICATION]));
}
if (features[j][x].type == VT_POLYGON) {

4
tile.h
View File

@ -71,4 +71,8 @@ static int prevent_options[] = {
P_INPUT_ORDER,
#define P_POLYGON_SPLIT ((int) 'p')
P_POLYGON_SPLIT,
#define P_CLIPPING ((int) 'c')
P_CLIPPING,
#define P_DUPLICATION ((int) 'D')
P_DUPLICATION,
};

View File

@ -1 +1 @@
#define VERSION "tippecanoe v1.9.14\n"
#define VERSION "tippecanoe v1.9.15\n"