Le vendredi 07 juin 2013 06:50:26, David Strip a écrit : > How well does OGRSpatialReference::GetAuthorityCode perform in the wild > when handed a WKT? In particular, if I have satellite imagery from > someplace in the world that was ortho-rectified in a "sane" manner to a > national or state projection with an conforming WKT, will this function > return an EPSG value? (I realize "robust" is somewhat ill-defined, but > this is the best I could come up with in terms of my question. Sorry).
David, OGRSpatialReference::GetAuthorityCode() should be pretty robust, in the sense that it will return the authority code if an AUTHORITY[] node exists in the WKT. Otherwise it will return NULL. The key is to have a WKT with AUTHORITY in it, which is for example NOT the case with the .prj files accompagning shapefiles. You can also have a look at OGRSpatialReference::AutoIdentifyEPSG(), but don't expect too much of it... See its doc. Even > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Geospatial professional services http://even.rouault.free.fr/services.html _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
