Jean Marie ha scritto:
> Hello
> 
> I begin to use GeoTools to create projections described in WKF format in 
> order to proceed tranformations ;
> but to achieve this, it seems that I can't avoid the library 
> gt-epsg-hsql-2.6.3.jar
> while I think that gt-referencing-2.6.3.jar was enough ;
> 
> as an example I give you the code below which works fine if I add 
> gt-epsg-hsql-2.6.3.jar
> 
> // transformation WGS 84 --> French Lambert zone II
> 
> double Longitude=1.515; double Latitude=46.675 ;
> String wktsrc="GEOGCS[\"WGS 84\", DATUM[\"World Geodetic System 
> 1984\",....";
> String wktdst="PROJCS[\"NTF (Paris) / Lambert zone II\",GEOGCS[\"NTF 
> (Paris)\",.....";
> 
> CoordinateReferenceSystem crsSrc = CRS.parseWKT(wktsrc);
> CoordinateReferenceSystem crsDest = CRS.parseWKT(wktdst);
> CoordinateOperation op = coFactory.createOperation(crsSrc, crsDest);

Use CRS.findMathTransform(crsSrc, crsDest, true)
that should work fine.

Of course without Bursa-Wolf parameters in the definitions you'll get
big transfromation errors (40-80 meters usually, the actual value
varies a lot depending on the actual data, don't know what will be
in your case)

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------

_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to