Closed davidtheclark closed 8 years ago
I added a function that normalizes longitudes by ensuring that they fall within the +/-180 range. This fixes the failing test case and doesn't cause any other tests to fail.
@rclark Just pinging you so this is on your radar. We talked about it anyway. BTW: Do you think Coveralls has anything to say about it?
💔 coveralls
I suspect that the minzoom
and maxzoom
numbers I'm getting for the new tests are wrong. I'm not sure, though, and am not sure how to know. So I could use some guidance here from anybody more experienced.
You zoom ranges do not look wrong:
What zoom ranges do you get for these tests without your code change?
Ok, thanks! Without the code changes we get errors thrown instead of zoom ranges.
I changed the way the extent gets "normalized" so that it doesn't bother trying to re-scope the longitudes, just stops them at +/-180.
@rclark What do you think about merging this? (Or is there someone else I should ping?) The alternative would be change something upstream so that the end user of an upload gets an error that's more meaningful to them than Error calculating min/max zoom: Bounds invalid
.
I'm going to close this and open another, more focused and directed issue/ticket.
I think this may be connected to https://github.com/mapbox/mapnik-omnivore/issues/142, and may illustrate an incomplete resolution to https://github.com/mapbox/mapnik-omnivore/issues/88.
As far as I can tell, this new fixture is valid GeoJSON, but when we try to get its min/max zoom, we end up hitting the error here: https://github.com/mapbox/mapnik-omnivore/blob/805d115acece01aa1977a0f4ba303bb7977bacf2/lib/utils.js#L27