From e8c48c0fad41fb6c88dfc1725a2785fe2f9558b3 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Tue, 23 May 2023 11:23:17 -0700 Subject: [PATCH] Restore non-Wagyu polygon clipping from prior to 2fdec7d2 --- geometry.cpp | 126 +++++++++++++++--- ...z0_--clip-bounding-box_-110,27,-92,52.json | 4 +- ...5_-M5000_--coalesce-densest-as-needed.json | 2 +- ..._-M5000_--coalesce-fraction-as-needed.json | 2 +- ..._-M5000_--coalesce-smallest-as-needed.json | 2 +- .../-z5_-M5000_--drop-smallest-as-needed.json | 2 +- .../out/-pk_-pf_-Z9_-z12_-ldata.json | 2 +- 7 files changed, 112 insertions(+), 28 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index ba33d110..7d46bc00 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -545,13 +545,103 @@ drawvec close_poly(drawvec &geom) { return out; } +static bool inside(draw d, int edge, long long minx, long long miny, long long maxx, long long maxy) { + switch (edge) { + case 0: // top + return d.y > miny; + + case 1: // right + return d.x < maxx; + + case 2: // bottom + return d.y < maxy; + + case 3: // left + return d.x > minx; + } + + fprintf(stderr, "internal error inside\n"); + exit(EXIT_FAILURE); +} + +static draw intersect(draw a, draw b, int edge, long long minx, long long miny, long long maxx, long long maxy) { + // The casts to double are because the product of coordinates + // can overflow a long long if the tile buffer is large. + + switch (edge) { + case 0: // top + return draw(VT_LINETO, a.x + (double) (b.x - a.x) * (miny - a.y) / (b.y - a.y), miny); + + case 1: // right + return draw(VT_LINETO, maxx, a.y + (double) (b.y - a.y) * (maxx - a.x) / (b.x - a.x)); + + case 2: // bottom + return draw(VT_LINETO, a.x + (double) (b.x - a.x) * (maxy - a.y) / (b.y - a.y), maxy); + + case 3: // left + return draw(VT_LINETO, minx, a.y + (double) (b.y - a.y) * (minx - a.x) / (b.x - a.x)); + } + + fprintf(stderr, "internal error intersecting\n"); + exit(EXIT_FAILURE); +} + +// http://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm +static drawvec clip_poly1(drawvec &geom, long long minx, long long miny, long long maxx, long long maxy) { + drawvec out = geom; + + for (int edge = 0; edge < 4; edge++) { + if (out.size() > 0) { + drawvec in = out; + out.resize(0); + + draw S = in[in.size() - 1]; + + for (size_t e = 0; e < in.size(); e++) { + draw E = in[e]; + + if (inside(E, edge, minx, miny, maxx, maxy)) { + if (!inside(S, edge, minx, miny, maxx, maxy)) { + out.push_back(intersect(S, E, edge, minx, miny, maxx, maxy)); + } + out.push_back(E); + } else if (inside(S, edge, minx, miny, maxx, maxy)) { + out.push_back(intersect(S, E, edge, minx, miny, maxx, maxy)); + } + + S = E; + } + } + } + + if (out.size() > 0) { + // If the polygon begins and ends outside the edge, + // the starting and ending points will be left as the + // places where it intersects the edge. Need to add + // another point to close the loop. + + if (out[0].x != out[out.size() - 1].x || out[0].y != out[out.size() - 1].y) { + out.push_back(out[0]); + } + + if (out.size() < 3) { + // fprintf(stderr, "Polygon degenerated to a line segment\n"); + out.clear(); + return out; + } + + out[0].op = VT_MOVETO; + for (size_t i = 1; i < out.size(); i++) { + out[i].op = VT_LINETO; + } + } + + return out; +} + drawvec simple_clip_poly(drawvec &geom, long long minx, long long miny, long long maxx, long long maxy) { drawvec out; - mapbox::geometry::point min(minx, miny); - mapbox::geometry::point max(maxx, maxy); - mapbox::geometry::box bbox(min, max); - for (size_t i = 0; i < geom.size(); i++) { if (geom[i].op == VT_MOVETO) { size_t j; @@ -561,31 +651,25 @@ drawvec simple_clip_poly(drawvec &geom, long long minx, long long miny, long lon } } - mapbox::geometry::linear_ring ring; + drawvec tmp; for (size_t k = i; k < j; k++) { - ring.push_back(mapbox::geometry::point(geom[k].x, geom[k].y)); + tmp.push_back(geom[k]); } - - mapbox::geometry::linear_ring lr = mapbox::geometry::wagyu::quick_clip::quick_lr_clip(ring, bbox); - - if (lr.size() > 0) { - for (size_t k = 0; k < lr.size(); k++) { - if (k == 0) { - out.push_back(draw(VT_MOVETO, lr[k].x, lr[k].y)); - } else { - out.push_back(draw(VT_LINETO, lr[k].x, lr[k].y)); - } - } - - if (lr.size() > 0 && lr[0] != lr[lr.size() - 1]) { - out.push_back(draw(VT_LINETO, lr[0].x, lr[0].y)); + tmp = clip_poly1(tmp, minx, miny, maxx, maxy); + if (tmp.size() > 0) { + if (tmp[0].x != tmp[tmp.size() - 1].x || tmp[0].y != tmp[tmp.size() - 1].y) { + fprintf(stderr, "Internal error: Polygon ring not closed\n"); + exit(EXIT_FAILURE); } } + for (size_t k = 0; k < tmp.size(); k++) { + out.push_back(tmp[k]); + } i = j - 1; } else { fprintf(stderr, "Unexpected operation in polygon %d\n", (int) geom[i].op); - exit(EXIT_IMPOSSIBLE); + exit(EXIT_FAILURE); } } diff --git a/tests/ne_110m_admin_0_countries/out/-z0_--clip-bounding-box_-110,27,-92,52.json b/tests/ne_110m_admin_0_countries/out/-z0_--clip-bounding-box_-110,27,-92,52.json index a17b02f4..124d1bde 100644 --- a/tests/ne_110m_admin_0_countries/out/-z0_--clip-bounding-box_-110,27,-92,52.json +++ b/tests/ne_110m_admin_0_countries/out/-z0_--clip-bounding-box_-110,27,-92,52.json @@ -16,9 +16,9 @@ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ { "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Canada", "sov_a3": "CAN", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Canada", "adm0_a3": "CAN", "geou_dif": 0, "geounit": "Canada", "gu_a3": "CAN", "su_dif": 0, "subunit": "Canada", "su_a3": "CAN", "brk_diff": 0, "name": "Canada", "name_long": "Canada", "brk_a3": "CAN", "brk_name": "Canada", "abbrev": "Can.", "postal": "CA", "formal_en": "Canada", "name_sort": "Canada", "mapcolor7": 6, "mapcolor8": 6, "mapcolor9": 2, "mapcolor13": 2, "pop_est": 33487208, "gdp_md_est": 1300000, "pop_year": -99, "lastcensus": 2011, "gdp_year": -99, "economy": "1. Developed region: G7", "income_grp": "1. High income: OECD", "wikipedia": -99, "iso_a2": "CA", "iso_a3": "CAN", "iso_n3": "124", "un_a3": "124", "wb_a2": "CA", "wb_a3": "CAN", "woe_id": -99, "adm0_a3_is": "CAN", "adm0_a3_us": "CAN", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "North America", "region_un": "Americas", "subregion": "Northern America", "region_wb": "North America", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -92.021484, 51.998410 ], [ -92.021484, 48.283193 ], [ -93.603516, 48.632909 ], [ -94.306641, 48.690960 ], [ -94.658203, 48.864715 ], [ -94.833984, 49.382373 ], [ -95.185547, 49.382373 ], [ -95.185547, 48.980217 ], [ -110.039062, 48.980217 ], [ -110.039062, 51.998410 ], [ -92.021484, 51.998410 ] ] ] } } , -{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Mexico", "sov_a3": "MEX", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Mexico", "adm0_a3": "MEX", "geou_dif": 0, "geounit": "Mexico", "gu_a3": "MEX", "su_dif": 0, "subunit": "Mexico", "su_a3": "MEX", "brk_diff": 0, "name": "Mexico", "name_long": "Mexico", "brk_a3": "MEX", "brk_name": "Mexico", "abbrev": "Mex.", "postal": "MX", "formal_en": "United Mexican States", "name_sort": "Mexico", "mapcolor7": 6, "mapcolor8": 1, "mapcolor9": 7, "mapcolor13": 3, "pop_est": 111211789, "gdp_md_est": 1563000, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "4. Emerging region: MIKT", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "MX", "iso_a3": "MEX", "iso_n3": "484", "un_a3": "484", "wb_a2": "MX", "wb_a3": "MEX", "woe_id": -99, "adm0_a3_is": "MEX", "adm0_a3_us": "MEX", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "North America", "region_un": "Americas", "subregion": "Central America", "region_wb": "Latin America & Caribbean", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -106.523438, 31.728167 ], [ -105.029297, 30.675715 ], [ -104.414062, 29.535230 ], [ -103.095703, 28.998532 ], [ -102.480469, 29.764377 ], [ -101.689453, 29.764377 ], [ -100.986328, 29.382175 ], [ -100.107422, 28.071980 ], [ -99.492188, 27.527758 ], [ -99.316406, 26.980829 ], [ -110.039062, 26.980829 ], [ -110.039062, 31.353637 ], [ -108.281250, 31.353637 ], [ -108.281250, 31.728167 ], [ -106.523438, 31.728167 ] ] ] } } +{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "United States of America", "sov_a3": "US1", "adm0_dif": 1, "level": 2, "type": "Country", "admin": "United States of America", "adm0_a3": "USA", "geou_dif": 0, "geounit": "United States of America", "gu_a3": "USA", "su_dif": 0, "subunit": "United States of America", "su_a3": "USA", "brk_diff": 0, "name": "United States", "name_long": "United States", "brk_a3": "USA", "brk_name": "United States", "abbrev": "U.S.A.", "postal": "US", "formal_en": "United States of America", "name_sort": "United States of America", "mapcolor7": 4, "mapcolor8": 5, "mapcolor9": 1, "mapcolor13": 1, "pop_est": 313973000, "gdp_md_est": 15094000, "pop_year": 0, "lastcensus": 2010, "gdp_year": 0, "economy": "1. Developed region: G7", "income_grp": "1. High income: OECD", "wikipedia": 0, "iso_a2": "US", "iso_a3": "USA", "iso_n3": "840", "un_a3": "840", "wb_a2": "US", "wb_a3": "USA", "woe_id": -99, "adm0_a3_is": "USA", "adm0_a3_us": "USA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "North America", "region_un": "Americas", "subregion": "Northern America", "region_wb": "North America", "name_len": 13, "long_len": 13, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -94.833984, 49.382373 ], [ -94.658203, 48.864715 ], [ -94.306641, 48.690960 ], [ -93.603516, 48.632909 ], [ -92.021484, 48.283193 ], [ -92.021484, 29.688053 ], [ -92.460938, 29.535230 ], [ -93.251953, 29.764377 ], [ -94.658203, 29.458731 ], [ -95.625000, 28.767659 ], [ -96.591797, 28.304381 ], [ -97.119141, 27.839076 ], [ -97.382812, 27.371767 ], [ -97.382812, 26.980829 ], [ -99.404297, 26.980829 ], [ -99.492188, 27.527758 ], [ -100.107422, 28.071980 ], [ -100.986328, 29.382175 ], [ -101.689453, 29.764377 ], [ -102.480469, 29.764377 ], [ -103.095703, 28.998532 ], [ -103.974609, 29.305561 ], [ -104.414062, 29.535230 ], [ -105.029297, 30.675715 ], [ -106.523438, 31.728167 ], [ -108.281250, 31.728167 ], [ -108.281250, 31.353637 ], [ -110.039062, 31.353637 ], [ -110.039062, 48.980217 ], [ -95.185547, 48.980217 ], [ -95.185547, 49.382373 ], [ -94.833984, 49.382373 ] ] ] } } , -{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "United States of America", "sov_a3": "US1", "adm0_dif": 1, "level": 2, "type": "Country", "admin": "United States of America", "adm0_a3": "USA", "geou_dif": 0, "geounit": "United States of America", "gu_a3": "USA", "su_dif": 0, "subunit": "United States of America", "su_a3": "USA", "brk_diff": 0, "name": "United States", "name_long": "United States", "brk_a3": "USA", "brk_name": "United States", "abbrev": "U.S.A.", "postal": "US", "formal_en": "United States of America", "name_sort": "United States of America", "mapcolor7": 4, "mapcolor8": 5, "mapcolor9": 1, "mapcolor13": 1, "pop_est": 313973000, "gdp_md_est": 15094000, "pop_year": 0, "lastcensus": 2010, "gdp_year": 0, "economy": "1. Developed region: G7", "income_grp": "1. High income: OECD", "wikipedia": 0, "iso_a2": "US", "iso_a3": "USA", "iso_n3": "840", "un_a3": "840", "wb_a2": "US", "wb_a3": "USA", "woe_id": -99, "adm0_a3_is": "USA", "adm0_a3_us": "USA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "North America", "region_un": "Americas", "subregion": "Northern America", "region_wb": "North America", "name_len": 13, "long_len": 13, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -94.833984, 49.382373 ], [ -94.658203, 48.864715 ], [ -94.306641, 48.690960 ], [ -93.603516, 48.632909 ], [ -92.021484, 48.283193 ], [ -92.021484, 29.611670 ], [ -92.460938, 29.535230 ], [ -93.251953, 29.764377 ], [ -94.658203, 29.458731 ], [ -95.625000, 28.767659 ], [ -96.591797, 28.304381 ], [ -97.119141, 27.839076 ], [ -97.382812, 27.371767 ], [ -97.382812, 26.980829 ], [ -99.316406, 26.980829 ], [ -99.492188, 27.527758 ], [ -100.107422, 28.071980 ], [ -100.986328, 29.382175 ], [ -101.689453, 29.764377 ], [ -102.480469, 29.764377 ], [ -103.095703, 28.998532 ], [ -103.974609, 29.305561 ], [ -104.414062, 29.535230 ], [ -105.029297, 30.675715 ], [ -106.523438, 31.728167 ], [ -108.281250, 31.728167 ], [ -108.281250, 31.353637 ], [ -110.039062, 31.353637 ], [ -110.039062, 48.980217 ], [ -95.185547, 48.980217 ], [ -95.185547, 49.382373 ], [ -94.833984, 49.382373 ] ] ] } } +{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Mexico", "sov_a3": "MEX", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Mexico", "adm0_a3": "MEX", "geou_dif": 0, "geounit": "Mexico", "gu_a3": "MEX", "su_dif": 0, "subunit": "Mexico", "su_a3": "MEX", "brk_diff": 0, "name": "Mexico", "name_long": "Mexico", "brk_a3": "MEX", "brk_name": "Mexico", "abbrev": "Mex.", "postal": "MX", "formal_en": "United Mexican States", "name_sort": "Mexico", "mapcolor7": 6, "mapcolor8": 1, "mapcolor9": 7, "mapcolor13": 3, "pop_est": 111211789, "gdp_md_est": 1563000, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "4. Emerging region: MIKT", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "MX", "iso_a3": "MEX", "iso_n3": "484", "un_a3": "484", "wb_a2": "MX", "wb_a3": "MEX", "woe_id": -99, "adm0_a3_is": "MEX", "adm0_a3_us": "MEX", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "North America", "region_un": "Americas", "subregion": "Central America", "region_wb": "Latin America & Caribbean", "name_len": 6, "long_len": 6, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -106.523438, 31.728167 ], [ -105.029297, 30.675715 ], [ -104.414062, 29.535230 ], [ -103.095703, 28.998532 ], [ -102.480469, 29.764377 ], [ -101.689453, 29.764377 ], [ -100.986328, 29.382175 ], [ -100.107422, 28.071980 ], [ -99.492188, 27.527758 ], [ -99.404297, 26.980829 ], [ -110.039062, 26.980829 ], [ -110.039062, 31.353637 ], [ -108.281250, 31.353637 ], [ -108.281250, 31.728167 ], [ -106.523438, 31.728167 ] ] ] } } ] } ] } ] } diff --git a/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-densest-as-needed.json b/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-densest-as-needed.json index c1a7fb05..9e307a46 100644 --- a/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-densest-as-needed.json +++ b/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-densest-as-needed.json @@ -3777,7 +3777,7 @@ , { "type": "FeatureCollection", "properties": { "zoom": 5, "x": 11, "y": 15 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Suriname", "sov_a3": "SUR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Suriname", "adm0_a3": "SUR", "geou_dif": 0, "geounit": "Suriname", "gu_a3": "SUR", "su_dif": 0, "subunit": "Suriname", "su_a3": "SUR", "brk_diff": 0, "name": "Suriname", "name_long": "Suriname", "brk_a3": "SUR", "brk_name": "Suriname", "abbrev": "Sur.", "postal": "SR", "formal_en": "Republic of Suriname", "name_sort": "Suriname", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 7, "mapcolor13": 6, "pop_est": 481267, "gdp_md_est": 4254, "pop_year": -99, "lastcensus": 2004, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "SR", "iso_a3": "SUR", "iso_n3": "740", "un_a3": "740", "wb_a2": "SR", "wb_a3": "SUR", "woe_id": -99, "adm0_a3_is": "SUR", "adm0_a3_us": "SUR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 8, "long_len": 8, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -55.033264, 6.025848 ], [ -53.959351, 5.755372 ], [ -54.478455, 4.896677 ], [ -54.398804, 4.212204 ], [ -54.006042, 3.620330 ], [ -54.181824, 3.189879 ], [ -54.269714, 2.731813 ], [ -54.525146, 2.311994 ], [ -55.096436, 2.523293 ], [ -55.568848, 2.421764 ], [ -55.972595, 2.509573 ], [ -56.074219, 2.221428 ], [ -55.906677, 2.021065 ], [ -55.994568, 1.817932 ], [ -56.250000, 1.856365 ], [ -56.469727, 1.889306 ], [ -56.469727, 5.859207 ], [ -56.250000, 5.820954 ], [ -55.950623, 5.771769 ], [ -55.840759, 5.952095 ], [ -55.033264, 6.025848 ] ] ] } } +{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Suriname", "sov_a3": "SUR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Suriname", "adm0_a3": "SUR", "geou_dif": 0, "geounit": "Suriname", "gu_a3": "SUR", "su_dif": 0, "subunit": "Suriname", "su_a3": "SUR", "brk_diff": 0, "name": "Suriname", "name_long": "Suriname", "brk_a3": "SUR", "brk_name": "Suriname", "abbrev": "Sur.", "postal": "SR", "formal_en": "Republic of Suriname", "name_sort": "Suriname", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 7, "mapcolor13": 6, "pop_est": 481267, "gdp_md_est": 4254, "pop_year": -99, "lastcensus": 2004, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "SR", "iso_a3": "SUR", "iso_n3": "740", "un_a3": "740", "wb_a2": "SR", "wb_a3": "SUR", "woe_id": -99, "adm0_a3_is": "SUR", "adm0_a3_us": "SUR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 8, "long_len": 8, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -55.033264, 6.025848 ], [ -53.959351, 5.755372 ], [ -54.478455, 4.896677 ], [ -54.398804, 4.212204 ], [ -54.006042, 3.620330 ], [ -54.181824, 3.189879 ], [ -54.269714, 2.731813 ], [ -54.525146, 2.311994 ], [ -55.096436, 2.523293 ], [ -55.568848, 2.421764 ], [ -55.972595, 2.509573 ], [ -56.074219, 2.221428 ], [ -55.906677, 2.021065 ], [ -55.994568, 1.817932 ], [ -56.250000, 1.856365 ], [ -56.469727, 1.889306 ], [ -56.469727, 5.859207 ], [ -56.250000, 5.823687 ], [ -55.950623, 5.771769 ], [ -55.840759, 5.952095 ], [ -55.033264, 6.025848 ] ] ] } } , { "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Brazil", "sov_a3": "BRA", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Brazil", "adm0_a3": "BRA", "geou_dif": 0, "geounit": "Brazil", "gu_a3": "BRA", "su_dif": 0, "subunit": "Brazil", "su_a3": "BRA", "brk_diff": 0, "name": "Brazil", "name_long": "Brazil", "brk_a3": "BRA", "brk_name": "Brazil", "abbrev": "Brazil", "postal": "BR", "formal_en": "Federative Republic of Brazil", "name_sort": "Brazil", "mapcolor7": 5, "mapcolor8": 6, "mapcolor9": 5, "mapcolor13": 7, "pop_est": 198739269, "gdp_md_est": 1993000, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "3. Emerging region: BRIC", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "BR", "iso_a3": "BRA", "iso_n3": "076", "un_a3": "076", "wb_a2": "BR", "wb_a3": "BRA", "woe_id": -99, "adm0_a3_is": "BRA", "adm0_a3_us": "BRA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 6, "long_len": 6, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -51.317139, 4.203986 ], [ -51.069946, 3.650482 ], [ -50.509644, 1.900286 ], [ -49.974060, 1.735574 ], [ -49.946594, 1.046390 ], [ -50.699158, 0.222473 ], [ -50.471191, 0.000000 ], [ -50.388794, -0.079651 ], [ -48.806763, -0.219726 ], [ -56.469727, -0.219726 ], [ -56.469727, 1.889306 ], [ -56.250000, 1.856365 ], [ -55.994568, 1.817932 ], [ -55.906677, 2.021065 ], [ -56.074219, 2.221428 ], [ -55.972595, 2.509573 ], [ -55.568848, 2.421764 ], [ -55.096436, 2.523293 ], [ -54.525146, 2.311994 ], [ -54.088440, 2.106154 ], [ -53.778076, 2.377857 ], [ -53.555603, 2.333949 ], [ -53.418274, 2.054003 ], [ -52.940369, 2.125367 ], [ -52.555847, 2.504085 ], [ -52.248230, 3.241982 ], [ -51.657715, 4.157419 ], [ -51.317139, 4.203986 ] ] ] } } , diff --git a/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-fraction-as-needed.json b/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-fraction-as-needed.json index 135c30e0..96397c79 100644 --- a/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-fraction-as-needed.json +++ b/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-fraction-as-needed.json @@ -3349,7 +3349,7 @@ , { "type": "FeatureCollection", "properties": { "zoom": 5, "x": 11, "y": 15 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Suriname", "sov_a3": "SUR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Suriname", "adm0_a3": "SUR", "geou_dif": 0, "geounit": "Suriname", "gu_a3": "SUR", "su_dif": 0, "subunit": "Suriname", "su_a3": "SUR", "brk_diff": 0, "name": "Suriname", "name_long": "Suriname", "brk_a3": "SUR", "brk_name": "Suriname", "abbrev": "Sur.", "postal": "SR", "formal_en": "Republic of Suriname", "name_sort": "Suriname", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 7, "mapcolor13": 6, "pop_est": 481267, "gdp_md_est": 4254, "pop_year": -99, "lastcensus": 2004, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "SR", "iso_a3": "SUR", "iso_n3": "740", "un_a3": "740", "wb_a2": "SR", "wb_a3": "SUR", "woe_id": -99, "adm0_a3_is": "SUR", "adm0_a3_us": "SUR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 8, "long_len": 8, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -55.033264, 6.025848 ], [ -53.959351, 5.755372 ], [ -54.478455, 4.896677 ], [ -54.398804, 4.212204 ], [ -54.006042, 3.620330 ], [ -54.181824, 3.189879 ], [ -54.269714, 2.731813 ], [ -54.525146, 2.311994 ], [ -55.096436, 2.523293 ], [ -55.568848, 2.421764 ], [ -55.972595, 2.509573 ], [ -56.074219, 2.221428 ], [ -55.906677, 2.021065 ], [ -55.994568, 1.817932 ], [ -56.250000, 1.856365 ], [ -56.469727, 1.889306 ], [ -56.469727, 5.859207 ], [ -56.250000, 5.820954 ], [ -55.950623, 5.771769 ], [ -55.840759, 5.952095 ], [ -55.033264, 6.025848 ] ] ] } } +{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Suriname", "sov_a3": "SUR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Suriname", "adm0_a3": "SUR", "geou_dif": 0, "geounit": "Suriname", "gu_a3": "SUR", "su_dif": 0, "subunit": "Suriname", "su_a3": "SUR", "brk_diff": 0, "name": "Suriname", "name_long": "Suriname", "brk_a3": "SUR", "brk_name": "Suriname", "abbrev": "Sur.", "postal": "SR", "formal_en": "Republic of Suriname", "name_sort": "Suriname", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 7, "mapcolor13": 6, "pop_est": 481267, "gdp_md_est": 4254, "pop_year": -99, "lastcensus": 2004, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "SR", "iso_a3": "SUR", "iso_n3": "740", "un_a3": "740", "wb_a2": "SR", "wb_a3": "SUR", "woe_id": -99, "adm0_a3_is": "SUR", "adm0_a3_us": "SUR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 8, "long_len": 8, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -55.033264, 6.025848 ], [ -53.959351, 5.755372 ], [ -54.478455, 4.896677 ], [ -54.398804, 4.212204 ], [ -54.006042, 3.620330 ], [ -54.181824, 3.189879 ], [ -54.269714, 2.731813 ], [ -54.525146, 2.311994 ], [ -55.096436, 2.523293 ], [ -55.568848, 2.421764 ], [ -55.972595, 2.509573 ], [ -56.074219, 2.221428 ], [ -55.906677, 2.021065 ], [ -55.994568, 1.817932 ], [ -56.250000, 1.856365 ], [ -56.469727, 1.889306 ], [ -56.469727, 5.859207 ], [ -56.250000, 5.823687 ], [ -55.950623, 5.771769 ], [ -55.840759, 5.952095 ], [ -55.033264, 6.025848 ] ] ] } } , { "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Brazil", "sov_a3": "BRA", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Brazil", "adm0_a3": "BRA", "geou_dif": 0, "geounit": "Brazil", "gu_a3": "BRA", "su_dif": 0, "subunit": "Brazil", "su_a3": "BRA", "brk_diff": 0, "name": "Brazil", "name_long": "Brazil", "brk_a3": "BRA", "brk_name": "Brazil", "abbrev": "Brazil", "postal": "BR", "formal_en": "Federative Republic of Brazil", "name_sort": "Brazil", "mapcolor7": 5, "mapcolor8": 6, "mapcolor9": 5, "mapcolor13": 7, "pop_est": 198739269, "gdp_md_est": 1993000, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "3. Emerging region: BRIC", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "BR", "iso_a3": "BRA", "iso_n3": "076", "un_a3": "076", "wb_a2": "BR", "wb_a3": "BRA", "woe_id": -99, "adm0_a3_is": "BRA", "adm0_a3_us": "BRA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 6, "long_len": 6, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -51.317139, 4.203986 ], [ -51.069946, 3.650482 ], [ -50.509644, 1.900286 ], [ -49.974060, 1.735574 ], [ -49.946594, 1.046390 ], [ -50.699158, 0.222473 ], [ -50.471191, 0.000000 ], [ -50.388794, -0.079651 ], [ -48.806763, -0.219726 ], [ -56.469727, -0.219726 ], [ -56.469727, 1.889306 ], [ -56.250000, 1.856365 ], [ -55.994568, 1.817932 ], [ -55.906677, 2.021065 ], [ -56.074219, 2.221428 ], [ -55.972595, 2.509573 ], [ -55.568848, 2.421764 ], [ -55.096436, 2.523293 ], [ -54.525146, 2.311994 ], [ -54.088440, 2.106154 ], [ -53.778076, 2.377857 ], [ -53.555603, 2.333949 ], [ -53.418274, 2.054003 ], [ -52.940369, 2.125367 ], [ -52.555847, 2.504085 ], [ -52.248230, 3.241982 ], [ -51.657715, 4.157419 ], [ -51.317139, 4.203986 ] ] ] } } , diff --git a/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-smallest-as-needed.json b/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-smallest-as-needed.json index 6251b60e..1db969e5 100644 --- a/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-smallest-as-needed.json +++ b/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--coalesce-smallest-as-needed.json @@ -3723,7 +3723,7 @@ , { "type": "FeatureCollection", "properties": { "zoom": 5, "x": 11, "y": 15 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Suriname", "sov_a3": "SUR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Suriname", "adm0_a3": "SUR", "geou_dif": 0, "geounit": "Suriname", "gu_a3": "SUR", "su_dif": 0, "subunit": "Suriname", "su_a3": "SUR", "brk_diff": 0, "name": "Suriname", "name_long": "Suriname", "brk_a3": "SUR", "brk_name": "Suriname", "abbrev": "Sur.", "postal": "SR", "formal_en": "Republic of Suriname", "name_sort": "Suriname", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 7, "mapcolor13": 6, "pop_est": 481267, "gdp_md_est": 4254, "pop_year": -99, "lastcensus": 2004, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "SR", "iso_a3": "SUR", "iso_n3": "740", "un_a3": "740", "wb_a2": "SR", "wb_a3": "SUR", "woe_id": -99, "adm0_a3_is": "SUR", "adm0_a3_us": "SUR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 8, "long_len": 8, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -55.033264, 6.025848 ], [ -53.959351, 5.755372 ], [ -54.478455, 4.896677 ], [ -54.398804, 4.212204 ], [ -54.006042, 3.620330 ], [ -54.181824, 3.189879 ], [ -54.269714, 2.731813 ], [ -54.525146, 2.311994 ], [ -55.096436, 2.523293 ], [ -55.568848, 2.421764 ], [ -55.972595, 2.509573 ], [ -56.074219, 2.221428 ], [ -55.906677, 2.021065 ], [ -55.994568, 1.817932 ], [ -56.250000, 1.856365 ], [ -56.469727, 1.889306 ], [ -56.469727, 5.859207 ], [ -56.250000, 5.820954 ], [ -55.950623, 5.771769 ], [ -55.840759, 5.952095 ], [ -55.033264, 6.025848 ] ] ] } } +{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Suriname", "sov_a3": "SUR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Suriname", "adm0_a3": "SUR", "geou_dif": 0, "geounit": "Suriname", "gu_a3": "SUR", "su_dif": 0, "subunit": "Suriname", "su_a3": "SUR", "brk_diff": 0, "name": "Suriname", "name_long": "Suriname", "brk_a3": "SUR", "brk_name": "Suriname", "abbrev": "Sur.", "postal": "SR", "formal_en": "Republic of Suriname", "name_sort": "Suriname", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 7, "mapcolor13": 6, "pop_est": 481267, "gdp_md_est": 4254, "pop_year": -99, "lastcensus": 2004, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "SR", "iso_a3": "SUR", "iso_n3": "740", "un_a3": "740", "wb_a2": "SR", "wb_a3": "SUR", "woe_id": -99, "adm0_a3_is": "SUR", "adm0_a3_us": "SUR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 8, "long_len": 8, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -55.033264, 6.025848 ], [ -53.959351, 5.755372 ], [ -54.478455, 4.896677 ], [ -54.398804, 4.212204 ], [ -54.006042, 3.620330 ], [ -54.181824, 3.189879 ], [ -54.269714, 2.731813 ], [ -54.525146, 2.311994 ], [ -55.096436, 2.523293 ], [ -55.568848, 2.421764 ], [ -55.972595, 2.509573 ], [ -56.074219, 2.221428 ], [ -55.906677, 2.021065 ], [ -55.994568, 1.817932 ], [ -56.250000, 1.856365 ], [ -56.469727, 1.889306 ], [ -56.469727, 5.859207 ], [ -56.250000, 5.823687 ], [ -55.950623, 5.771769 ], [ -55.840759, 5.952095 ], [ -55.033264, 6.025848 ] ] ] } } , { "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Brazil", "sov_a3": "BRA", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Brazil", "adm0_a3": "BRA", "geou_dif": 0, "geounit": "Brazil", "gu_a3": "BRA", "su_dif": 0, "subunit": "Brazil", "su_a3": "BRA", "brk_diff": 0, "name": "Brazil", "name_long": "Brazil", "brk_a3": "BRA", "brk_name": "Brazil", "abbrev": "Brazil", "postal": "BR", "formal_en": "Federative Republic of Brazil", "name_sort": "Brazil", "mapcolor7": 5, "mapcolor8": 6, "mapcolor9": 5, "mapcolor13": 7, "pop_est": 198739269, "gdp_md_est": 1993000, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "3. Emerging region: BRIC", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "BR", "iso_a3": "BRA", "iso_n3": "076", "un_a3": "076", "wb_a2": "BR", "wb_a3": "BRA", "woe_id": -99, "adm0_a3_is": "BRA", "adm0_a3_us": "BRA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 6, "long_len": 6, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -51.317139, 4.203986 ], [ -51.069946, 3.650482 ], [ -50.509644, 1.900286 ], [ -49.974060, 1.735574 ], [ -49.946594, 1.046390 ], [ -50.699158, 0.222473 ], [ -50.471191, 0.000000 ], [ -50.388794, -0.079651 ], [ -48.806763, -0.219726 ], [ -56.469727, -0.219726 ], [ -56.469727, 1.889306 ], [ -56.250000, 1.856365 ], [ -55.994568, 1.817932 ], [ -55.906677, 2.021065 ], [ -56.074219, 2.221428 ], [ -55.972595, 2.509573 ], [ -55.568848, 2.421764 ], [ -55.096436, 2.523293 ], [ -54.525146, 2.311994 ], [ -54.088440, 2.106154 ], [ -53.778076, 2.377857 ], [ -53.555603, 2.333949 ], [ -53.418274, 2.054003 ], [ -52.940369, 2.125367 ], [ -52.555847, 2.504085 ], [ -52.248230, 3.241982 ], [ -51.657715, 4.157419 ], [ -51.317139, 4.203986 ] ] ] } } , diff --git a/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--drop-smallest-as-needed.json b/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--drop-smallest-as-needed.json index 4732b63c..cb40e885 100644 --- a/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--drop-smallest-as-needed.json +++ b/tests/ne_110m_admin_0_countries/out/-z5_-M5000_--drop-smallest-as-needed.json @@ -3779,7 +3779,7 @@ , { "type": "FeatureCollection", "properties": { "zoom": 5, "x": 11, "y": 15 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Suriname", "sov_a3": "SUR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Suriname", "adm0_a3": "SUR", "geou_dif": 0, "geounit": "Suriname", "gu_a3": "SUR", "su_dif": 0, "subunit": "Suriname", "su_a3": "SUR", "brk_diff": 0, "name": "Suriname", "name_long": "Suriname", "brk_a3": "SUR", "brk_name": "Suriname", "abbrev": "Sur.", "postal": "SR", "formal_en": "Republic of Suriname", "name_sort": "Suriname", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 7, "mapcolor13": 6, "pop_est": 481267, "gdp_md_est": 4254, "pop_year": -99, "lastcensus": 2004, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "SR", "iso_a3": "SUR", "iso_n3": "740", "un_a3": "740", "wb_a2": "SR", "wb_a3": "SUR", "woe_id": -99, "adm0_a3_is": "SUR", "adm0_a3_us": "SUR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 8, "long_len": 8, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -55.033264, 6.025848 ], [ -53.959351, 5.755372 ], [ -54.478455, 4.896677 ], [ -54.398804, 4.212204 ], [ -54.006042, 3.620330 ], [ -54.181824, 3.189879 ], [ -54.269714, 2.731813 ], [ -54.525146, 2.311994 ], [ -55.096436, 2.523293 ], [ -55.568848, 2.421764 ], [ -55.972595, 2.509573 ], [ -56.074219, 2.221428 ], [ -55.906677, 2.021065 ], [ -55.994568, 1.817932 ], [ -56.250000, 1.856365 ], [ -56.469727, 1.889306 ], [ -56.469727, 5.859207 ], [ -56.250000, 5.820954 ], [ -55.950623, 5.771769 ], [ -55.840759, 5.952095 ], [ -55.033264, 6.025848 ] ] ] } } +{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Suriname", "sov_a3": "SUR", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Suriname", "adm0_a3": "SUR", "geou_dif": 0, "geounit": "Suriname", "gu_a3": "SUR", "su_dif": 0, "subunit": "Suriname", "su_a3": "SUR", "brk_diff": 0, "name": "Suriname", "name_long": "Suriname", "brk_a3": "SUR", "brk_name": "Suriname", "abbrev": "Sur.", "postal": "SR", "formal_en": "Republic of Suriname", "name_sort": "Suriname", "mapcolor7": 1, "mapcolor8": 4, "mapcolor9": 7, "mapcolor13": 6, "pop_est": 481267, "gdp_md_est": 4254, "pop_year": -99, "lastcensus": 2004, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "SR", "iso_a3": "SUR", "iso_n3": "740", "un_a3": "740", "wb_a2": "SR", "wb_a3": "SUR", "woe_id": -99, "adm0_a3_is": "SUR", "adm0_a3_us": "SUR", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 8, "long_len": 8, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -55.033264, 6.025848 ], [ -53.959351, 5.755372 ], [ -54.478455, 4.896677 ], [ -54.398804, 4.212204 ], [ -54.006042, 3.620330 ], [ -54.181824, 3.189879 ], [ -54.269714, 2.731813 ], [ -54.525146, 2.311994 ], [ -55.096436, 2.523293 ], [ -55.568848, 2.421764 ], [ -55.972595, 2.509573 ], [ -56.074219, 2.221428 ], [ -55.906677, 2.021065 ], [ -55.994568, 1.817932 ], [ -56.250000, 1.856365 ], [ -56.469727, 1.889306 ], [ -56.469727, 5.859207 ], [ -56.250000, 5.823687 ], [ -55.950623, 5.771769 ], [ -55.840759, 5.952095 ], [ -55.033264, 6.025848 ] ] ] } } , { "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Brazil", "sov_a3": "BRA", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Brazil", "adm0_a3": "BRA", "geou_dif": 0, "geounit": "Brazil", "gu_a3": "BRA", "su_dif": 0, "subunit": "Brazil", "su_a3": "BRA", "brk_diff": 0, "name": "Brazil", "name_long": "Brazil", "brk_a3": "BRA", "brk_name": "Brazil", "abbrev": "Brazil", "postal": "BR", "formal_en": "Federative Republic of Brazil", "name_sort": "Brazil", "mapcolor7": 5, "mapcolor8": 6, "mapcolor9": 5, "mapcolor13": 7, "pop_est": 198739269, "gdp_md_est": 1993000, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "3. Emerging region: BRIC", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "BR", "iso_a3": "BRA", "iso_n3": "076", "un_a3": "076", "wb_a2": "BR", "wb_a3": "BRA", "woe_id": -99, "adm0_a3_is": "BRA", "adm0_a3_us": "BRA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 6, "long_len": 6, "abbrev_len": 6, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -51.317139, 4.203986 ], [ -51.069946, 3.650482 ], [ -50.509644, 1.900286 ], [ -49.974060, 1.735574 ], [ -49.946594, 1.046390 ], [ -50.699158, 0.222473 ], [ -50.471191, 0.000000 ], [ -50.388794, -0.079651 ], [ -48.806763, -0.219726 ], [ -56.469727, -0.219726 ], [ -56.469727, 1.889306 ], [ -56.250000, 1.856365 ], [ -55.994568, 1.817932 ], [ -55.906677, 2.021065 ], [ -56.074219, 2.221428 ], [ -55.972595, 2.509573 ], [ -55.568848, 2.421764 ], [ -55.096436, 2.523293 ], [ -54.525146, 2.311994 ], [ -54.088440, 2.106154 ], [ -53.778076, 2.377857 ], [ -53.555603, 2.333949 ], [ -53.418274, 2.054003 ], [ -52.940369, 2.125367 ], [ -52.555847, 2.504085 ], [ -52.248230, 3.241982 ], [ -51.657715, 4.157419 ], [ -51.317139, 4.203986 ] ] ] } } , diff --git a/tests/wyalkatchem/out/-pk_-pf_-Z9_-z12_-ldata.json b/tests/wyalkatchem/out/-pk_-pf_-Z9_-z12_-ldata.json index 9fa83bcf..d51da02d 100644 --- a/tests/wyalkatchem/out/-pk_-pf_-Z9_-z12_-ldata.json +++ b/tests/wyalkatchem/out/-pk_-pf_-Z9_-z12_-ldata.json @@ -236,7 +236,7 @@ , { "type": "FeatureCollection", "properties": { "zoom": 12, "x": 3384, "y": 2425 }, "features": [ { "type": "FeatureCollection", "properties": { "layer": "data", "version": 2, "extent": 4096 }, "features": [ -{ "type": "Feature", "id": 109595776605697, "properties": { "country": "au", "text": "Wyalkatchem" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.485776, -31.427198 ], [ 117.485776, -31.439062 ], [ 117.484810, -31.448820 ], [ 117.481978, -31.458210 ], [ 117.477343, -31.466868 ], [ 117.471099, -31.474444 ], [ 117.463503, -31.480666 ], [ 117.454855, -31.485278 ], [ 117.445457, -31.488114 ], [ 117.435672, -31.489065 ], [ 117.421875, -31.489029 ], [ 117.420158, -31.489029 ], [ 117.420158, -31.439026 ], [ 117.421875, -31.439026 ], [ 117.435780, -31.439062 ], [ 117.435780, -31.427198 ], [ 117.485776, -31.427198 ] ] ] } } +{ "type": "Feature", "id": 109595776605697, "properties": { "country": "au", "text": "Wyalkatchem" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.485776, -31.427198 ], [ 117.485776, -31.439062 ], [ 117.484810, -31.448820 ], [ 117.481978, -31.458210 ], [ 117.477343, -31.466868 ], [ 117.471099, -31.474444 ], [ 117.463503, -31.480666 ], [ 117.454855, -31.485278 ], [ 117.445457, -31.488114 ], [ 117.435672, -31.489065 ], [ 117.421875, -31.489029 ], [ 117.420158, -31.489010 ], [ 117.420158, -31.439026 ], [ 117.421875, -31.439026 ], [ 117.435780, -31.439062 ], [ 117.435780, -31.427198 ], [ 117.485776, -31.427198 ] ] ] } } ] } ] } ,