Hi Kevin,
The problem is being introduced by the latitudes. These projections are only valid between 85 and -85 degrees latitude. if you go to 90/-90, things get all wonky.
Hope this helps,
- Don
=-=-=-=-=-=-=-=-=
Don Dietrick
_at_dfdietrick
=-=-=-=-=-=-=-=-=
On Thursday, March 22, 2012 at 9:19 AM, Kevin Pfarr wrote:
> Ran into an issue with the MapTileLayer using a data set generated from
> GDAL. The TMSMapTileCoordinateTransform.getTileBoundsForProjection() is
> returning the following values;
>
> [28, 0, 2147483647, 4]
>
> The third parameter is causing a loop to take a long time looking up tiles.
>
> The parameters for getTileBoundsForProjection() are;
>
> upperLeft = LatLonPoint.Double[lat=90.0,lon=-179.99999564141046]
> lowerRight = LatLonPoint.Double[lat=-90.0,lon=179.64843314992333]
> zoomLevel = 2
>
> So I'm not sure where the problem is but here are a few ideas.
>
> First; In the method latLonToTileUV() for lowerRight is returning
> Point2D.Double[3.996093701665815, -Infinity]. So is -Infinity wrong?
>
> Next; In getTileBoundsForProjection() where uvlr is processed, First
> Math.floor(-Infinity) returns -Infinity, then it is casted to an int,
> then subtract one resulting in Integer.MAX_VALUE. The causes the if
> check not to set it to 0. So are there missing parentheses; -Infinity -
> 1 then cast it to an int as below?
>
> int uvbottom = (int) (Math.floor(uvlr.getY()) - 1);
>
> Kevin
>
> --
> Kevin Pfarr Senior Software Engineer
>
> Asynchrony Solutions, Inc.
> 1701 Washington Avenue
> Saint Louis, Missouri 63103
> www.asolutions.com (http://www.asolutions.com)
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com (mailto:majdart_at_bbn.com)"
> with the following text in the BODY of the message "unsubscribe openmap-users"]
>
>
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Mar 22 2012 - 12:35:02 EDT