Milton Jonathan ha scritto:
> 1b. This issue has other consequences. Since many such object 
> comparisons seem to ignore the EPSG code, I have the following problem: 
> a WKT was generated where the numbers were printed with only a certain 
> level of precision, making the WGS84 SPHEROID's inverse flattening turn 
> from 298.257223563 to 298.2572. Again, I agree that if no EPSG code is 
> given, then it is a different SPHEROID. But when the code IS given, the 
> comparison still ignores it and says they are different. So, if I get 
> the WKT for 32723 (WGS84 UTM 23S) and simply exchange the spheroid's 
> flattening as above, it does not work either:
> 
> String wkt = "PROJCS[\"WGS 84 / UTM zone 23S\"," +
> "GEOGCS[\"WGS 84\"," +
> "DATUM[\"World Geodetic System 1984\"," +
> "SPHEROID[\"WGS 84\", 6378137.0, 298.2572, 
> AUTHORITY[\"EPSG\",\"7030\"]]," +
> "AUTHORITY[\"EPSG\",\"6326\"]]," +
> "PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]]," +
> "UNIT[\"degree\", 0.017453292519943295]," +
> "AXIS[\"Geodetic latitude\", NORTH]," +
> "AXIS[\"Geodetic longitude\", EAST]," +
> "AUTHORITY[\"EPSG\",\"4326\"]]," +
> "PROJECTION[\"Transverse Mercator\", AUTHORITY[\"EPSG\",\"9807\"]]," +
> "PARAMETER[\"central_meridian\", -45.0]," +
> "PARAMETER[\"latitude_of_origin\", 0.0]," +
> "PARAMETER[\"scale_factor\", 0.9996]," +
> "PARAMETER[\"false_easting\", 500000.0]," +
> "PARAMETER[\"false_northing\", 10000000.0]," +
> "UNIT[\"m\", 1.0]," +
> "AXIS[\"Easting\", EAST]," +
> "AXIS[\"Northing\", NORTH]]";
> 
> What do you think? Should it work this way? My personal opinion is that 
> the identifiers should be checked always when available..

Just checking the identifiers might lead to lookups returning a code
that's not at all equal to the one passed in, think about someone 
passing down a WKT with difference TO_WGS84 parameters.

As for the datum name comparison, I also complained time ago,
I have vague memories of Martin telling me that if the name is 
different, then it's a different datum. But I guess this could
be relaxed and just look for the ellipsoid params and the towgs84
params, if they are all equal we can assume the datum is the same.
I would like to hear other people opinion on this one thought.

> 
> 2. A smaller different issue may be related to that forceXY property you 
> have in your code. I guess it turns out that now a ProjectedCRS such as 
> these which specify "AXIS[\"x\", EAST]" and "AXIS[\"y\", NORTH]" instead 
> of "Easting" and "Northing" don't work?


>  It looked like that in the axis 
> comparison code in DefaultCoordinateSystemAxis.equals(). But I tried to 
> set the property and it still didn't work (see WKT below). Am I missing 
> something? By the way, why is this not a hint, but a system property? 

Because we found out that only the system property works 100% of the 
cases in GeoServer. See:
http://jira.codehaus.org/browse/GEOT-1704

> Oh, just to let you know: this isn't so much of an issue for me right 
> now, it's just to know what works and what doesn't.
> 
> String wkt = "PROJCS[\"SAD69 / UTM zone 23S\"," +
> "GEOGCS[\"SAD69\"," +
> "DATUM[\"South American Datum 1969\"," +
> "SPHEROID[\"GRS 1967 (SAD69)\", 6378160.0, 298.25, 
> AUTHORITY[\"EPSG\",\"7050\"]]," +
> "TOWGS84[-66.87, 4.37, -38.52, 0.0, 0.0, 0.0, 0.0]," +
> "AUTHORITY[\"EPSG\",\"6618\"]]," +
> "PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]]," +
> "UNIT[\"degree\", 0.017453292519943295]," +
> "AXIS[\"Geodetic longitude\", EAST]," +
> "AXIS[\"Geodetic latitude\", NORTH]," +
> "AUTHORITY[\"EPSG\",\"4618\"]]," +
> "PROJECTION[\"Transverse Mercator\", AUTHORITY[\"EPSG\",\"9807\"]]," +
> "PARAMETER[\"central_meridian\", -45.0]," +
> "PARAMETER[\"latitude_of_origin\", 0.0]," +
> "PARAMETER[\"scale_factor\", 0.9996]," +
> "PARAMETER[\"false_easting\", 500000.0]," +
> "PARAMETER[\"false_northing\", 10000000.0]," +
> "UNIT[\"m\", 1.0]," +
> "AXIS[\"x\", EAST]," +
> "AXIS[\"y\", NORTH]]";

Yeah, axis names are considered relevant for the comparison.
It makes some sense, since the names are well known, you cannot
just make them up, and x/y are reserved for geocentric axis
as far as I remember. Do you have software producing x,y as
the axis names?

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to