Hi Simon,

Do you mean that sometimes EPSG database could be wrong (even for very usual 
SRS like WGS84)???

Here is the logger ouput:

INFO [main] (TestFeatureTransforming.java:24): WGS84: GEOGCS["WGS 84", 
  DATUM["WGS_1984", 
    SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], 
    AUTHORITY["EPSG","6326"]], 
  PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], 
  UNIT["degree", 0.017453292519943295], 
  AXIS["Lon", EAST], 
  AXIS["Lat", NORTH], 
  AUTHORITY["EPSG","4326"]]

INFO [main] (TestFeatureTransforming.java:25): Lambert2: 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.33722917, AUTHORITY["EPSG","8903"]], 
    UNIT["grade", 0.015707963267948967], 
    AXIS["Lon", EAST], 
    AXIS["Lat", NORTH], 
    AUTHORITY["EPSG","4807"]], 
  PROJECTION["Lambert_Conformal_Conic_1SP"], 
  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["x", EAST], 
  AXIS["y", NORTH], 
  AUTHORITY["EPSG","27572"]]

It looks pretty "normal" doesn't it?

And you're right, my lat is ~43.0 and lon is ~7.0 but if I try to transform 
Coordinate(43, 7), I have totally wrong values. That's why I used lon/lat 
instead of lat/lon wich give me realistic values (but not accurate). In these 
WKTs longitudes are declared before latitudes. Is it what you called "wrong 
axis order"? 

Anyway I don't see how this axis order issue could explain the imprecision...

Thanks, Vincent.


-----Message d'origine-----
De : Martin Desruisseaux [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 17 avril 2007 17:12
À : zze-M2S FRISON V ext RD-BIZZ-SOP
Cc : [email protected]
Objet : Re: [Geotools-gt2-users] WGS84 to Lambert2e transforming

zze-M2S FRISON V ext RD-BIZZ-SOP a écrit :
> I'm trying with the usual EPSG code 4326 for WGS84 and 27572 for 
> Lambert2e but the result is not accurate at all : the shift is around 
> 1 km for the latitude and more than 19 kms for the longitude!

Watchout for axis order. Sound like that a majority of "Geotools 
transformations are not accurate" emails on geotools users mailing list are 
caused by wrong axis order.

> logger.info("WGS84: " + crsWGS84.toWKT());

What do you get? "AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", 
EAST]" or the converse?

> Coordinate c1 = new Coordinate(7.0, 43.0);

If the logger printed latitude first, then you probably want Coordinate(43, 7) 
(assuming you live in Europe).

        Martin

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to