mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 18:35:41 +02:00
Do more of line simplification with integer coordinates (#113)
* Turn off unit, which has bit-rotted
* Instrument line simplification
* Do more work in integer space
* Update tests with simplification done with more integers
* Clean up
* Update changelog
* Eradicate calls to deprecated sprintf()
* Revert "Turn off unit, which has bit-rotted"
This reverts commit 998779313f.
* Fix catch by switching to an unsigned type
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--drop-fraction-as-needed.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_as_needed\":160,\"tile_size_desired\":39204},{\"dropped_as_needed\":188,\"tile_size_desired\":25164},{\"dropped_as_needed\":190,\"tiny_polygons\":2,\"tile_size_desired\":21198},{\"dropped_as_needed\":180,\"tiny_polygons\":9,\"tile_size_desired\":10761},{\"dropped_as_needed\":145,\"tiny_polygons\":17,\"tile_size_desired\":6604},{\"tiny_polygons\":47}]",
|
||||
"strategies": "[{\"dropped_as_needed\":160,\"tile_size_desired\":39209},{\"dropped_as_needed\":188,\"tile_size_desired\":25164},{\"dropped_as_needed\":190,\"tiny_polygons\":2,\"tile_size_desired\":21198},{\"dropped_as_needed\":180,\"tiny_polygons\":9,\"tile_size_desired\":10761},{\"dropped_as_needed\":145,\"tiny_polygons\":17,\"tile_size_desired\":6604},{\"tiny_polygons\":47}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
"maxzoom": "5",
|
||||
"minzoom": "0",
|
||||
"name": "tests/ne_110m_admin_0_countries/out/-ae_-zg_-M5000_--force-feature-limit.json.check.mbtiles",
|
||||
"strategies": "[{\"dropped_as_needed\":316,\"tile_size_desired\":39204},{\"dropped_as_needed\":287,\"tiny_polygons\":4,\"tile_size_desired\":25164},{\"dropped_as_needed\":223,\"tiny_polygons\":4,\"tile_size_desired\":21198},{\"dropped_as_needed\":93,\"tiny_polygons\":14,\"tile_size_desired\":10761},{\"dropped_as_needed\":9,\"tiny_polygons\":21,\"tile_size_desired\":6604},{\"tiny_polygons\":47}]",
|
||||
"strategies": "[{\"dropped_as_needed\":316,\"tile_size_desired\":39209},{\"dropped_as_needed\":287,\"tiny_polygons\":4,\"tile_size_desired\":25164},{\"dropped_as_needed\":223,\"tiny_polygons\":4,\"tile_size_desired\":21198},{\"dropped_as_needed\":93,\"tiny_polygons\":14,\"tile_size_desired\":10761},{\"dropped_as_needed\":9,\"tiny_polygons\":21,\"tile_size_desired\":6604},{\"tiny_polygons\":47}]",
|
||||
"type": "overlay",
|
||||
"version": "2"
|
||||
}, "features": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6
-6
File diff suppressed because one or more lines are too long
+1
-1
@@ -65,7 +65,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Ivory Coast", "sov_a3": "CIV", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Ivory Coast", "adm0_a3": "CIV", "geou_dif": 0, "geounit": "Ivory Coast", "gu_a3": "CIV", "su_dif": 0, "subunit": "Ivory Coast", "su_a3": "CIV", "brk_diff": 0, "name": "Côte d'Ivoire", "name_long": "Côte d'Ivoire", "brk_a3": "CIV", "brk_name": "Côte d'Ivoire", "abbrev": "I.C.", "postal": "CI", "formal_en": "Republic of Ivory Coast", "formal_fr": "Republic of Cote D'Ivoire", "name_sort": "Côte d'Ivoire", "mapcolor7": 4, "mapcolor8": 6, "mapcolor9": 3, "mapcolor13": 3, "pop_est": 20617068, "gdp_md_est": 33850, "pop_year": -99, "lastcensus": 1998, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "4. Lower middle income", "wikipedia": -99, "iso_a2": "CI", "iso_a3": "CIV", "iso_n3": "384", "un_a3": "384", "wb_a2": "CI", "wb_a3": "CIV", "woe_id": -99, "adm0_a3_is": "CIV", "adm0_a3_us": "CIV", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Africa", "region_un": "Africa", "subregion": "Western Africa", "region_wb": "Sub-Saharan Africa", "name_len": 13, "long_len": 13, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -8.261719, 10.141932 ], [ -2.812500, 5.003394 ], [ -7.734375, 4.390229 ], [ -8.261719, 10.141932 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Antarctica", "sov_a3": "ATA", "adm0_dif": 0, "level": 2, "type": "Indeterminate", "admin": "Antarctica", "adm0_a3": "ATA", "geou_dif": 0, "geounit": "Antarctica", "gu_a3": "ATA", "su_dif": 0, "subunit": "Antarctica", "su_a3": "ATA", "brk_diff": 0, "name": "Antarctica", "name_long": "Antarctica", "brk_a3": "ATA", "brk_name": "Antarctica", "abbrev": "Ant.", "postal": "AQ", "note_brk": "Multiple claims held in abeyance", "name_sort": "Antarctica", "mapcolor7": 4, "mapcolor8": 5, "mapcolor9": 1, "mapcolor13": -99, "pop_est": 3802, "gdp_md_est": 760.4, "pop_year": -99, "lastcensus": -99, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "AQ", "iso_a3": "ATA", "iso_n3": "010", "un_a3": "-099", "wb_a2": "-99", "wb_a3": "-99", "woe_id": -99, "adm0_a3_is": "ATA", "adm0_a3_us": "ATA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Antarctica", "region_un": "Antarctica", "subregion": "Antarctica", "region_wb": "Antarctica", "name_len": 10, "long_len": 10, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -60.644531, -79.624056 ], [ -60.117188, -80.997452 ], [ -64.511719, -80.928426 ], [ -60.644531, -79.624056 ] ] ], [ [ [ -46.669922, -77.823323 ], [ -43.330078, -80.027655 ], [ -52.822266, -80.969904 ], [ -53.964844, -80.223588 ], [ -46.669922, -77.823323 ] ] ], [ [ [ 135.087891, -65.293468 ], [ 171.210938, -71.691293 ], [ 159.785156, -80.942273 ], [ 180.000000, -85.051129 ], [ 180.000000, -84.714152 ], [ 180.966797, -84.142939 ], [ 185.625000, -84.532994 ], [ 187.031250, -84.079819 ], [ 187.031250, -85.622069 ], [ 180.000000, -85.622069 ], [ -180.000000, -85.622069 ], [ -187.031250, -85.622069 ], [ -187.031250, -84.319608 ], [ -180.000000, -84.714152 ], [ -180.000000, -85.051129 ], [ -179.033203, -84.142939 ], [ -174.375000, -84.532994 ], [ -169.980469, -83.886366 ], [ -162.597656, -85.051129 ], [ -148.535156, -85.608630 ], [ -143.173828, -85.051129 ], [ -156.796875, -81.106811 ], [ -150.644531, -81.334844 ], [ -146.777344, -79.920548 ], [ -155.302734, -79.071812 ], [ -158.378906, -76.880775 ], [ -151.347656, -77.389504 ], [ -135.175781, -74.307353 ], [ -113.906250, -73.726595 ], [ -100.634766, -75.297735 ], [ -103.710938, -72.607120 ], [ -74.882812, -73.873717 ], [ -71.718750, -72.289067 ], [ -74.179688, -72.369105 ], [ -70.224609, -68.879358 ], [ -69.345703, -70.988349 ], [ -65.302734, -68.528235 ], [ -61.347656, -74.116047 ], [ -77.255859, -76.720223 ], [ -78.046875, -79.187834 ], [ -58.183594, -83.215693 ], [ -49.746094, -81.723188 ], [ -42.802734, -82.082145 ], [ -28.564453, -80.342262 ], [ -35.332031, -78.116408 ], [ -10.283203, -71.272595 ], [ 38.671875, -69.778952 ], [ 54.492188, -65.802776 ], [ 68.906250, -67.941650 ], [ 69.873047, -72.262310 ], [ 87.978516, -66.196009 ], [ 135.087891, -65.293468 ] ] ], [ [ [ -163.125000, -78.224513 ], [ -159.169922, -79.496652 ], [ -162.421875, -79.286313 ], [ -163.125000, -78.224513 ] ] ], [ [ [ -104.501953, -71.187754 ], [ -100.107422, -72.554498 ], [ -104.501953, -72.554498 ], [ -104.501953, -71.187754 ] ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Antarctica", "sov_a3": "ATA", "adm0_dif": 0, "level": 2, "type": "Indeterminate", "admin": "Antarctica", "adm0_a3": "ATA", "geou_dif": 0, "geounit": "Antarctica", "gu_a3": "ATA", "su_dif": 0, "subunit": "Antarctica", "su_a3": "ATA", "brk_diff": 0, "name": "Antarctica", "name_long": "Antarctica", "brk_a3": "ATA", "brk_name": "Antarctica", "abbrev": "Ant.", "postal": "AQ", "note_brk": "Multiple claims held in abeyance", "name_sort": "Antarctica", "mapcolor7": 4, "mapcolor8": 5, "mapcolor9": 1, "mapcolor13": -99, "pop_est": 3802, "gdp_md_est": 760.4, "pop_year": -99, "lastcensus": -99, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "AQ", "iso_a3": "ATA", "iso_n3": "010", "un_a3": "-099", "wb_a2": "-99", "wb_a3": "-99", "woe_id": -99, "adm0_a3_is": "ATA", "adm0_a3_us": "ATA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Antarctica", "region_un": "Antarctica", "subregion": "Antarctica", "region_wb": "Antarctica", "name_len": 10, "long_len": 10, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 180.000000, -85.622069 ], [ -143.701172, -85.111416 ], [ -143.173828, -85.051129 ], [ -156.796875, -81.106811 ], [ -150.644531, -81.334844 ], [ -146.777344, -79.920548 ], [ -155.302734, -79.071812 ], [ -158.378906, -76.880775 ], [ -151.347656, -77.389504 ], [ -135.175781, -74.307353 ], [ -113.906250, -73.726595 ], [ -100.634766, -75.297735 ], [ -103.710938, -72.607120 ], [ -74.882812, -73.873717 ], [ -71.718750, -72.289067 ], [ -74.179688, -72.369105 ], [ -70.224609, -68.879358 ], [ -69.345703, -70.988349 ], [ -65.302734, -68.528235 ], [ -61.347656, -74.116047 ], [ -77.255859, -76.720223 ], [ -78.046875, -79.187834 ], [ -58.183594, -83.215693 ], [ -49.746094, -81.723188 ], [ -42.802734, -82.082145 ], [ -28.564453, -80.342262 ], [ -35.332031, -78.116408 ], [ -10.283203, -71.272595 ], [ 37.177734, -69.162558 ], [ 56.337891, -65.982270 ], [ 68.906250, -67.941650 ], [ 69.873047, -72.262310 ], [ 87.978516, -66.196009 ], [ 135.087891, -65.293468 ], [ 168.398438, -70.959697 ], [ 166.992188, -78.750659 ], [ 159.785156, -80.942273 ], [ 180.000000, -85.051129 ], [ 180.000000, -84.714152 ], [ 180.966797, -84.142939 ], [ 185.625000, -84.532994 ], [ 187.031250, -84.079819 ], [ 187.031250, -85.622069 ], [ 180.000000, -85.622069 ] ] ], [ [ [ -187.031250, -84.319608 ], [ -180.000000, -84.714152 ], [ -180.000000, -85.051129 ], [ -180.000000, -85.622069 ], [ -187.031250, -85.622069 ], [ -187.031250, -84.319608 ] ] ], [ [ [ -169.980469, -83.886366 ], [ -162.597656, -85.051129 ], [ -161.894531, -85.081364 ], [ -180.000000, -85.051129 ], [ -179.033203, -84.142939 ], [ -174.375000, -84.532994 ], [ -169.980469, -83.886366 ] ] ], [ [ [ -46.669922, -77.823323 ], [ -43.330078, -80.027655 ], [ -52.822266, -80.969904 ], [ -53.964844, -80.223588 ], [ -46.669922, -77.823323 ] ] ], [ [ [ -163.125000, -78.224513 ], [ -159.169922, -79.496652 ], [ -162.421875, -79.286313 ], [ -163.125000, -78.224513 ] ] ], [ [ [ -104.501953, -71.187754 ], [ -100.107422, -72.554498 ], [ -104.501953, -72.554498 ], [ -104.501953, -71.187754 ] ] ], [ [ [ -60.644531, -79.624056 ], [ -60.117188, -80.997452 ], [ -64.511719, -80.928426 ], [ -60.644531, -79.624056 ] ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 3, "sovereignt": "Ecuador", "sov_a3": "ECU", "adm0_dif": 0, "level": 2, "type": "Sovereign country", "admin": "Ecuador", "adm0_a3": "ECU", "geou_dif": 0, "geounit": "Ecuador", "gu_a3": "ECU", "su_dif": 0, "subunit": "Ecuador", "su_a3": "ECU", "brk_diff": 0, "name": "Ecuador", "name_long": "Ecuador", "brk_a3": "ECU", "brk_name": "Ecuador", "abbrev": "Ecu.", "postal": "EC", "formal_en": "Republic of Ecuador", "name_sort": "Ecuador", "mapcolor7": 1, "mapcolor8": 5, "mapcolor9": 2, "mapcolor13": 12, "pop_est": 14573101, "gdp_md_est": 107700, "pop_year": -99, "lastcensus": 2010, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "3. Upper middle income", "wikipedia": -99, "iso_a2": "EC", "iso_a3": "ECU", "iso_n3": "218", "un_a3": "218", "wb_a2": "EC", "wb_a3": "ECU", "woe_id": -99, "adm0_a3_is": "ECU", "adm0_a3_us": "ECU", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "South America", "region_un": "Americas", "subregion": "South America", "region_wb": "Latin America & Caribbean", "name_len": 7, "long_len": 7, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -75.410156, -0.175781 ], [ -78.662109, -4.565474 ], [ -80.419922, -4.390229 ], [ -75.410156, -0.175781 ] ] ] } }
|
||||
,
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 2, "sovereignt": "Australia", "sov_a3": "AU1", "adm0_dif": 1, "level": 2, "type": "Country", "admin": "Australia", "adm0_a3": "AUS", "geou_dif": 0, "geounit": "Australia", "gu_a3": "AUS", "su_dif": 0, "subunit": "Australia", "su_a3": "AUS", "brk_diff": 0, "name": "Australia", "name_long": "Australia", "brk_a3": "AUS", "brk_name": "Australia", "abbrev": "Auz.", "postal": "AU", "formal_en": "Commonwealth of Australia", "name_sort": "Australia", "mapcolor7": 1, "mapcolor8": 2, "mapcolor9": 2, "mapcolor13": 7, "pop_est": 21262641, "gdp_md_est": 800200, "pop_year": -99, "lastcensus": 2006, "gdp_year": -99, "economy": "2. Developed region: nonG7", "income_grp": "1. High income: OECD", "wikipedia": -99, "iso_a2": "AU", "iso_a3": "AUS", "iso_n3": "036", "un_a3": "036", "wb_a2": "AU", "wb_a3": "AUS", "woe_id": -99, "adm0_a3_is": "AUS", "adm0_a3_us": "AUS", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Oceania", "region_un": "Oceania", "subregion": "Australia and New Zealand", "region_wb": "East Asia & Pacific", "name_len": 9, "long_len": 9, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Point", "coordinates": [ 134.472656, -26.037042 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Antarctica", "sov_a3": "ATA", "adm0_dif": 0, "level": 2, "type": "Indeterminate", "admin": "Antarctica", "adm0_a3": "ATA", "geou_dif": 0, "geounit": "Antarctica", "gu_a3": "ATA", "su_dif": 0, "subunit": "Antarctica", "su_a3": "ATA", "brk_diff": 0, "name": "Antarctica", "name_long": "Antarctica", "brk_a3": "ATA", "brk_name": "Antarctica", "abbrev": "Ant.", "postal": "AQ", "note_brk": "Multiple claims held in abeyance", "name_sort": "Antarctica", "mapcolor7": 4, "mapcolor8": 5, "mapcolor9": 1, "mapcolor13": -99, "pop_est": 3802, "gdp_md_est": 760.4, "pop_year": -99, "lastcensus": -99, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "AQ", "iso_a3": "ATA", "iso_n3": "010", "un_a3": "-099", "wb_a2": "-99", "wb_a3": "-99", "woe_id": -99, "adm0_a3_is": "ATA", "adm0_a3_us": "ATA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Antarctica", "region_un": "Antarctica", "subregion": "Antarctica", "region_wb": "Antarctica", "name_len": 10, "long_len": 10, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "MultiPoint", "coordinates": [ [ -103.095703, -83.932990 ], [ 4.921875, -74.519889 ], [ 112.851562, -83.932990 ] ] } }
|
||||
{ "type": "Feature", "properties": { "scalerank": 1, "featurecla": "Admin-0 country", "labelrank": 4, "sovereignt": "Antarctica", "sov_a3": "ATA", "adm0_dif": 0, "level": 2, "type": "Indeterminate", "admin": "Antarctica", "adm0_a3": "ATA", "geou_dif": 0, "geounit": "Antarctica", "gu_a3": "ATA", "su_dif": 0, "subunit": "Antarctica", "su_a3": "ATA", "brk_diff": 0, "name": "Antarctica", "name_long": "Antarctica", "brk_a3": "ATA", "brk_name": "Antarctica", "abbrev": "Ant.", "postal": "AQ", "note_brk": "Multiple claims held in abeyance", "name_sort": "Antarctica", "mapcolor7": 4, "mapcolor8": 5, "mapcolor9": 1, "mapcolor13": -99, "pop_est": 3802, "gdp_md_est": 760.4, "pop_year": -99, "lastcensus": -99, "gdp_year": -99, "economy": "6. Developing region", "income_grp": "2. High income: nonOECD", "wikipedia": -99, "iso_a2": "AQ", "iso_a3": "ATA", "iso_n3": "010", "un_a3": "-099", "wb_a2": "-99", "wb_a3": "-99", "woe_id": -99, "adm0_a3_is": "ATA", "adm0_a3_us": "ATA", "adm0_a3_un": -99, "adm0_a3_wb": -99, "continent": "Antarctica", "region_un": "Antarctica", "subregion": "Antarctica", "region_wb": "Antarctica", "name_len": 10, "long_len": 10, "abbrev_len": 4, "tiny": -99, "homepart": 1 }, "geometry": { "type": "Point", "coordinates": [ 4.921875, -74.519889 ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user