Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER breaks epsg-extension like factories
---------------------------------------------------------------------------
Key: GEOT-1699
URL: http://jira.codehaus.org/browse/GEOT-1699
Project: GeoTools
Issue Type: Bug
Components: core referencing
Affects Versions: 2.4-RC0, 2.4-RC1, 2.5-M1
Reporter: Andrea Aime
Assignee: Martin Desruisseaux
Priority: Critical
Fix For: 2.5-M1
When I checked the resolution of GEOT-1659 I noticed that it was still
impossible to use two geoservers in the same VM due to another issue.
Again, the problem tracks down to the usage of
Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER: when enabled, it seems epsg-extension
style
factories won't work if one of the wkt codes defined in the property file has
either:
* lat/lon oriented axis
* uses a custom projection.
Showing the issue it's relatively easy. Take the EsriExtension file and change
the main() to look like:
{code}
public static void main(final String[] args) throws FactoryException {
Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,
Boolean.TRUE);
Hints.putSystemDefault(Hints.FORCE_AXIS_ORDER_HONORING, "http");
CRS.decode("EPSG:20002");
System.out.println("Success");
{code}
This shoudl work. Now go into esri.properties and register the following code:
{panel}
45556=PROJCS["Albers Equal area",GEOGCS["WGS 84", DATUM["World Geodetic System
1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH],
AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4326"]], PROJECTION["Albers
Equal Area", AUTHORITY["EPSG","9822"]], PARAMETER["central_meridian", -96.0],
PARAMETER["latitude_of_origin", 37.5], PARAMETER["standard_parallel_1",
29.833333333333336], PARAMETER["false_easting", 0.0],
PARAMETER["false_northing", 0.0], PARAMETER["standard_parallel_2",
45.833333333333336], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing",
NORTH], AUTHORITY["EPSG","45556"]]
{panel}
This will make the above fail. The same happens if the following code is
registered:
{panel}
900913=PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984",
SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude",
NORTH]], PROJECTION["Mercator_1SP_Google"], PARAMETER["latitude_of_origin",
0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0],
PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m",
1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","900913"]]
{panel}
I'm attaching the custom projection and its registration so that you can
reproduce the issue.
Btw, the above issues can be reproduced by using a single geoserver deploy as
well if instead of using
{{System.setProperty("org.geotools.referencing.forceXY", "true");}} we use
{{Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER,
Boolean.TRUE);}} directly.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel