geotools/geotools — pull request #39 by jive (2012-10-11 14:29:31+00:00)
Title: Check axis order in Layer.getEnvelope and GetMap.setBounds( Envelope )

Refactored out a toServerCRS method which takes server version into account when determining a CoordinateReferenceSystem object.

This method is now used by CRSEnvelope to ensure the CoordinateReferenceSystem in the data structure matches the server. Layer.getEnvelope will then use a transform to process the data into the Envelope the user expects (according the global forceXY setting).

On the other side of the coin the GetMap.setBounds(Envelope) transforms the provided Envelope and makes sure the GetMap request is filled in to correctly match the order the Server (not the local client) expects. I considered doing this as part of issuing the GetMapRequest - but then we would of had a data structure that did not represent what was being sent over.

Note the methods used by WMS cascade - setBounds( String ) and setSRS( String ) remain fire and forget and do not make any attempt at consistency.

For context of this issue see https://jira.codehaus.org/browse/GEOT-4283 WMS 1.3.0 GetMap Request