mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-23 10:30:16 +00:00
Remove filled tiles in sets of 4 that all inherit from the same parent
This commit is contained in:
parent
4ce6265423
commit
f9b7831dd0
@ -1409,6 +1409,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 1, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -89.121094, -79.004962 ], [ -89.121094, -85.126373 ], [ -135.878906, -85.126373 ], [ -135.878906, -79.004962 ], [ -89.121094, -79.004962 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 1, "y": 6 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -89.230957, -72.557792 ], [ -89.121094, -72.616970 ], [ -89.121094, -79.335219 ], [ -135.878906, -79.335219 ], [ -135.878906, -74.416926 ], [ -135.219727, -74.301409 ], [ -135.000000, -74.316266 ], [ -134.439697, -74.360753 ], [ -133.747559, -74.437572 ], [ -132.264404, -74.301409 ], [ -130.935059, -74.478784 ], [ -129.561768, -74.458191 ], [ -128.243408, -74.322204 ], [ -126.892090, -74.419877 ], [ -125.408936, -74.516956 ], [ -124.013672, -74.478784 ], [ -121.080322, -74.516956 ], [ -119.707031, -74.478784 ], [ -118.685303, -74.185058 ], [ -117.476807, -74.025591 ], [ -116.224365, -74.241846 ], [ -115.026855, -74.064850 ], [ -113.950195, -73.714276 ], [ -113.302002, -74.025591 ], [ -112.950439, -74.378513 ], [ -112.302246, -74.712244 ], [ -111.269531, -74.419877 ], [ -110.072021, -74.790261 ], [ -108.720703, -74.907988 ], [ -107.567139, -75.182980 ], [ -106.149902, -75.123864 ], [ -104.886475, -74.947983 ], [ -103.370361, -74.987875 ], [ -102.019043, -75.123864 ], [ -100.645752, -75.300523 ], [ -100.118408, -74.870757 ], [ -100.766602, -74.537473 ], [ -101.260986, -74.185058 ], [ -102.546387, -74.104015 ], [ -103.117676, -73.732751 ], [ -103.337402, -73.359348 ], [ -103.688965, -72.616970 ], [ -102.919922, -72.754296 ], [ -101.612549, -72.812828 ], [ -100.316162, -72.754296 ], [ -99.140625, -72.909952 ], [ -98.118896, -73.204492 ], [ -97.690430, -73.556412 ], [ -96.339111, -73.615397 ], [ -95.053711, -73.478485 ], [ -93.680420, -73.283674 ], [ -92.449951, -73.163173 ], [ -91.428223, -73.400199 ], [ -90.098877, -73.321553 ], [ -90.000000, -73.239377 ], [ -89.230957, -72.557792 ] ] ], [ [ [ -122.409668, -73.321553 ], [ -121.212158, -73.500341 ], [ -119.926758, -73.655637 ], [ -118.729248, -73.478485 ], [ -119.300537, -73.833999 ], [ -120.234375, -74.085951 ], [ -121.629639, -74.010467 ], [ -122.629395, -73.655637 ], [ -122.409668, -73.321553 ] ] ], [ [ [ -126.562500, -73.245712 ], [ -125.562744, -73.478485 ], [ -124.035645, -73.870665 ], [ -124.628906, -73.833999 ], [ -125.914307, -73.735828 ], [ -127.287598, -73.459729 ], [ -126.562500, -73.245712 ] ] ], [ [ [ -101.711426, -71.715436 ], [ -100.437012, -71.852807 ], [ -98.986816, -71.931344 ], [ -97.888184, -72.070530 ], [ -96.789551, -71.951778 ], [ -96.207275, -72.518231 ], [ -96.987305, -72.442164 ], [ -98.206787, -72.481891 ], [ -99.437256, -72.442164 ], [ -100.788574, -72.498419 ], [ -101.810303, -72.302431 ], [ -102.337646, -71.893824 ], [ -101.711426, -71.715436 ] ] ] ] } }
|
||||
@ -1669,6 +1675,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 4, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 45.878906, -79.004962 ], [ 45.878906, -85.126373 ], [ -0.878906, -85.126373 ], [ -0.878906, -79.004962 ], [ 45.878906, -79.004962 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 4, "y": 6 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 45.878906, -67.767713 ], [ 45.878906, -79.335219 ], [ -0.878906, -79.335219 ], [ -0.878906, -71.212537 ], [ -0.670166, -71.223149 ], [ -0.230713, -71.635993 ], [ 0.000000, -71.566641 ], [ 0.867920, -71.304315 ], [ 1.878662, -71.127434 ], [ 4.130859, -70.851881 ], [ 5.152588, -70.616261 ], [ 6.273193, -70.458859 ], [ 7.130127, -70.244604 ], [ 7.734375, -69.892565 ], [ 8.481445, -70.147827 ], [ 9.514160, -70.009323 ], [ 10.810547, -70.833855 ], [ 11.953125, -70.638127 ], [ 12.403564, -70.244604 ], [ 13.414307, -69.971730 ], [ 14.732666, -70.028094 ], [ 15.117188, -70.399978 ], [ 15.941162, -70.028094 ], [ 17.017822, -69.911441 ], [ 18.193359, -69.873672 ], [ 19.259033, -69.892565 ], [ 20.368652, -70.009323 ], [ 21.445312, -70.069330 ], [ 21.917725, -70.399978 ], [ 22.565918, -70.696320 ], [ 23.664551, -70.517570 ], [ 24.840088, -70.480896 ], [ 25.971680, -70.480896 ], [ 27.092285, -70.458859 ], [ 28.092041, -70.322438 ], [ 29.146729, -70.203715 ], [ 30.025635, -69.930300 ], [ 30.970459, -69.756155 ], [ 31.981201, -69.657086 ], [ 32.750244, -69.384181 ], [ 33.299561, -68.831802 ], [ 33.859863, -68.500067 ], [ 34.903564, -68.656555 ], [ 35.299072, -69.009611 ], [ 36.156006, -69.244472 ], [ 37.199707, -69.166466 ], [ 37.902832, -69.519147 ], [ 38.638916, -69.775154 ], [ 39.660645, -69.538359 ], [ 40.012207, -69.107777 ], [ 40.913086, -68.930761 ], [ 41.956787, -68.600505 ], [ 42.934570, -68.459766 ], [ 44.110107, -68.265319 ], [ 45.000000, -68.019910 ], [ 45.878906, -67.767713 ] ] ] } }
|
||||
@ -1925,6 +1937,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 5, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 90.878906, -79.004962 ], [ 90.878906, -85.126373 ], [ 44.121094, -85.126373 ], [ 44.121094, -79.004962 ], [ 90.878906, -79.004962 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 5, "y": 6 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 56.898193, -66.160511 ], [ 57.150879, -66.244738 ], [ 57.216797, -66.513260 ], [ 57.249756, -66.679087 ], [ 58.128662, -67.011719 ], [ 58.743896, -67.284773 ], [ 59.930420, -67.403266 ], [ 60.600586, -67.676085 ], [ 61.424561, -67.949900 ], [ 62.380371, -68.011685 ], [ 63.182373, -67.813394 ], [ 64.050293, -67.403266 ], [ 64.984131, -67.617589 ], [ 66.906738, -67.854844 ], [ 67.884521, -67.933397 ], [ 68.884277, -67.933397 ], [ 69.708252, -68.970221 ], [ 69.664307, -69.224997 ], [ 69.554443, -69.676174 ], [ 68.587646, -69.930300 ], [ 67.807617, -70.303933 ], [ 67.939453, -70.696320 ], [ 69.060059, -70.674517 ], [ 68.928223, -71.066928 ], [ 68.411865, -71.441171 ], [ 67.939453, -71.852807 ], [ 68.708496, -72.164987 ], [ 69.862061, -72.262310 ], [ 71.015625, -72.087432 ], [ 71.564941, -71.694744 ], [ 71.905518, -71.321915 ], [ 72.443848, -71.009811 ], [ 73.081055, -70.714471 ], [ 73.333740, -70.363091 ], [ 73.861084, -69.873672 ], [ 74.487305, -69.775154 ], [ 75.618896, -69.733334 ], [ 76.618652, -69.618859 ], [ 77.640381, -69.461408 ], [ 78.123779, -69.068563 ], [ 78.420410, -68.696505 ], [ 79.112549, -68.322205 ], [ 80.090332, -68.069202 ], [ 80.925293, -67.875541 ], [ 81.474609, -67.542167 ], [ 82.045898, -67.365243 ], [ 82.770996, -67.208289 ], [ 83.770752, -67.305976 ], [ 84.671631, -67.208289 ], [ 85.649414, -67.088828 ], [ 86.748047, -67.148632 ], [ 87.473145, -66.874030 ], [ 87.747803, -66.513260 ], [ 87.978516, -66.209308 ], [ 88.385010, -66.513260 ], [ 88.824463, -66.951576 ], [ 89.670410, -67.148632 ], [ 90.000000, -67.174217 ], [ 90.626221, -67.225306 ], [ 90.878906, -67.195518 ], [ 90.878906, -79.335219 ], [ 44.121094, -79.335219 ], [ 44.121094, -68.261250 ], [ 45.000000, -68.019910 ], [ 46.494141, -67.600849 ], [ 47.438965, -67.717778 ], [ 48.339844, -67.365243 ], [ 48.988037, -67.088828 ], [ 49.921875, -67.110204 ], [ 50.745850, -66.874030 ], [ 50.943604, -66.522016 ], [ 50.965576, -66.513260 ], [ 51.789551, -66.244738 ], [ 52.152100, -66.160511 ], [ 56.898193, -66.160511 ] ] ] } }
|
||||
@ -2045,6 +2063,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 6, "y": 7 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.878906, -79.004962 ], [ 135.878906, -85.126373 ], [ 89.121094, -85.126373 ], [ 89.121094, -79.004962 ], [ 135.878906, -79.004962 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 3, "x": 6, "y": 6 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.878906, -66.160511 ], [ 135.878906, -79.335219 ], [ 89.121094, -79.335219 ], [ 89.121094, -67.020299 ], [ 89.670410, -67.148632 ], [ 90.000000, -67.174217 ], [ 90.626221, -67.225306 ], [ 91.582031, -67.110204 ], [ 92.603760, -67.187000 ], [ 93.548584, -67.208289 ], [ 94.174805, -67.110204 ], [ 95.009766, -67.169955 ], [ 95.778809, -67.382150 ], [ 96.679688, -67.246561 ], [ 97.756348, -67.246561 ], [ 98.679199, -67.110204 ], [ 99.711914, -67.246561 ], [ 100.382080, -66.912834 ], [ 100.887451, -66.578851 ], [ 101.568604, -66.306621 ], [ 101.821289, -66.160511 ], [ 104.589844, -66.160511 ], [ 105.292969, -66.513260 ], [ 106.171875, -66.934365 ], [ 107.160645, -66.951576 ], [ 108.072510, -66.951576 ], [ 109.149170, -66.835165 ], [ 110.225830, -66.696478 ], [ 110.786133, -66.513260 ], [ 111.049805, -66.421143 ], [ 111.665039, -66.160511 ], [ 114.521484, -66.160511 ], [ 114.895020, -66.385961 ], [ 115.169678, -66.513260 ], [ 115.598145, -66.696478 ], [ 116.696777, -66.657331 ], [ 117.377930, -66.912834 ], [ 118.575439, -67.169955 ], [ 119.827881, -67.267798 ], [ 120.860596, -67.187000 ], [ 121.651611, -66.874030 ], [ 122.310791, -66.561377 ], [ 122.860107, -66.513260 ], [ 123.211670, -66.482592 ], [ 123.409424, -66.513260 ], [ 124.112549, -66.618122 ], [ 125.156250, -66.718199 ], [ 126.090088, -66.561377 ], [ 126.990967, -66.561377 ], [ 128.792725, -66.757250 ], [ 129.693604, -66.578851 ], [ 130.155029, -66.513260 ], [ 130.781250, -66.421143 ], [ 131.791992, -66.385961 ], [ 132.934570, -66.385961 ], [ 133.846436, -66.284537 ], [ 134.747314, -66.209308 ], [ 134.769287, -66.160511 ], [ 135.878906, -66.160511 ] ] ] } }
|
||||
@ -2411,6 +2435,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 4, "y": 15 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -67.060547, -82.620052 ], [ -67.060547, -85.088894 ], [ -90.439453, -85.088894 ], [ -90.439453, -82.620052 ], [ -67.060547, -82.620052 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 4, "y": 14 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -78.019409, -79.088462 ], [ -78.024902, -79.171335 ], [ -78.024902, -79.181650 ], [ -76.849365, -79.514661 ], [ -76.635132, -79.886844 ], [ -75.360718, -80.258969 ], [ -73.245850, -80.415707 ], [ -71.444092, -80.689789 ], [ -70.015869, -81.003467 ], [ -68.192139, -81.317447 ], [ -67.500000, -81.361287 ], [ -67.060547, -81.389295 ], [ -67.060547, -82.732092 ], [ -90.439453, -82.732092 ], [ -90.439453, -79.088462 ], [ -78.019409, -79.088462 ] ] ] } }
|
||||
@ -2697,6 +2727,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 6, "y": 15 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -22.060547, -82.620052 ], [ -22.060547, -85.088894 ], [ -45.439453, -85.088894 ], [ -45.439453, -82.620052 ], [ -22.060547, -82.620052 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 6, "y": 14 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -22.060547, -79.088462 ], [ -22.060547, -82.732092 ], [ -45.439453, -82.732092 ], [ -45.439453, -81.811285 ], [ -45.000000, -81.836284 ], [ -44.829712, -81.846419 ], [ -42.813721, -82.081388 ], [ -42.165527, -81.650118 ], [ -40.775757, -81.356335 ], [ -38.248901, -81.336499 ], [ -36.271362, -81.121236 ], [ -34.387207, -80.905879 ], [ -32.310791, -80.768549 ], [ -30.102539, -80.592421 ], [ -28.553467, -80.337653 ], [ -29.256592, -79.984757 ], [ -29.690552, -79.631968 ], [ -29.690552, -79.259730 ], [ -31.629639, -79.298560 ], [ -33.684082, -79.455516 ], [ -35.645142, -79.455516 ], [ -35.853882, -79.171335 ], [ -35.914307, -79.088462 ], [ -22.060547, -79.088462 ] ] ], [ [ [ -43.494873, -79.088462 ], [ -43.472900, -79.171335 ], [ -43.374023, -79.515661 ], [ -43.335571, -80.025752 ], [ -44.884644, -80.339497 ], [ -45.000000, -80.356995 ], [ -45.439453, -80.426676 ], [ -45.439453, -79.088462 ], [ -43.494873, -79.088462 ] ] ] ] } }
|
||||
@ -2737,6 +2773,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 6, "y": 2 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Greenland" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -22.060547, 79.253586 ], [ -22.060547, 73.898111 ], [ -45.439453, 73.898111 ], [ -45.439453, 79.253586 ], [ -22.060547, 79.253586 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 6, "y": 1 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Greenland" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -22.060547, 82.732092 ], [ -22.060547, 82.476146 ], [ -22.500000, 82.383517 ], [ -22.692261, 82.341904 ], [ -26.520996, 82.297857 ], [ -31.904297, 82.200065 ], [ -31.398926, 82.022140 ], [ -27.861328, 82.131931 ], [ -24.845581, 81.786995 ], [ -22.906494, 82.093487 ], [ -22.500000, 81.920099 ], [ -22.077026, 81.735041 ], [ -22.500000, 81.515030 ], [ -23.170166, 81.153396 ], [ -22.500000, 81.253362 ], [ -22.060547, 81.317447 ], [ -22.060547, 79.088462 ], [ -45.439453, 79.088462 ], [ -45.439453, 81.805806 ], [ -45.000000, 81.736620 ], [ -44.527588, 81.661279 ], [ -45.000000, 81.772072 ], [ -45.439453, 81.872865 ], [ -45.439453, 82.732092 ], [ -22.060547, 82.732092 ] ] ] } }
|
||||
@ -2749,6 +2791,18 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 7, "y": 15 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.439453, -82.620052 ], [ 0.439453, -85.088894 ], [ -22.939453, -85.088894 ], [ -22.939453, -82.620052 ], [ 0.439453, -82.620052 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 7, "y": 14 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.439453, -79.088462 ], [ 0.439453, -82.732092 ], [ -22.939453, -82.732092 ], [ -22.939453, -79.088462 ], [ 0.439453, -79.088462 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 7, "y": 13 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.439453, -73.898111 ], [ 0.439453, -79.253586 ], [ -22.939453, -79.253586 ], [ -22.939453, -76.148220 ], [ -22.500000, -76.107392 ], [ -22.461548, -76.104754 ], [ -21.225586, -75.908167 ], [ -20.011597, -75.673557 ], [ -18.918457, -75.437887 ], [ -17.523193, -75.125274 ], [ -16.644287, -74.791702 ], [ -15.704956, -74.497881 ], [ -15.408325, -74.105519 ], [ -15.798340, -74.019543 ], [ -16.347656, -73.898111 ], [ 0.439453, -73.898111 ] ] ] } }
|
||||
@ -2863,6 +2917,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 8, "y": 13 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 22.939453, -73.898111 ], [ 22.939453, -79.253586 ], [ -0.439453, -79.253586 ], [ -0.439453, -73.898111 ], [ 22.939453, -73.898111 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 8, "y": 12 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 18.198853, -69.873672 ], [ 19.259033, -69.892565 ], [ 20.374146, -70.011201 ], [ 21.450806, -70.069330 ], [ 21.917725, -70.401821 ], [ 22.500000, -70.665426 ], [ 22.565918, -70.696320 ], [ 22.939453, -70.636305 ], [ 22.939453, -74.140084 ], [ -0.439453, -74.140084 ], [ -0.439453, -71.439422 ], [ -0.230713, -71.637723 ], [ 0.000000, -71.566641 ], [ 0.867920, -71.304315 ], [ 1.884155, -71.127434 ], [ 4.136353, -70.853683 ], [ 5.152588, -70.618084 ], [ 6.273193, -70.460697 ], [ 7.135620, -70.246460 ], [ 7.739868, -69.892565 ], [ 8.486938, -70.147827 ], [ 9.519653, -70.011201 ], [ 10.244751, -70.480896 ], [ 10.816040, -70.833855 ], [ 11.953125, -70.638127 ], [ 12.403564, -70.246460 ], [ 13.419800, -69.971730 ], [ 14.732666, -70.029970 ], [ 15.122681, -70.401821 ], [ 15.946655, -70.029970 ], [ 17.023315, -69.913328 ], [ 18.198853, -69.873672 ] ] ] } }
|
||||
@ -3063,6 +3123,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 9, "y": 13 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 45.439453, -73.898111 ], [ 45.439453, -79.253586 ], [ 22.060547, -79.253586 ], [ 22.060547, -73.898111 ], [ 45.439453, -73.898111 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 9, "y": 12 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 45.439453, -67.894153 ], [ 45.439453, -74.140084 ], [ 22.060547, -74.140084 ], [ 22.060547, -70.466207 ], [ 22.500000, -70.665426 ], [ 22.565918, -70.696320 ], [ 23.664551, -70.519402 ], [ 24.840088, -70.480896 ], [ 25.977173, -70.480896 ], [ 27.092285, -70.460697 ], [ 28.092041, -70.324288 ], [ 29.146729, -70.205576 ], [ 30.031128, -69.932185 ], [ 30.970459, -69.756155 ], [ 31.986694, -69.657086 ], [ 32.750244, -69.384181 ], [ 33.299561, -68.833785 ], [ 33.865356, -68.502080 ], [ 34.903564, -68.658554 ], [ 35.299072, -69.011579 ], [ 36.161499, -69.246419 ], [ 37.199707, -69.168419 ], [ 37.902832, -69.521069 ], [ 38.644409, -69.775154 ], [ 39.666138, -69.540279 ], [ 40.017700, -69.109736 ], [ 40.918579, -68.932736 ], [ 41.956787, -68.600505 ], [ 42.934570, -68.461783 ], [ 44.110107, -68.267353 ], [ 45.000000, -68.019910 ], [ 45.439453, -67.894153 ] ] ] } }
|
||||
@ -3287,6 +3353,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 10, "y": 13 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 67.939453, -73.898111 ], [ 67.939453, -79.253586 ], [ 44.560547, -79.253586 ], [ 44.560547, -73.898111 ], [ 67.939453, -73.898111 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 10, "y": 12 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 57.172852, -66.337505 ], [ 57.216797, -66.513260 ], [ 57.255249, -66.679087 ], [ 58.134155, -67.011719 ], [ 58.743896, -67.286894 ], [ 59.935913, -67.403266 ], [ 60.600586, -67.678171 ], [ 61.424561, -67.951963 ], [ 62.385864, -68.011685 ], [ 63.187866, -67.815468 ], [ 64.050293, -67.403266 ], [ 64.989624, -67.619681 ], [ 65.967407, -67.736516 ], [ 66.906738, -67.854844 ], [ 67.500000, -67.900354 ], [ 67.890015, -67.933397 ], [ 67.939453, -67.933397 ], [ 67.939453, -70.240890 ], [ 67.807617, -70.303933 ], [ 67.939453, -70.679970 ], [ 67.939453, -74.140084 ], [ 44.560547, -74.140084 ], [ 44.560547, -68.140897 ], [ 45.000000, -68.019910 ], [ 45.719604, -67.815468 ], [ 46.499634, -67.600849 ], [ 47.438965, -67.717778 ], [ 48.339844, -67.365243 ], [ 48.988037, -67.090966 ], [ 49.927368, -67.110204 ], [ 50.751343, -66.874030 ], [ 50.949097, -66.522016 ], [ 50.971069, -66.513260 ], [ 51.509399, -66.337505 ], [ 57.172852, -66.337505 ] ] ] } }
|
||||
@ -3409,6 +3481,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 11, "y": 13 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 90.439453, -73.898111 ], [ 90.439453, -79.253586 ], [ 67.060547, -79.253586 ], [ 67.060547, -73.898111 ], [ 90.439453, -73.898111 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 11, "y": 12 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 88.154297, -66.337505 ], [ 88.357544, -66.482592 ], [ 88.385010, -66.513260 ], [ 88.824463, -66.953727 ], [ 89.670410, -67.148632 ], [ 90.000000, -67.174217 ], [ 90.439453, -67.210416 ], [ 90.439453, -74.140084 ], [ 67.060547, -74.140084 ], [ 67.060547, -67.865195 ], [ 67.500000, -67.900354 ], [ 67.890015, -67.933397 ], [ 68.889771, -67.933397 ], [ 69.708252, -68.972193 ], [ 69.669800, -69.226945 ], [ 69.554443, -69.678082 ], [ 68.593140, -69.932185 ], [ 67.807617, -70.303933 ], [ 67.944946, -70.696320 ], [ 69.065552, -70.676335 ], [ 68.928223, -71.068711 ], [ 68.417358, -71.441171 ], [ 67.944946, -71.852807 ], [ 68.708496, -72.166669 ], [ 69.867554, -72.263983 ], [ 71.021118, -72.087432 ], [ 71.570435, -71.696469 ], [ 71.905518, -71.323674 ], [ 72.449341, -71.009811 ], [ 73.081055, -70.716285 ], [ 73.333740, -70.363091 ], [ 73.861084, -69.873672 ], [ 74.487305, -69.775154 ], [ 75.624390, -69.735237 ], [ 76.624146, -69.618859 ], [ 77.640381, -69.461408 ], [ 78.129272, -69.070526 ], [ 78.425903, -68.696505 ], [ 79.112549, -68.324234 ], [ 80.090332, -68.071253 ], [ 80.930786, -67.875541 ], [ 81.480103, -67.542167 ], [ 82.051392, -67.365243 ], [ 82.770996, -67.208289 ], [ 83.770752, -67.305976 ], [ 84.671631, -67.208289 ], [ 85.654907, -67.090966 ], [ 86.748047, -67.148632 ], [ 87.473145, -66.874030 ], [ 87.747803, -66.513260 ], [ 87.885132, -66.337505 ], [ 88.154297, -66.337505 ] ] ] } }
|
||||
@ -3499,6 +3577,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 12, "y": 13 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 112.939453, -73.898111 ], [ 112.939453, -79.253586 ], [ 89.560547, -79.253586 ], [ 89.560547, -73.898111 ], [ 112.939453, -73.898111 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 12, "y": 12 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 112.939453, -66.337505 ], [ 112.939453, -74.140084 ], [ 89.560547, -74.140084 ], [ 89.560547, -67.123020 ], [ 89.670410, -67.148632 ], [ 90.000000, -67.174217 ], [ 90.626221, -67.227433 ], [ 91.587524, -67.110204 ], [ 92.603760, -67.189129 ], [ 93.548584, -67.208289 ], [ 94.174805, -67.110204 ], [ 95.015259, -67.169955 ], [ 95.778809, -67.384262 ], [ 96.679688, -67.246561 ], [ 97.756348, -67.246561 ], [ 98.679199, -67.110204 ], [ 99.717407, -67.246561 ], [ 100.382080, -66.914988 ], [ 100.892944, -66.581034 ], [ 101.057739, -66.513260 ], [ 101.497192, -66.337505 ], [ 104.930420, -66.337505 ], [ 105.292969, -66.513260 ], [ 106.177368, -66.934365 ], [ 107.160645, -66.953727 ], [ 108.078003, -66.953727 ], [ 109.154663, -66.835165 ], [ 110.231323, -66.698651 ], [ 110.786133, -66.513260 ], [ 111.055298, -66.423340 ], [ 111.253052, -66.337505 ], [ 112.939453, -66.337505 ] ] ] } }
|
||||
@ -3569,6 +3653,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 12, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Russia" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 112.939453, 66.687784 ], [ 112.939453, 55.528631 ], [ 89.560547, 55.528631 ], [ 89.560547, 66.687784 ], [ 112.939453, 66.687784 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 12, "y": 3 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Russia" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 109.753418, 74.140084 ], [ 110.637817, 74.040702 ], [ 110.758667, 74.019543 ], [ 112.115479, 73.788054 ], [ 112.500000, 73.869139 ], [ 112.939453, 73.961974 ], [ 112.939453, 66.337505 ], [ 89.560547, 66.337505 ], [ 89.560547, 74.140084 ], [ 109.753418, 74.140084 ] ] ] } }
|
||||
@ -3587,6 +3677,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 13, "y": 13 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.439453, -73.898111 ], [ 135.439453, -79.253586 ], [ 112.060547, -79.253586 ], [ 112.060547, -73.898111 ], [ 135.439453, -73.898111 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 13, "y": 12 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.439453, -66.337505 ], [ 135.439453, -74.140084 ], [ 112.060547, -74.140084 ], [ 112.060547, -66.337505 ], [ 114.812622, -66.337505 ], [ 114.895020, -66.385961 ], [ 115.175171, -66.513260 ], [ 115.598145, -66.698651 ], [ 116.696777, -66.659507 ], [ 117.383423, -66.914988 ], [ 118.575439, -67.169955 ], [ 119.827881, -67.267798 ], [ 120.866089, -67.189129 ], [ 121.651611, -66.874030 ], [ 122.316284, -66.561377 ], [ 122.865601, -66.513260 ], [ 123.217163, -66.482592 ], [ 123.414917, -66.513260 ], [ 124.118042, -66.620302 ], [ 125.156250, -66.718199 ], [ 126.095581, -66.561377 ], [ 126.996460, -66.561377 ], [ 128.798218, -66.757250 ], [ 129.699097, -66.581034 ], [ 130.160522, -66.513260 ], [ 130.781250, -66.423340 ], [ 131.797485, -66.385961 ], [ 132.934570, -66.385961 ], [ 133.379517, -66.337505 ], [ 135.439453, -66.337505 ] ] ] } }
|
||||
@ -3657,6 +3753,12 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 13, "y": 4 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Russia" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.439453, 66.687784 ], [ 135.439453, 55.528631 ], [ 112.060547, 55.528631 ], [ 112.060547, 66.687784 ], [ 135.439453, 66.687784 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 13, "y": 3 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Russia" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 113.016357, 73.977144 ], [ 113.527222, 73.335736 ], [ 113.966675, 73.595241 ], [ 115.565186, 73.754279 ], [ 118.773193, 73.589034 ], [ 119.014893, 73.120161 ], [ 123.195190, 72.972798 ], [ 123.255615, 73.735828 ], [ 125.375977, 73.561076 ], [ 126.974487, 73.565739 ], [ 128.589478, 73.040226 ], [ 129.050903, 72.399028 ], [ 128.457642, 71.980687 ], [ 129.715576, 71.193067 ], [ 131.286621, 70.788717 ], [ 132.253418, 71.837403 ], [ 133.857422, 71.386895 ], [ 135.439453, 71.637723 ], [ 135.439453, 66.337505 ], [ 112.060547, 66.337505 ], [ 112.060547, 73.798786 ], [ 112.115479, 73.788054 ], [ 112.500000, 73.869139 ], [ 113.016357, 73.977144 ] ] ] } }
|
||||
@ -3669,6 +3771,24 @@
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 15 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.939453, -82.620052 ], [ 157.939453, -85.088894 ], [ 134.560547, -85.088894 ], [ 134.560547, -82.620052 ], [ 157.939453, -82.620052 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 14 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.939453, -79.088462 ], [ 157.939453, -82.732092 ], [ 134.560547, -82.732092 ], [ 134.560547, -79.088462 ], [ 157.939453, -79.088462 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 13 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 157.939453, -73.898111 ], [ 157.939453, -79.253586 ], [ 134.560547, -79.253586 ], [ 134.560547, -73.898111 ], [ 157.939453, -73.898111 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 4, "x": 14, "y": 12 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Antarctica" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 136.115112, -66.337505 ], [ 136.203003, -66.443107 ], [ 136.285400, -66.513260 ], [ 136.614990, -66.776752 ], [ 137.455444, -66.953727 ], [ 138.592529, -66.895596 ], [ 139.905396, -66.874030 ], [ 140.806274, -66.815710 ], [ 142.119141, -66.815710 ], [ 143.058472, -66.796238 ], [ 144.371338, -66.835165 ], [ 145.486450, -66.914988 ], [ 146.195068, -67.227433 ], [ 145.997314, -67.600849 ], [ 146.645508, -67.894153 ], [ 147.722168, -68.128622 ], [ 148.837280, -68.385020 ], [ 150.128174, -68.560384 ], [ 151.479492, -68.716453 ], [ 152.501221, -68.873419 ], [ 153.632812, -68.893209 ], [ 154.281006, -68.560384 ], [ 155.165405, -68.833785 ], [ 155.928955, -69.148876 ], [ 156.807861, -69.384181 ], [ 157.500000, -69.438269 ], [ 157.939453, -69.472969 ], [ 157.939453, -74.140084 ], [ 134.560547, -74.140084 ], [ 134.560547, -66.337505 ], [ 136.115112, -66.337505 ] ] ] } }
|
||||
|
120
tile.cpp
120
tile.cpp
@ -1312,7 +1312,44 @@ void remove_attributes(serial_feature &sf, std::set<std::string> const &exclude_
|
||||
}
|
||||
}
|
||||
|
||||
serial_feature next_feature(FILE *geoms, std::atomic<long long> *geompos_in, char *metabase, long long *meta_off, int z, unsigned tx, unsigned ty, unsigned *initial_x, unsigned *initial_y, long long *original_features, long long *unclipped_features, int nextzoom, int maxzoom, int minzoom, int max_zoom_increment, size_t pass, size_t passes, std::atomic<long long> *along, long long alongminus, int buffer, int *within, bool *first_time, FILE **geomfile, std::atomic<long long> *geompos, std::atomic<double> *oprogress, double todo, const char *fname, int child_shards, struct json_object *filter, const char *stringpool, long long *pool_off, std::vector<std::vector<std::string>> *layer_unmaps) {
|
||||
bool is_filled(serial_feature &sf, int z) {
|
||||
long long extent = 1LL << (32 - z);
|
||||
|
||||
if (prevent[P_FILLED]) {
|
||||
if (sf.t != VT_POLYGON || sf.geometry.size() != 5) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// It is a polygon with four sides.
|
||||
// Are they all outside the tile boundary?
|
||||
|
||||
for (size_t j = 0; j + 1 < sf.geometry.size(); j++) {
|
||||
if (sf.geometry[j].x == sf.geometry[j + 1].x && (sf.geometry[j].x < 0 || sf.geometry[j].x > extent)) {
|
||||
// vertical line, outside the edge of the tile
|
||||
|
||||
if (!((sf.geometry[j].y < 0 && sf.geometry[j + 1].y > extent) ||
|
||||
(sf.geometry[j + 1].y < 0 && sf.geometry[j].y > extent))) {
|
||||
return false;
|
||||
}
|
||||
} else if (sf.geometry[j].y == sf.geometry[j + 1].y && (sf.geometry[j].y < 0 || sf.geometry[j].y > extent)) {
|
||||
// horizontal line, outside the edge of the tile
|
||||
|
||||
if (!((sf.geometry[j].x < 0 && sf.geometry[j + 1].x > extent) ||
|
||||
(sf.geometry[j + 1].x < 0 && sf.geometry[j].x > extent))) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
serial_feature next_feature(FILE *geoms, std::atomic<long long> *geompos_in, char *metabase, long long *meta_off, int z, unsigned tx, unsigned ty, unsigned *initial_x, unsigned *initial_y, long long *original_features, long long *unclipped_features, int nextzoom, int maxzoom, int minzoom, int max_zoom_increment, size_t pass, size_t passes, std::atomic<long long> *along, long long alongminus, int buffer, int *within, bool *first_time, FILE **geomfile, std::atomic<long long> *geompos, std::atomic<double> *oprogress, double todo, const char *fname, int child_shards, struct json_object *filter, const char *stringpool, long long *pool_off, std::vector<std::vector<std::string>> *layer_unmaps, std::vector<serial_feature> *rewrite_queue, bool *is_rewriting) {
|
||||
while (1) {
|
||||
serial_feature sf = deserialize_feature(geoms, geompos_in, metabase, meta_off, z, tx, ty, initial_x, initial_y);
|
||||
if (sf.t < 0) {
|
||||
@ -1339,7 +1376,26 @@ serial_feature next_feature(FILE *geoms, std::atomic<long long> *geompos_in, cha
|
||||
|
||||
if (*first_time && pass == 1) { /* only write out the next zoom once, even if we retry */
|
||||
if (sf.tippecanoe_maxzoom == -1 || sf.tippecanoe_maxzoom >= nextzoom) {
|
||||
rewrite(sf.geometry, z, nextzoom, maxzoom, sf.bbox, tx, ty, buffer, within, geompos, geomfile, fname, sf.t, sf.layer, sf.metapos, sf.feature_minzoom, child_shards, max_zoom_increment, sf.seq, sf.tippecanoe_minzoom, sf.tippecanoe_maxzoom, sf.segment, initial_x, initial_y, sf.keys, sf.values, sf.has_id, sf.id, sf.index, sf.extent);
|
||||
if (!*is_rewriting) {
|
||||
if (is_filled(sf, z)) {
|
||||
rewrite_queue->push_back(sf);
|
||||
} else {
|
||||
// Found a feature that we need to keep, so also push out all the
|
||||
// filled features that we weren't sure about before.
|
||||
|
||||
*is_rewriting = true;
|
||||
|
||||
for (auto &rsf : *rewrite_queue) {
|
||||
rewrite(rsf.geometry, z, nextzoom, maxzoom, rsf.bbox, tx, ty, buffer, within, geompos, geomfile, fname, rsf.t, rsf.layer, rsf.metapos, rsf.feature_minzoom, child_shards, max_zoom_increment, rsf.seq, rsf.tippecanoe_minzoom, rsf.tippecanoe_maxzoom, rsf.segment, initial_x, initial_y, rsf.keys, rsf.values, rsf.has_id, rsf.id, rsf.index, rsf.extent);
|
||||
}
|
||||
|
||||
rewrite_queue->clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (*is_rewriting) {
|
||||
rewrite(sf.geometry, z, nextzoom, maxzoom, sf.bbox, tx, ty, buffer, within, geompos, geomfile, fname, sf.t, sf.layer, sf.metapos, sf.feature_minzoom, child_shards, max_zoom_increment, sf.seq, sf.tippecanoe_minzoom, sf.tippecanoe_maxzoom, sf.segment, initial_x, initial_y, sf.keys, sf.values, sf.has_id, sf.id, sf.index, sf.extent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1473,6 +1529,8 @@ struct run_prefilter_args {
|
||||
long long *pool_off = NULL;
|
||||
FILE *prefilter_fp = NULL;
|
||||
struct json_object *filter = NULL;
|
||||
std::vector<serial_feature> *rewrite_queue;
|
||||
bool *is_rewriting;
|
||||
};
|
||||
|
||||
void *run_prefilter(void *v) {
|
||||
@ -1480,7 +1538,7 @@ void *run_prefilter(void *v) {
|
||||
json_writer state(rpa->prefilter_fp);
|
||||
|
||||
while (1) {
|
||||
serial_feature sf = next_feature(rpa->geoms, rpa->geompos_in, rpa->metabase, rpa->meta_off, rpa->z, rpa->tx, rpa->ty, rpa->initial_x, rpa->initial_y, rpa->original_features, rpa->unclipped_features, rpa->nextzoom, rpa->maxzoom, rpa->minzoom, rpa->max_zoom_increment, rpa->pass, rpa->passes, rpa->along, rpa->alongminus, rpa->buffer, rpa->within, rpa->first_time, rpa->geomfile, rpa->geompos, rpa->oprogress, rpa->todo, rpa->fname, rpa->child_shards, rpa->filter, rpa->stringpool, rpa->pool_off, rpa->layer_unmaps);
|
||||
serial_feature sf = next_feature(rpa->geoms, rpa->geompos_in, rpa->metabase, rpa->meta_off, rpa->z, rpa->tx, rpa->ty, rpa->initial_x, rpa->initial_y, rpa->original_features, rpa->unclipped_features, rpa->nextzoom, rpa->maxzoom, rpa->minzoom, rpa->max_zoom_increment, rpa->pass, rpa->passes, rpa->along, rpa->alongminus, rpa->buffer, rpa->within, rpa->first_time, rpa->geomfile, rpa->geompos, rpa->oprogress, rpa->todo, rpa->fname, rpa->child_shards, rpa->filter, rpa->stringpool, rpa->pool_off, rpa->layer_unmaps, rpa->rewrite_queue, rpa->is_rewriting);
|
||||
if (sf.t < 0) {
|
||||
break;
|
||||
}
|
||||
@ -1746,6 +1804,9 @@ long long write_tile(FILE *geoms, std::atomic<long long> *geompos_in, char *meta
|
||||
bool has_polygons = false;
|
||||
|
||||
bool first_time = true;
|
||||
std::vector<serial_feature> rewrite_queue;
|
||||
bool is_rewriting = false;
|
||||
|
||||
// This only loops if the tile data didn't fit, in which case the detail
|
||||
// goes down and the progress indicator goes backward for the next try.
|
||||
for (line_detail = detail; line_detail >= min_detail || line_detail == detail; line_detail--, oprogress = 0) {
|
||||
@ -1839,6 +1900,8 @@ long long write_tile(FILE *geoms, std::atomic<long long> *geompos_in, char *meta
|
||||
rpa.stringpool = stringpool;
|
||||
rpa.pool_off = pool_off;
|
||||
rpa.filter = filter;
|
||||
rpa.rewrite_queue = &rewrite_queue;
|
||||
rpa.is_rewriting = &is_rewriting;
|
||||
|
||||
if (pthread_create(&prefilter_writer, NULL, run_prefilter, &rpa) != 0) {
|
||||
perror("pthread_create (prefilter writer)");
|
||||
@ -1858,7 +1921,7 @@ long long write_tile(FILE *geoms, std::atomic<long long> *geompos_in, char *meta
|
||||
ssize_t which_partial = -1;
|
||||
|
||||
if (prefilter == NULL) {
|
||||
sf = next_feature(geoms, geompos_in, metabase, meta_off, z, tx, ty, initial_x, initial_y, &original_features, &unclipped_features, nextzoom, maxzoom, minzoom, max_zoom_increment, pass, passes, along, alongminus, buffer, within, &first_time, geomfile, geompos, &oprogress, todo, fname, child_shards, filter, stringpool, pool_off, layer_unmaps);
|
||||
sf = next_feature(geoms, geompos_in, metabase, meta_off, z, tx, ty, initial_x, initial_y, &original_features, &unclipped_features, nextzoom, maxzoom, minzoom, max_zoom_increment, pass, passes, along, alongminus, buffer, within, &first_time, geomfile, geompos, &oprogress, todo, fname, child_shards, filter, stringpool, pool_off, layer_unmaps, &rewrite_queue, &is_rewriting);
|
||||
} else {
|
||||
sf = parse_feature(prefilter_jp, z, tx, ty, layermaps, tiling_seg, layer_unmaps, postfilter != NULL);
|
||||
}
|
||||
@ -2126,55 +2189,6 @@ long long write_tile(FILE *geoms, std::atomic<long long> *geompos_in, char *meta
|
||||
}
|
||||
}
|
||||
|
||||
bool remove_filled = false;
|
||||
if (prevent[P_FILLED]) {
|
||||
remove_filled = true;
|
||||
|
||||
for (size_t i = 0; i < partials.size(); i++) {
|
||||
if (partials[i].t != VT_POLYGON ||
|
||||
partials[i].geoms.size() != 1 ||
|
||||
partials[i].geoms[0].size() != 5) {
|
||||
remove_filled = false;
|
||||
break;
|
||||
}
|
||||
|
||||
// It is a polygon with four sides.
|
||||
// Are they all outside the tile boundary?
|
||||
|
||||
for (size_t j = 0; j + 1 < partials[i].geoms[0].size(); j++) {
|
||||
if (partials[i].geoms[0][j].x == partials[i].geoms[0][j + 1].x &&
|
||||
(partials[i].geoms[0][j].x < 0 || partials[i].geoms[0][j].x > partials[i].extent)) {
|
||||
// vertical line, outside the edge of the tile
|
||||
|
||||
if (!((partials[i].geoms[0][j].y < 0 &&
|
||||
partials[i].geoms[0][j + 1].y > partials[i].extent) ||
|
||||
(partials[i].geoms[0][j + 1].y < 0 &&
|
||||
partials[i].geoms[0][j].y > partials[i].extent))) {
|
||||
remove_filled = false;
|
||||
break;
|
||||
}
|
||||
} else if (partials[i].geoms[0][j].y == partials[i].geoms[0][j + 1].y &&
|
||||
(partials[i].geoms[0][j].y < 0 || partials[i].geoms[0][j].y > partials[i].extent)) {
|
||||
// horizontal line, outside the edge of the tile
|
||||
|
||||
if (!((partials[i].geoms[0][j].x < 0 &&
|
||||
partials[i].geoms[0][j + 1].x > partials[i].extent) ||
|
||||
(partials[i].geoms[0][j + 1].x < 0 &&
|
||||
partials[i].geoms[0][j].x > partials[i].extent))) {
|
||||
remove_filled = false;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
remove_filled = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (remove_filled) {
|
||||
partials.clear();
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < partials.size(); i++) {
|
||||
std::vector<drawvec> &pgeoms = partials[i].geoms;
|
||||
signed char t = partials[i].t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user