mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-01-21 12:05:05 +00:00
Add an option not to clip features and to include each exactly once per zoom
This commit is contained in:
parent
41099ed731
commit
ea638914ce
@ -129,6 +129,7 @@ resolution is obtained than by using a smaller _maxzoom_ or _detail_.
|
||||
* -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
|
||||
|
@ -2555,6 +2555,7 @@ int main(int argc, char **argv) {
|
||||
{"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},
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
|
@ -25,6 +25,7 @@ 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, bool mark_tile_bounds);
|
||||
drawvec reorder_lines(drawvec &geom);
|
||||
|
@ -165,6 +165,8 @@ which may not be what you want.
|
||||
.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
|
||||
|
@ -1 +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":"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]]]}}
|
||||
]}
|
||||
|
@ -1,36 +0,0 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"bounds": "-118.000000,-79.000000,145.000000,83.000000",
|
||||
"center": "-90.000000,-42.525564,1",
|
||||
"description": "tests/curve/out/-z1.json.check.mbtiles",
|
||||
"format": "pbf",
|
||||
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 1, \"fields\": {} } ] }",
|
||||
"maxzoom": "1",
|
||||
"minzoom": "0",
|
||||
"name": "tests/curve/out/-z1.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": "FeatureCollection", "properties": { "zoom": 1, "x": 0, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in" }, "features": [
|
||||
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -92.680664, 0.000000 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 0.000000, -73.239377 ], [ 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.830078, 3.513421 ], [ -93.779297, 3.513421 ], [ -92.680664, 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.680664, 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": "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.239377 ], [ 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.239377 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
@ -1,36 +0,0 @@
|
||||
{ "type": "FeatureCollection", "properties": {
|
||||
"bounds": "-118.000000,-79.000000,145.000000,83.000000",
|
||||
"center": "-90.000000,42.525564,1",
|
||||
"description": "tests/curve/out/-z1_--no-clipping.json.check.mbtiles",
|
||||
"format": "pbf",
|
||||
"json": "{\"vector_layers\": [ { \"id\": \"in\", \"description\": \"\", \"minzoom\": 0, \"maxzoom\": 1, \"fields\": {} } ] }",
|
||||
"maxzoom": "1",
|
||||
"minzoom": "0",
|
||||
"name": "tests/curve/out/-z1_--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": "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": "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": "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 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
130
tests/curve/out/-z2.json
Normal file
130
tests/curve/out/-z2.json
Normal 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 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
130
tests/curve/out/-z2_--no-clipping.json
Normal file
130
tests/curve/out/-z2_--no-clipping.json
Normal 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 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
36
tests/curve/out/-z2_--no-duplication.json
Normal file
36
tests/curve/out/-z2_--no-duplication.json
Normal 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 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
] }
|
2148
tests/ne_110m_admin_0_countries/out/-z4_-yname_-pD.json
Normal file
2148
tests/ne_110m_admin_0_countries/out/-z4_-yname_-pD.json
Normal file
File diff suppressed because one or more lines are too long
17
tile.cc
17
tile.cc
@ -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, !prevent[P_CLIPPING]);
|
||||
geom = simplify_lines(geom, z, line_detail, !(prevent[P_CLIPPING] || prevent[P_DUPLICATION]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -757,7 +757,9 @@ 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,
|
||||
@ -779,7 +781,13 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
// Must clip at z0 even if we don't want clipping, to handle features
|
||||
// that are duplicated across the date line
|
||||
|
||||
if (prevent[P_CLIPPING] && z != 0) {
|
||||
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 {
|
||||
@ -965,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, !prevent[P_CLIPPING]);
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user