mapbox / make-surface

Vector surfaces creation routines
MIT License
89 stars 18 forks source link

Extra row of triangles generated outside of top bounds #71

Closed MateoV closed 9 years ago

MateoV commented 9 years ago

@dnomadb There looks to be some sort of rounding error with the top bounds that causes the very top row of triangles to be created outside the bounds:

{"type":"Feature","properties":{"quadtree":"s2s2s2s3s3s2s3s3s2n2n2n"},"geometry":{"type":"Polygon","coordinates":[[[-142.03125,85.0511287798066],[-141.85546875,85.0662697036382],[-142.03125,85.0662697036382],[-142.03125,85.0511287798066]]]}}

notice that 85.0662697036382 is greater than the web mercator bound of 85.0511287798066

MateoV commented 9 years ago

This may also be causing a row to be left out at the bottom, as the min bound of triangles is at -85.035941506574

dnomadb commented 9 years ago

Fixed by negative padding the bounds generated from a --tile option.