Le mardi 20 février 2007 à 15:08 +0100, Andrea Aime a écrit :
> > If I do the same calculation based on the epsg-wkt library (what is
> > not recommended) which does NOT include the required
> > Bursa-Wolf-Parameter for the Datum-Shift I get the correct result for
> > the calculated area! 
> 
> Hum, this one I leave to Martin, don't really know why you're
> getting such a big difference.

Watchout axis order. GeographicCRS in EPSG database are expected in
(latitude, longitude) axis order, while your data are probably
(longitude, latitude). The "epsg-wkt" library uses (longitude, latitude)
axis order, which is wrong according EPSG standard but right when
compared to common practice. All other EPSG factories like "epsg-hsql"
follow the EPSG standard unless explicitly specified.

http://docs.codehaus.org/display/GEOTOOLS/The+axis+order+issue

So you have a choice. Either replace the line:

Hints(Hints.CRS_AUTHORITY_FACTORY, DefaultFactory.class)

by

Hints(Hints.FORCE_LONGITUDE_FIST_AXIS_ORDER, Boolean.TRUE)

(the CRS_AUTHORITY_FACTORY hint should not be needed, and should be
avoided, if the "epsg-wkt" library is not in the classpath), or either
use:

  CRS.decode("EPSG:xxxx", true);

at your choice.

        Martin



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to