Okay I must just be going crazy; it is functioning as expected - more complete
example follows:
try {
Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,
Boolean.TRUE);
assertEquals( AxisOrder.EAST_NORTH,
CRS.getAxisOrder(CRS.decode("EPSG:4326",false)));
assertEquals( AxisOrder.EAST_NORTH,
CRS.getAxisOrder(CRS.decode("EPSG:4326",true)));
assertEquals( AxisOrder.NORTH_EAST,
CRS.getAxisOrder(CRS.decode("urn:x-ogc:def:crs:EPSG::4326",false)));
assertEquals( AxisOrder.NORTH_EAST,
CRS.getAxisOrder(CRS.decode("urn:x-ogc:def:crs:EPSG::4326",true)));
} finally {
Hints.removeSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER);
}
try {
assertEquals( AxisOrder.NORTH_EAST,
CRS.getAxisOrder(CRS.decode("EPSG:4326",false)));
assertEquals( AxisOrder.EAST_NORTH,
CRS.getAxisOrder(CRS.decode("EPSG:4326",true)));
assertEquals( AxisOrder.NORTH_EAST,
CRS.getAxisOrder(CRS.decode("urn:x-ogc:def:crs:EPSG::4326",false)));
assertEquals( AxisOrder.NORTH_EAST,
CRS.getAxisOrder(CRS.decode("urn:x-ogc:def:crs:EPSG::4326",true)));
} finally {
}
try {
System.setProperty("org.geotools.referencing.forceXY", "true");
assertEquals( AxisOrder.NORTH_EAST,
CRS.getAxisOrder(CRS.decode("EPSG:4326",false)));
assertEquals( AxisOrder.EAST_NORTH,
CRS.getAxisOrder(CRS.decode("EPSG:4326",true)));
assertEquals( AxisOrder.NORTH_EAST,
CRS.getAxisOrder(CRS.decode("urn:x-ogc:def:crs:EPSG::4326",false)));
assertEquals( AxisOrder.NORTH_EAST,
CRS.getAxisOrder(CRS.decode("urn:x-ogc:def:crs:EPSG::4326",true)));
} finally {
System.getProperties().remove("org.geotools.referencing.forceXY");
}
------------------------------------------------------------------------------
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