Wrong tile for crazy 0,0-spanning bbox
Closed this issue · 2 comments
sgillies commented
We've got the bbox [-0.000001,-1.000001,1000000,999999]
in cardboard's tests. I expect that since it spans both the equator and the prime meridian its tile would be [0,0,0]
despite being way off the globe at the upper right, yes? I'm finding this.
> require('tilebelt').bboxToTile([-0.000001,-1.000001,1000000,999999])
[ 0, 1, 1 ]
morganherlocker commented
hm, in my opinion [-0.000001,-1.000001,1000000,999999]
is an invalid bbox, since north and east are out of coordinate range. Do you have any new thoughts on this @sgillies?
sgillies commented
I think it's the north that's more problematic than the east, right? I'd be okay with an error being raised if the input latitudes were +/- 90.