A related question: given an unnamed datum with defined spheroid, PRIMEM and UNIT values, is there a way to find a corresponding named datum or EPSG code?
I'd be interested in an existing method, or perhaps externalng code or table in which I could search for common candidate DATUM definitions, and compare using OGRSpatialReference::IsSameGeogCS() . e.g DATUM["unknown", SPHEROID["Spheroid",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]] corresponds to EPSG: 4326 or DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] also: DATUM["unknown", SPHEROID["Spheroid",6378137,298.2572221010002]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], corresponds to EPSG:4283 or DATUM["Geocentric_Datum_of_Australia_1994", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6283"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4283"]], many thanks Etienne On Fri, Oct 7, 2011 at 8:36 PM, Etienne Tourigny <etourigny....@gmail.com> wrote: > Hi all, > > I would appreciate any hints as to how I can compare 2 > WKT/OGRSpatialReference objects. > > My goal is to make sure that a more detailed WKT (with authority codes > and explicit datum) corresponds (numerically) to a simpler one, such > as in the following examples. > > I understand that the oSRSGDAL.exportToPrettyWkt() function can remove > AXIS, AUTHORITY and EXTENSION nodes, but how can I guarantee that the > PARAMETER nodes are in the same order? Does FixupOrdering() solve that > problem? > > Furthermore, How could I compare the datums? > > > > > CF=[PROJCS["unnamed", > GEOGCS["unknown", > DATUM["unknown", > SPHEROID["Spheroid",6378137,298.2572221010002]], > PRIMEM["Greenwich",0], > UNIT["degree",0.0174532925199433]], > PROJECTION["Lambert_Conformal_Conic_2SP"], > PARAMETER["standard_parallel_1",-18], > PARAMETER["standard_parallel_2",-36], > PARAMETER["latitude_of_origin",0], > PARAMETER["central_meridian",134], > PARAMETER["false_easting",0], > PARAMETER["false_northing",0]]] > > GDAL=[PROJCS["GDA94 / Geoscience Australia Lambert", > GEOGCS["GDA94", > DATUM["Geocentric_Datum_of_Australia_1994", > SPHEROID["GRS 1980",6378137,298.2572221010002, > AUTHORITY["EPSG","7019"]], > TOWGS84[0,0,0,0,0,0,0], > AUTHORITY["EPSG","6283"]], > PRIMEM["Greenwich",0], > UNIT["degree",0.0174532925199433], > AUTHORITY["EPSG","4283"]], > PROJECTION["Lambert_Conformal_Conic_2SP"], > PARAMETER["standard_parallel_1",-18], > PARAMETER["standard_parallel_2",-36], > PARAMETER["latitude_of_origin",0], > PARAMETER["central_meridian",134], > PARAMETER["false_easting",0], > PARAMETER["false_northing",0], > UNIT["metre",1, > AUTHORITY["EPSG","9001"]], > AUTHORITY["EPSG","3112"]]] > > > > Another option is exporting to PROJ.4 strings, but there are the > +towgs84 that shows up , plus some differences in +datum vs. +ellps. > > e.g. > > CF=[+proj=utm +zone=55 +ellps=WGS84 +units=m +no_defs ] > GDAL=[+proj=utm +zone=55 +datum=WGS84 +units=m +no_defs ] > or > CF=[+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0=0 +y_0=0 > +ellps=GRS80 +units=m +no_defs ] > GDAL=[+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0=0 > +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ] > > > > many thanks, > Etienne > _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev