-Dorg.geotools.referencing.forceXY=true makes CRS.decode fail -------------------------------------------------------------
Key: GEOT-1262 URL: http://jira.codehaus.org/browse/GEOT-1262 Project: GeoTools Issue Type: Bug Components: core referencing Affects Versions: 2.4.M2, 2.3.1 Reporter: Andrea Aime Assignee: Martin Desruisseaux Priority: Critical CRS.decode("EPSG:4326") fails with -Dorg.geotools.referencing.forceXY=true On 2.3.x it happens the same apparently. LongitudeFirstFactory is picked up by FactoryRegistry, but then isAcceptable returns false because the expected hints are not satisfied. In particular I extended LongitudFirstFactory.put to accept a default value, and then set default values in the constructor: public LongitudeFirstFactory(final Hints hints) { super(hints, DefaultFactory.PRIORITY + relativePriority()); put(null, Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE); put(hints, Hints.FORCE_STANDARD_AXIS_DIRECTIONS, Boolean.FALSE); put(hints, Hints.FORCE_STANDARD_AXIS_UNITS, Boolean.FALSE); } /** * Stores a value from the specified hints. */ private void put(final Hints source, final Hints.Key key, final Boolean defaultValue) { Object value; if (source != null) { value = source.get(key); if (value == null) { value = defaultValue; } } else { value = defaultValue; } hints.put(key, value); } I haven't checked trunk, but I suspect the issue is the same. -- 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 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 Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel