mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Round coordinates instead of truncating them (#60)
* Round coordinates instead of truncating them * Update all the tests for coordinate rounding changes * Curses, integer division still truncates * Fix tests * Also round instead of shifting when looking for no-op linetos * Should I worry that the same change for moveto doesn't change any tests? * Also round instead of shifting when scaling down to maxzoom resolution * Replace another explicit shift, for origin point * Round instead of shift when writing clipped geometries to the next zoom * Fix low-zoom gridding and smaller-than-a-pixel checks * Don't guess an excessively large maxzoom when there is only one feature * Add a test for guessing the maxzoom of a single point * Explicitly sort by index if no other order distinguishes features * Another affected test
This commit is contained in:
@@ -20,11 +20,11 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 11 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721520, -37.166209 ], [ 174.721520, -37.166210 ], [ 174.721520, -37.166210 ], [ 174.721520, -37.166209 ], [ 174.721520, -37.166209 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 12 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721522, -37.166209 ], [ 174.721522, -37.166210 ], [ 174.721521, -37.166210 ], [ 174.721521, -37.166209 ], [ 174.721522, -37.166209 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "seq": 12 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721522, -37.166210 ], [ 174.721522, -37.166210 ], [ 174.721521, -37.166210 ], [ 174.721521, -37.166210 ], [ 174.721522, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 13 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721525, -37.166209 ], [ 174.721525, -37.166210 ], [ 174.721525, -37.166210 ], [ 174.721525, -37.166209 ], [ 174.721525, -37.166209 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "seq": 13 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721525, -37.166210 ], [ 174.721525, -37.166210 ], [ 174.721525, -37.166210 ], [ 174.721525, -37.166210 ], [ 174.721525, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 17 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721527, -37.166209 ], [ 174.721527, -37.166210 ], [ 174.721526, -37.166210 ], [ 174.721526, -37.166209 ], [ 174.721527, -37.166209 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "seq": 17 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721527, -37.166210 ], [ 174.721527, -37.166210 ], [ 174.721526, -37.166210 ], [ 174.721526, -37.166210 ], [ 174.721527, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 18 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721533, -37.166210 ], [ 174.721533, -37.166210 ], [ 174.721533, -37.166210 ], [ 174.721533, -37.166210 ], [ 174.721533, -37.166210 ] ] ] } }
|
||||
,
|
||||
@@ -38,17 +38,17 @@
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 26 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721545, -37.166210 ], [ 174.721545, -37.166210 ], [ 174.721544, -37.166210 ], [ 174.721544, -37.166210 ], [ 174.721545, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 27 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721546, -37.166210 ], [ 174.721546, -37.166211 ], [ 174.721546, -37.166210 ], [ 174.721546, -37.166210 ], [ 174.721546, -37.166210 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "seq": 27 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721546, -37.166210 ], [ 174.721546, -37.166211 ], [ 174.721546, -37.166211 ], [ 174.721546, -37.166210 ], [ 174.721546, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 29 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ], [ 174.721548, -37.166210 ], [ 174.721548, -37.166210 ], [ 174.721549, -37.166210 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "seq": 29 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 30 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ], [ 174.721549, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 32 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721557, -37.166210 ], [ 174.721557, -37.166211 ], [ 174.721556, -37.166211 ], [ 174.721556, -37.166210 ], [ 174.721557, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 34 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721559, -37.166210 ], [ 174.721559, -37.166211 ], [ 174.721559, -37.166211 ], [ 174.721559, -37.166210 ], [ 174.721559, -37.166210 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "seq": 34 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721559, -37.166210 ], [ 174.721560, -37.166211 ], [ 174.721559, -37.166211 ], [ 174.721559, -37.166210 ], [ 174.721559, -37.166210 ] ] ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "seq": 33 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721564, -37.166210 ], [ 174.721564, -37.166210 ], [ 174.721564, -37.166210 ], [ 174.721564, -37.166210 ], [ 174.721564, -37.166210 ] ] ] } }
|
||||
{ "type": "Feature", "properties": { "seq": 33 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 174.721564, -37.166210 ], [ 174.721564, -37.166211 ], [ 174.721564, -37.166211 ], [ 174.721564, -37.166210 ], [ 174.721564, -37.166210 ] ] ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
|
||||
Reference in New Issue
Block a user