Hi Jody

I tried to debug from line :

String code = CRS.lookupIdentifier( example, true ); // should be "EPSG:4230"

and from

CoordinateReferenceSystem crs = CRS.decode( code );

but I didn't come accross the method "equalsIgnoresMetadata" although this 
method is visible several times in CRS.java ;

if you are talking about a method equalsIgnoresMetadata inside of CRS.java, I 
wonder from which method you get there ;
I must miss something...

by the way I noticed that CRS.java has a main class that can display the 
Bursa-Wolf parameters using parameter -bursawolfs 
in a command line

unfortunately for "EPSG:27572" no Bursa-Wolf parameter are displayed (even if 
it requires gt-epsg-hsql-2.6.3.jar) !
here is the result :

???????????????????????????????????????????????????
? Destination ? dx ? dy ? dz ? ex ? ey ? ez ? ppm ?
???????????????????????????????????????????????????
???????????????????????????????????????????????????

in desperation, I took the Bursa-Wolf parameters from the spatialreference.org 
site which gives a correct result,
namely TOWGS84[-168,-60,320,0,0,0,0] (and using only gt-referencing-2.6.3.jar)

If I can really get the parameters from the debug process it would be reassuring

thanks anyway

Jean-Marie

Subject: Re: [Geotools-devel] how to get Bursa-Wolf parameters in WKT strings
From: jody.garn...@gmail.com
Date: Mon, 17 May 2010 20:29:01 +1000
CC: geotools-gt2-users@lists.sourceforge.net
To: jm...@hotmail.fr



Hi Jean - we should keep this on the email list.
Can you try the code example and step through it with a debugger? This should 
help explain why it will hep you.1. You parse the WKT into a 
CoordinateReferenceSystem2. You look for a matching CoordinateReferenceSystem 
coming out of the official EPSG database    Inside that code it goes through 
and checks for a CoordinateReferenceSystem with the same values as yours; 
ignoring the metadata (such as name and description). The method is called 
"equalsIgnoresMetadata" if you are interested.3. It returns you a match ... and 
that match includes Bursa Wolf Parameters
Jody
On 17/05/2010, at 7:37 PM, Jean Marie wrote: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: jody.garn...@gmail.com
Date: Thu, 13 May 2010 08:35:11 +1000
CC: geotools-de...@lists.sourceforge.net
To: jm...@hotmail.fr

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
geotools-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Votre vie privée l'est-elle vraiment ? Internet Explorer 8 vous protège 
gratuitement !
                                          
_________________________________________________________________
Installez gratuitement les nouvelles Emoch'ticones !
http://www.ilovemessenger.fr/emoticones/telecharger-emoticones-emochticones.aspx
------------------------------------------------------------------------------

_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to