Use a label point for the general representative point for polygons

(Skipping the iteration to find one that is as far as possible from
the borders)

This makes the labels look better in many cases (like France at z1)
but unfortunately ripples into changing the sequence of polygons in
many tests, so the diff is big.
This commit is contained in:
Erica Fischer
2022-10-07 12:11:12 -07:00
parent 2f0c9bf9c8
commit 2261adf05e
55 changed files with 25015 additions and 24803 deletions
+6 -6
View File
@@ -14,25 +14,25 @@
}, "features": [
{ "type": "FeatureCollection", "properties": { "zoom": 0, "x": 0, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.052734, 83.004844 ], [ -82.001953, 82.009169 ], [ -106.083984, 70.020587 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.931641, -73.995328 ], [ 144.931641, -76.999935 ], [ 92.988281, -78.988187 ], [ -33.046875, -76.999935 ], [ -75.058594, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.070312, 71.016960 ], [ -99.052734, 83.004844 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 83.004844 ], [ 135.000000, 80.012423 ], [ -88.066406, 80.012423 ], [ -119.003906, 71.016960 ], [ -112.060547, -74.982183 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.019543 ], [ -101.074219, 83.004844 ], [ 108.984375, 83.004844 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.052734, 83.004844 ], [ -82.001953, 82.009169 ], [ -106.083984, 70.020587 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.931641, -73.995328 ], [ 144.931641, -76.999935 ], [ 92.988281, -78.988187 ], [ -33.046875, -76.999935 ], [ -75.058594, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.070312, 71.016960 ], [ -99.052734, 83.004844 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 1, "x": 1, "y": 0 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 83.004844 ], [ -82.001953, 82.003058 ], [ -106.040039, 70.005567 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.975586, -73.995328 ], [ 144.975586, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.026367, 71.002660 ], [ -99.008789, 83.004844 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 83.004844 ], [ 135.000000, 80.004799 ], [ -88.022461, 80.004799 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.993566 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.960938, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.042969, -75.994839 ], [ -139.042969, 74.007440 ], [ -101.030273, 83.004844 ], [ 108.984375, 83.004844 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 83.004844 ], [ -82.001953, 82.003058 ], [ -106.040039, 70.005567 ], [ -103.007812, 32.026706 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.037109, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.975586, -73.995328 ], [ 144.975586, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.982270 ], [ -97.031250, -37.996163 ], [ -118.037109, 26.037042 ], [ -117.026367, 71.002660 ], [ -99.008789, 83.004844 ] ] ] } }
] }
] }
,
{ "type": "FeatureCollection", "properties": { "zoom": 2, "x": 2, "y": 1 }, "features": [
{ "type": "FeatureCollection", "properties": { "layer": "in", "version": 2, "extent": 4096 }, "features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.984375, 83.002167 ], [ 135.000000, 80.000984 ], [ -88.000488, 80.000984 ], [ -119.003906, 71.002660 ], [ -112.016602, -74.999254 ], [ -92.021484, -76.999935 ], [ 169.980469, -79.997168 ], [ 159.982910, -81.996942 ], [ -111.005859, -81.996942 ], [ -139.020996, -75.994839 ], [ -139.020996, 74.001385 ], [ -101.008301, 83.002167 ], [ 108.984375, 83.002167 ] ] ] } }
,
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -99.008789, 83.002167 ], [ -82.001953, 82.000000 ], [ -106.018066, 70.005567 ], [ -103.007812, 32.008076 ], [ -82.001953, -32.990236 ], [ -63.017578, -62.995158 ], [ -28.015137, -72.996909 ], [ 90.000000, -73.995328 ], [ 144.997559, -73.995328 ], [ 144.997559, -76.999935 ], [ 92.988281, -78.996578 ], [ -33.002930, -76.999935 ], [ -75.014648, -65.991212 ], [ -97.009277, -37.996163 ], [ -118.015137, 26.017298 ], [ -117.004395, 71.002660 ], [ -99.008789, 83.002167 ] ] ] } }
] }
] }
] }