mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +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:
@@ -19,43 +19,43 @@
|
||||
,
|
||||
{ "type": "FeatureCollection", "properties": { "zoom": 11, "x": 327, "y": 791 }, "features": [
|
||||
{ "type": "FeatureCollection", "properties": { "layer": "subway", "version": 2, "extent": 4096 }, "features": [
|
||||
{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.47900390625, 0.6826171875 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Castro Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.479248046875, 0.682861328125 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.4794921875, 0.68310546875 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Castro Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.4794921875, 0.683349609375 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Forest Hill Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.346435546875, 0.785888671875 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.667724609375, 0.494873046875 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.66796875, 0.494873046875 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.6689453125, 0.495361328125 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Montgomery Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.6689453125, 0.49560546875 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.699462890625, 0.46435546875 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.69970703125, 0.464599609375 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ 0.7001953125, 0.46337890625 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ 0.700439453125, 0.46337890625 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Embarcadero Station" }, "geometry": { "type": "Point", "coordinates": [ 0.700439453125, 0.463623046875 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.608642578125, 0.5556640625 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.60888671875, 0.5556640625 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.56982421875, 0.59228515625 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Van Ness Station Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.570068359375, 0.592529296875 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.5703125, 0.593017578125 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ 0.57080078125, 0.593505859375 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Van Ness Station" }, "geometry": { "type": "Point", "coordinates": [ 0.57080078125, 0.59375 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.5703125, 0.59375 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Van Ness Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.570556640625, 0.593994140625 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ 0.594482421875, 0.567626953125 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Outbd" }, "geometry": { "type": "Point", "coordinates": [ 0.5947265625, 0.567626953125 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Civic Center Station/Downtn" }, "geometry": { "type": "Point", "coordinates": [ 0.595703125, 0.568603515625 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.51318359375, 0.649169921875 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Church Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.51318359375, 0.6494140625 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.513916015625, 0.650146484375 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Church Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.51416015625, 0.650390625 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Powell Station/Outbound" }, "geometry": { "type": "Point", "coordinates": [ 0.635498046875, 0.527099609375 ] } }
|
||||
,
|
||||
{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.635986328125, 0.52783203125 ] } }
|
||||
{ "type": "Feature", "properties": { "name": "Metro Powell Station/Downtown" }, "geometry": { "type": "Point", "coordinates": [ 0.63623046875, 0.52783203125 ] } }
|
||||
] }
|
||||
] }
|
||||
,
|
||||
|
||||
Reference in New Issue
Block a user