Open mourner opened 8 years ago
Interesting. I guess it's time to start doing fuzz testing.
Minimal test case that breaks:
cover.tiles({
"type": "Polygon",
"coordinates": [[[152,85], [154,89], [161,82], [147,82], [150,87], [152,85]]]
}, {min_zoom: 4, max_zoom: 4});
Looks like it bugs out on out-of-range latitudes.
Will likely be fixed by https://github.com/mapbox/tilebelt/pull/27 after some improvements.
@morganherlocker when feeding tile-cover with
require('geojson-random').polygon(10)
, it occasionally includes a bad tile that looks like this:z: -24, x: -435.99999994039536, y: -1.9999999403953552
.Looks like some backwards loop doesn't stop at 0 somewhere. It may be caused by polygons that exceed normally expected coords (-180..180, -85..85), but not sure.
This is the what caused livetile builds to fail sporadically. cc @rclark