I have going through a couple laps of the WMS code around handling of bounding
boxes, and I am stuck :(
I need a reliable way to represent "EPSG:4326" in the official NORTH_EAST axis
order - *all* the time (so I can represent internally what WMS 1.3.0 server is
thinking).
0 ) When using no special settings:
- "EPSG:4326" EAST_NORTH
- "urn:x-ogc:def:crs:EPSG::4326" EAST_NORTH
1) When using Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,
Boolean.TRUE)
- "EPSG:4326" EAST_NORTH
- "urn:x-ogc:def:crs:EPSG::4326" NORTH_EAST
2) When using System.setProperty("org.geotools.referencing.forceXY", "true");
- "EPSG:4326" EAST_NORTH
- "urn:x-ogc:def:crs:EPSG::4326" EAST_NORTH
So I need a get out of jail free card, someway to arrive at NORTH_EAST axis
order, even when the global system forceXY property is set :(
Is this possible?
If not I will need to switch uDig from using technique (2) to using technique
(1)...
Here is the code I am using for testing (interesting that
"urn:x-ogc:def:crs:EPSG::4326" ignores the longitudeFirst boolean parameter):
CoordinateReferenceSystem WORLD = (CoordinateReferenceSystem)
CRS.decode("EPSG:4326",false);
assertEquals( AxisOrder.NORTH_EAST, CRS.getAxisOrder(WORLD));
CoordinateReferenceSystem WORLD2 = (CoordinateReferenceSystem)
CRS.decode("EPSG:4326",true);
assertEquals( AxisOrder.EAST_NORTH, CRS.getAxisOrder(WORLD2));
CoordinateReferenceSystem WORLD3 = (CoordinateReferenceSystem)
CRS.decode("urn:x-ogc:def:crs:EPSG::4326",false);
assertEquals( AxisOrder.NORTH_EAST, CRS.getAxisOrder(WORLD3));
CoordinateReferenceSystem WORLD4 = (CoordinateReferenceSystem)
CRS.decode("urn:x-ogc:def:crs:EPSG::4326",true);
assertEquals( AxisOrder.NORTH_EAST, CRS.getAxisOrder(WORLD4));
--
Jody Garnett
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users