Hello Martin That was *fast*!
OK, to answer your first question: for what I know, everybody over here writes data using decimal degrees (no such crazy things as 10.30 == 10°30' as far as I know!) So, I guess to override that DMS directive and treat everything as decimal degrees, I should try your workaround, right? I'll get back to you when I've done that. Thanks again for the almost realtime feedback! Milton Martin Desruisseaux wrote: > Milton Jonathan a écrit : >> Besides trying to read files referenced in this way, I've also made >> attempts to build a MathTransform involving a CRS with code EPSG:4291, >> but I end up with a "Unit conversion from "°" to "DMS" is non-linear" >> exception. > > The conversions from DMS units to decimal degrees is not yet implemented > in GeoTools. However I would be very interrested to known if DMS units > are really used in practice (if not, then GeoTools should not try to > convert them). For example which values are used for 10°30'S in "real" > database used in Brazil with the EPSG:4291 CRS? Is it 10.30 (DMS) or > 10.50 (decimal degrees)? > > >> However, I've seen no way to make things work using >> Hints.FORCE_STANDARD_AXIS_UNITS, as suggested over there. If I try to >> initialize GeoTools with this hint turned on, I get a >> NoSuchAuthorityCodeException whenever trying to decode a CRS. > > I need to investigate that. As a temporary workaround, you may try to > edit the DirectEpsgFactory class, lines 144 to 161, and replace the unit > corresponding to the EPSG code of the units used in your CRS (I don't > know which one it is). For example you may replace Units.SEXAGESIMAL_DMS > by NonSI.DEGREE_ANGLE. You may need to performs similar change in > AbstractEpsgFactory (the equivalent lines are closer to the bottom of > the files). This code duplication is very ugly, but its not mine (and I > didn't had the time to clean them yet). > > Martin > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users