Martin Desruisseaux ha scritto:
> Andrea Aime a écrit :
>> Sounds good. Let me know when you have something I can test in Geoserver :)
> 
> Commited to Geotools trunk as of revision 25779 (took me the whole day). Not
> sure if it is directly usable for Geoserver however (see below).
> 
> Using the Envelope given in previous Andrea's email for testing purpose 
> (Andrea
> said that this envelope "is everything beneath a certain parallel, probably 
> the
> -40° one, towards the pole"), I got:
> 
> Before the fix:
> -178.5 to 137.6 in longitude and -40.9 to -88.99 in latitude
> 
> After the fix:
> -180.0 to 180.0 in longitude and -40.9 to 90.0 in latitude.
> The 180.0 and 90.0 bounding are exact (no rounding errors).

Hi Martin,
today I tried the fix. It was working much better than before, yet I 
still managed to spot corner cases where it did not work.
The issue was that the algorithm used the projected envelope center
for axis extrema tests, but there was no guaratee this point was
inside the original envelope due to how the first projected envelope
was computed (it's larger than the actual projection, for starters).
So I took the liberty of adding a test and modifying che code so
that the source envelope center was used (after projecting it
to the destination CRS). This works better, I could not spot
any other corner cases where it did not work.

Please have a look at the patch, and many thanks for your work :)
Cheers
Andrea

-------------------------------------------------------------------------
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

Reply via email to