Apologies if this appears twice, does not seem to make it through.
I have done a few more tests on the definition of EPSG:3035 in geotools
(using epsg-hsql.jar).
I can now confirm that the results I am getting from 2.4-SNAPSHOT and
2.5-SNAPSHOT (using maven) are identical, based on the definition of the
system as:
PROJCS["ETRS89 / ETRS-LAEA",
GEOGCS["ETRS89",
DATUM["European Terrestrial Reference System 1989",
SPHEROID["GRS 1980", 6378137.0, 298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic latitude", NORTH],
AXIS["Geodetic longitude", EAST],
AUTHORITY["EPSG","4258"]],
PROJECTION["Lambert Azimuthal Equal Area", AUTHORITY["EPSG","9820"]],
PARAMETER["latitude_of_center", 52.0],
PARAMETER["longitude_of_center", 10.0],
PARAMETER["false_easting", 4321000.0],
PARAMETER["false_northing", 3210000.0],
UNIT["m", 1.0],
AXIS["Northing", NORTH],
AXIS["Easting", EAST],
AUTHORITY["EPSG","3035"]]
and the one I am getting from 2.4.0 (local, older jars) is different:
PROJCS["ETRS89 / ETRS-LAEA",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980", 6378137.0, 298.257222101,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Longitude", EAST],
AXIS["Latitude", NORTH],
AUTHORITY["EPSG","4258"]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["latitude_of_center", 52.0],
PARAMETER["longitude_of_center", 10.0],
PARAMETER["false_easting", 4321000.0],
PARAMETER["false_northing", 3210000.0],
UNIT["m", 1.0],
AXIS["x", EAST],
AXIS["y", NORTH],
AUTHORITY["EPSG","3035"]]
The older definition yields correct results (as in, compatible with
other products, for instance ESRI stuff and the web tool at
http://spatialreference.org). It seems that the axes order is switched
in the more recent database, for whatever reason.
The old definition is consistent with the OGC WKT definition from
http://spatialreference.org/ref/epsg/3035/:
PROJCS["ETRS89 / ETRS-LAEA",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],
UNIT["metre",1,AUTHORITY["EPSG","9001"]],
PROJECTION["Lambert_Azimuthal_Equal_Area"],
PARAMETER["latitude_of_center",52],
PARAMETER["longitude_of_center",10],
PARAMETER["false_easting",4321000],
PARAMETER["false_northing",3210000],
AUTHORITY["EPSG","3035"],
AXIS["X",EAST],
AXIS["Y",NORTH]]
my question about the axis order implementation in EPSG:4326 is still
unresolved. epsg:hsql assumes a lon/lat ordering and I am fine with
that, but that is never specified in any of the definitions at
http://spatialreference.org/ref/epsg/4326/ .
Thanks
Martin
Martin Tomko wrote:
> Dear all,
> I have a problem with inconsistent result between two independent
> program requiring projection from WGS84 (EPSG:4326) to EPSG:3035
> (ETRS89 / ETRS-LAEA)
> I have been developing a project using maven to access the
> 2.4-SNAPSHOT version of geotools. I have been happy with the result
> until I exported by data and visualized them against some legacy
> datasets in the EPSG:3035 projection. Mine were shifted away, and I
> localised the error as switched order of x and y coordinates. I am
> projecting from WGS84 and I suspected the order of lon/lat could be
> the problem. While
> http://docs.codehaus.org/display/GEOTDOC/The+axis+order+issue claims
> that the standard order for EPSG:4326 is lat,lon and suggests to use
> the explicit switch of the coordinates to work with lon/lat, this was
> not the problem, as it seems that the database holds these coordinates
> as lon/lat!!! (not according to the EPSG standard):
> see
> CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326");
> System.out.println("Source: "+sourceCRS);
> Source: 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["Longitude", EAST],
> AXIS["Latitude", NORTH],
> AUTHORITY["EPSG","4326"]]
>
> Anyway, I changed the order of lon and lat in my input data and tried
> the conversion to EPSG:3035. The output values were accurate, but in
> the wrong order - northing, then easting.
>
> Target: PROJCS["ETRS89 / ETRS-LAEA",
> GEOGCS["ETRS89",
> DATUM["European Terrestrial Reference System 1989",
> SPHEROID["GRS 1980", 6378137.0, 298.257222101,
> AUTHORITY["EPSG","7019"]],
> TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
> AUTHORITY["EPSG","6258"]],
> PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
> UNIT["degree", 0.017453292519943295],
> AXIS["Geodetic latitude", NORTH],
> AXIS["Geodetic longitude", EAST],
> AUTHORITY["EPSG","4258"]],
> PROJECTION["Lambert Azimuthal Equal Area", AUTHORITY["EPSG","9820"]],
> PARAMETER["latitude_of_center", 52.0],
> PARAMETER["longitude_of_center", 10.0],
> PARAMETER["false_easting", 4321000.0],
> PARAMETER["false_northing", 3210000.0],
> UNIT["m", 1.0],
> AXIS["Northing", NORTH],
> AXIS["Easting", EAST],
> AUTHORITY["EPSG","3035"]]
>
> I tried to isolate the behavior and also tried the same in an old code
> I had, not using maven (just a local copy of gt2-2.4.0). There, the
> output was correct in EPSG:3035, with ordinate order easting,
> northing.See the difference in the WKT output!
>
> Target: PROJCS["ETRS89 / ETRS-LAEA",
> GEOGCS["ETRS89",
> DATUM["European_Terrestrial_Reference_System_1989",
> SPHEROID["GRS 1980", 6378137.0, 298.257222101,
> AUTHORITY["EPSG","7019"]],
> AUTHORITY["EPSG","6258"]],
> PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
> UNIT["degree", 0.017453292519943295],
> AXIS["Longitude", EAST],
> AXIS["Latitude", NORTH],
> AUTHORITY["EPSG","4258"]],
> PROJECTION["Lambert_Azimuthal_Equal_Area"],
> PARAMETER["latitude_of_center", 52.0],
> PARAMETER["longitude_of_center", 10.0],
> PARAMETER["false_easting", 4321000.0],
> PARAMETER["false_northing", 3210000.0],
> UNIT["m", 1.0],
> AXIS["x", EAST],
> AXIS["y", NORTH],
> AUTHORITY["EPSG","3035"]]
> The transforms are identical.
>
> The code I use is:
> CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326");//WGS84
> EPSG code
> CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:3035"); //
> MathTransform transform = CRS.findMathTransform(sourceCRS,
> targetCRS,true);
> Geometry newgeom = JTS.transform( geom, transform);
>
> I checked,
> System.out.println(System.getProperty("org.geotools.referencing.forceXY"));
> returns false, so there are no global effects that I could not trace.
>
> Does anyone have any idea why this may be? Also, what is the proper
> handling of the axis order in EPSG:4326, that adheres to the EPSG
> standard?
>
> Thanks
> Martin
>
>
>
>
--
Martin Tomko
Postdoctoral Research Assistant
Geographic Information Systems Division
Department of Geography
University of Zurich - Irchel
Winterthurerstr. 190
CH-8057 Zurich, Switzerland
email: [email protected]
site: http://www.geo.uzh.ch/~mtomko
mob: +41-788 629 558
tel: +41-44-6355256
fax: +41-44-6356848
--
Martin Tomko
Postdoctoral Research Assistant
Geographic Information Systems Division
Department of Geography
University of Zurich - Irchel
Winterthurerstr. 190
CH-8057 Zurich, Switzerland
email: [email protected]
site: http://www.geo.uzh.ch/~mtomko
mob: +41-788 629 558
tel: +41-44-6355256
fax: +41-44-6356848
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users