From: Jean M. <jm...@ho...> - 2010-05-17 09:37:23
|
Hi jody I had a look at the example given at : http://docs.codehaus.org/display/GEOTDOC/01+CRS+Helper+Class#01CRSHelperClass-SearchingforaCoordinateReferenceSystem I think you refer to the following code : ----- String code = CRS.lookupIdentifier( example, true ); // should be "EPSG:4230"CoordinateReferenceSystem crs = CRS.decode( code ); ------ well I don't know how this can help me ; you talked also about an "Equals" method that could assist me ; well I don't see how if you could give me some further details it would be helpfull as I don't know how to sort out this problem of String WKT which sometimes contains all parameters required and sometimes doesn't thanks a lot Jean-Marie Subject: Re: [Geotools-devel] how to get Bursa-Wolf parameters in WKT strings From: jod...@gm... Date: Thu, 13 May 2010 08:35:11 +1000 CC: geo...@li... To: jm...@ho... Hi Jean Here is what I kind of do; I use the CoordinateReferenceSystem created my WKT to look up the "Real" CoordinateReferenceSystem produced by the EPSG database (which is much more complete). There is an "Equals" method that ignores metadata to assist you with this; and because I find CoordinateReferenceSystem stuff difficult to manage by hand there should be a helper method ... Yes there is - indeed it is one of the use-cases covered by the user guide:- http://docs.codehaus.org/display/GEOTDOC/01+CRS+Helper+Class#01CRSHelperClass-SearchingforaCoordinateReferenceSystem Cheers, Jody On 13/05/2010, at 3:15 AM, Jean Marie wrote:Hello my purpose is to get a list of projection systems described in a WKT format (so using gt-epsg-hsql-2.6.3) ; and then to use these WKT representations to achieve tranformations using only the library gt-referencing-2.6.3.jar to get these WKT strings I use the following code : CoordinateReferenceSystem crsSrc = ReferencingFactoryFinder.getCRSAuthorityFactory("EPSG", null).createCoordinateReferenceSystem(EPSG); and then crsSrc.toWKT() gives the WKT specification for EPSG I took 3 WKT representations for respectively EPSG = "EPSG:4326", EPSG = "EPSG:2056" and EPSG = "EPSG:27572" then I created for each one a CoordinateOperationFactory object to carry out 2 transformations : one from 4326 to 2056 (Switzerland) et the other from 4326 to 27572 (France) using the WKT strings I noticed that the WGS84 to Swiss transformation is correct, while the WGS84 to French transformation generates an error saying that Bursa-Wolf parameters are required ; I would like to know how to sort out this problem as I need accurate results and I cannot afford to use the following code involving some transformation errors: CRS.findMathTransform(crsSrc, crsDest, true) is it possible to get Bursa-Wolf parameters in each WKT representation ? thanks a lot Jean-Marie Vous voulez protéger votre vie privée ? La solution avec Internet Explorer 8 ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list Geo...@li... https://lists.sourceforge.net/lists/listinfo/geotools-devel _________________________________________________________________ La boîte mail NOW Génération vous permet de réunir toutes vos boîtes mail dans Hotmail ! http://www.windowslive.fr/hotmail/nowgeneration/ |