mrgeo
mrgeo copied to clipboard
Translation of geospatial coordinates to TMS tiles should handle 90 degrees latitude
When performing a rasterize vector operation, if the input vector data includes any points with latitude of 90.0, a "TileId out of range" exception is thrown by the TileIdPartitioner.
As background information, The top boundary of a TMS tile is actually part of the tile above it, and the right boundary of a tile is actually part of the tile to the right of it. This works perfectly until we get to 90.0 latitude. In this case, we should treat the point as if it is within the top row of that zoom level. We should also consider throwing an IllegalArgumentException if the latitude is < -90 or > 90 (with an appropriate EPSILON since these are floating point values)