Thanks Martin,
I have created a new WKT and used the following code :

CRSFactory crsFactory = FactoryFinder.getCRSFactory(null);
targetCRS = crsFactory.createFromWKT(wkt);

My WKT is :

"PROJCS[\"NTF (Paris) / Lambert zone II\", "
+ "GEOGCS[\"NTF (Paris)\", "
+ "DATUM[\"Nouvelle Triangulation Francaise (Paris)\", "
+ "SPHEROID[\"Clarke 1880 (IGN)\", 6378249.2, 293.4660212936269], "
+ "TOWGS84[-168,-60,320,0,0,0,0]], "
+ "PRIMEM[\"Paris\", 2.5969213], "
+ "UNIT[\"grade\",0.015707963267948967], "
+ "AXIS[\"Longitude\",EAST], "
+ "AXIS[\"Latitude\",NORTH]], "
+ "PROJECTION[\"Lambert Conic Conformal (1SP)\"], "
+ "PARAMETER[\"semi_major\", 6378249,2], "
+ "PARAMETER[\"semi_minor\", 6356515], "
+ "PARAMETER[\"central_meridian\", 0.0], "
+ "PARAMETER[\"latitude_of_origin\", 52.0], "
+ "PARAMETER[\"scale_factor\", 0.99987742], "
+ "PARAMETER[\"false_easting\", 600000.0], "
+ "PARAMETER[\"false_northing\", 2200000.0], "
+ "UNIT[\"metre\",1.0], "
+ "AXIS[\"x\",EAST], "
+ "AXIS[\"y\",NORTH]]";

The transformation produces an accurate and correct result.
I also send a request to the EPSG in order to add this transformation in the next release of the database.

Regards,
Loïc


----- Original Message ----- From: "Martin Desruisseaux" <[EMAIL PROTECTED]>
To: "Loïc MAZE" <[EMAIL PROTECTED]>
Cc: <geotools-gt2-users@lists.sourceforge.net>
Sent: Thursday, May 11, 2006 2:21 AM
Subject: Re: [Geotools-gt2-users] CRS transformation not accurate


Loïc MAZE a écrit :
The only data which can be interesting is about the transformation : NTF => WGS84. I don't know if it is useful for Geotools or not.

The following command line:

java -classpath gt2-epsg-access-2.3-SNAPSHOT.jar org.geotools.referencing.factory.epsg.DefaultFactory 4275

show the following:

GEOGCS["NTF",
  DATUM["Nouvelle Triangulation Francaise",
SPHEROID["Clarke 1880 (IGN)", 6378249.2, 293.4660212936269, AUTHORITY["EPSG","7011"]],
    TOWGS84[-168.0, -60.0, 320.0, 0.0, 0.0, 0.0, 0.0],
    AUTHORITY["EPSG","6275"]],
  PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
  UNIT["degree", 0.017453292519943295],
  AXIS["Geodetic latitude", NORTH],
  AXIS["Geodetic longitude", EAST],
  AUTHORITY["EPSG","4275"]]

So its look like that a TOWGS84 element is defined for EPSG:4275, but not for EPSG:27572 (even if they use the same spheroid - EPSG seems to still consider them as two different datum, not sure why).

You may try the following:

    FactoryFinder.getCRSFactory(null).parseWKT(wkt);

where wkt is:

PROJCS["NTF (Paris) / Lambert zone II",
  GEOGCS["NTF (Paris)",
    DATUM["Nouvelle Triangulation Francaise (Paris)",
SPHEROID["Clarke 1880 (IGN)", 6378249.2, 293.4660212936269, AUTHORITY["EPSG","7011"]],
      TOWGS84[-168.0, -60.0, 320.0, 0.0, 0.0, 0.0, 0.0],
      AUTHORITY["EPSG","6807"]],
    PRIMEM["Paris", 2.5969213, AUTHORITY["EPSG","8903"]],
    UNIT["grade", 0.015707963267948967],
    AXIS["Geodetic latitude", NORTH],
    AXIS["Geodetic longitude", EAST],
    AUTHORITY["EPSG","4807"]],
  PROJECTION["Lambert Conic Conformal (1SP)", AUTHORITY["EPSG","9801"]],
  PARAMETER["central_meridian", 0.0],
  PARAMETER["latitude_of_origin", 52.0],
  PARAMETER["scale_factor", 0.99987742],
  PARAMETER["false_easting", 600000.0],
  PARAMETER["false_northing", 2200000.0],
  UNIT["m", 1.0],
  AXIS["Easting", EAST],
  AXIS["Northing", NORTH],
  AUTHORITY["EPSG","27572"]]

i.e. the output of java [...] DefaultFactory 27572 with the TOWGS84 element copied from java [...] DefaultFactory 4275. I'm really not sure that it is okay; lets see if the output is better.

Martin.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to