Janusz Dalecki ha scritto: > Hi, > > I am creating a MathTransform using CRS.findMathTransform() to transform > coordinates from one CRS to another. > > How can I find out from CRS which coordinates convention it is using > (first lat then long or the other way around) so I can pass lat/long in > correct order when calling transform method?
Look at the axis names in the coordinate system stored inside the CRS. But if you don't set anything, almost all geographic systems will be in lat/lon order, almost all projected ones in east/north order. If you set this at the beginning of your program: Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE); you'll always get lon/lat instead, which works fine with most data sources (lat/lon is the default order only in a few formats, GML3, GeoRSS, GPX, as far as I remember). Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users