looking in
details at the way I get the WKT string, I notice that sometimes
this
string contains the Bursa-Wolf parameters and sometimes it doesn't ;
Bursa-Wolf parameters seems related to the presence of parameter TOWGS84[..]
to get this WKT string I write the following code :
CoordinateReferenceSystem crsSrc =
ReferencingFactoryFinder.getCRSAuthorityFactory("EPSG",
null).createCoordinateReferenceSystem(EPSGsrc);
and then crsSrc.toWKT() gives the WKT specification for EPSGsrc
if EPSGsrc="EPSG:2056" (Liechtenstein and Switzerland) I do get the parameter
TOWGS84[..] in the WKT string
and then the library gt-epsg-hsql-2.6.3.jar is not required and the use of WKT
projections is correct
(as described in my code at the bottom of this email))
if EPSGsrc="EPSG:27572" (France) I don't get parameter TOWGS84[..] and the
library gt-epsg-hsql-2.6.3.jar is required
so my question is :
how can I get a complete and an accurate WKT string from a given EPSG code ?
thanks a lot
Jean-Marie
From: [email protected]
To: [email protected]
Date: Wed, 12 May 2010 11:36:28 +0200
Subject: Re: [Geotools-gt2-users] error when trying to use WKT projections
without library gt-epsg-hsql-2.6.3.jar
thanks Andrea for your answer
i could checked in my example what you said ; the error is too big regarding
the latitude (around 345 meters !)
well does it mean that I can't take into account Bursa-Wolf parameters without
using gt-epsg-hsql-2.6.3.jar ?
or is there a way to make this library lighter ?
cheers
Jean-Marie
> Date: Wed, 12 May 2010 11:07:33 +0200
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: [Geotools-gt2-users] error when trying to use WKT projections
> without library gt-epsg-hsql-2.6.3.jar
>
> 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.
Vous voulez protéger votre vie privée ? La solution avec Internet Explorer 8
_________________________________________________________________
Vous voulez regarder la TV directement depuis votre PC ? C'est très simple avec
Windows 7
http://clk.atdmt.com/FRM/go/229960614/direct/01/------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users