[geotk] Coordinate reference systems: identifiers and equality
Jonathan Blower
j.d.blower at reading.ac.uk
Wed Apr 21 10:25:35 EDT 2010
Hi,
I have a couple of questions about coordinate reference systems. I
would like to implement a method that detects whether a given coordinate
system represents a WGS84 longitude-latitude system:
public static boolean isWgs84LonLat(CoordinateReferenceSystem crs);
Is there such a method available in Geotk? I notice that the three
coordinate systems:
DefaultGeographicCRS.WGS84
CRS.decode("EPSG:4326", true)
CRS.decode("CRS:84", true)
are not considered equal() to each other, even though I thought they all
represent the same logical CRS (note that I am forcing longitude-first
axis order). The WKT is slightly different in each case, but not
"functionally" so as far as I understand. Is there a reason they are
considered different?
Secondly, I'd like a reliable method to perform the inverse of
CRS.decode(), i.e. take a CRS and return its code. I notice that Geotk
has a CRS.getDeclaredIdentifier() method, which is cheaper than
CRS.lookupIdentifier(). Is getDeclaredIdentifier() guaranteed to return
the correct code for a CRS for all CRSs that are returned by
CRS.decode()? I.e. does every CRS returned by CRS.decode() declare an
identifier?
Thanks,
Jon
--
Dr Jon Blower
Technical Director, Reading e-Science Centre
Environmental Systems Science Centre
University of Reading
Harry Pitt Building, 3 Earley Gate
Reading RG6 6AL. UK
Tel: +44 (0)118 378 5213
Fax: +44 (0)118 378 6413
j.d.blower at reading.ac.uk
http://www.nerc-essc.ac.uk/People/Staff/Blower_J.htm
More information about the Geotoolkit
mailing list