zze-M2S FRISON V ext RD-BIZZ-SOP a écrit : > GeoTools is not bugged, it's about my use...
I would rather said a lack of documentation of Geotoools. Don't worry, we realize that this is one of Geotools weakness; many users had issues with CRS (among other parts) because informations is hard to find in Geotools. And of course Geotools do have bugs too, so reports that can help us to find them are useful. > But even if add the "true" argument in CRS.decode() I have the same values! :( > In fact WKTs are exactly the same: EPSG:4326 are still in grade units > (EPSG:4326 was already in degree units before adding the extra argument). > Should I upgrade to Geotools 2.4-SNAPSHOT? This is one area where the behavior between 2.3 and 2.4 may be sligtly different; it may be related to http://jira.codehaus.org/browse/GEOT-1237 but I'm not sure; it will need more investigation. I would recommand to stay with stable version (2.3) for now; it is safer. In the mean time posible workaround are: 1) Uses grade units as specified by EPSG, or 2) Set the hints yourself, as in the example below: final Hints hints = new Hints(); hints.put(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE); hints.put(Hints.FORCE_STANDARD_AXIS_UNITS , Boolean.TRUE); // You may or may not set FORCE_STANDARD_AXIS_DIRECTIONS too, at your choice. CRSAuthorityFactory crsFactory = FactoryFinder.getCRSAuthorityFactory("EPSG", hints); CoordinateReferenceSystem sourceCRS = crsFactory.createCoordinateReferenceSystem("EPSG:xxxx"); CoordinateReferenceSystem targetCRS = crsFactory.createCoordinateReferenceSystem("EPSG:4326"); Advantage of 2 is that you get more control on the factory behavior (it is the way that give you the maximum control actually; CRS.decode(String, boolean) is just a shortcut for convenience). Does the CRS looks better that way? Martin ------------------------------------------------------------------------- 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-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
