Andrea Aime a écrit :
> In this case the singularity is the south pole, whose latitude is
> determined, but longitude is not. When you have it, you should add
> the -180,180 range to envelope longitudes (or I'm missing something)?
Longitude would be tested too, like every bounded axis (no matter which axis it
is). In the particular case of South Pole, the longitude is irrelevant, but this
is just a particular case. Generally speaking, we have a choice:
Testing (-180, -90), (180, -90), (-180, 90), (180, 90)
or testing (-180, centerY), (180, centerY), (centerX, -90), (centerX, 90).
Where (centerX, centerY) are relative to the initially transformed envelope. I
tend toward the later. It make no difference for polar projections, but may make
a difference for the 180° longitude bounds. Consider a MercatorProjection where
the transformed envelope is between 20°N and 40°N. If we try to project (-180,
90) and its friends, we will get a TransformException because Mercator
projection is not supported at the pole. If we try to project (-180, centerY)
instead, we will get a valid point. If this point is inside the source envelope
because this envelope overlaps the 180° longitude, the transformed envelope will
be expanded on the full (-180 to 180) width. This is quite large, but at least
it is correct, better than actual behavior which return a completly wrong target
envelope when the source envelope overlaps the 180° longitude.
Martin
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel