[PROJ] Getting "proj" and "datum" for a CRS
Nyall Dawson
nyall.dawson at gmail.com
Thu May 2 18:37:58 PDT 2019
Hi list,
Next question:
If I have a crs created from a proj string like:
+proj=tmerc +lat_0=0 +lon_0=102 +k=0.9999 +x_0=500000 +y_0=0 +ellps=WGS84
+units=m +no_defs +type=crs
1. How can I get the "tmerc" acronym from the proj API? If I
call proj_crs_get_coordoperation and
then proj_coordoperation_get_method_info I can retrieve the method name,
but this is a long version of this value (ie. ."Transverse Mercator", not
the tmerc acronym)
2. How can I get the ellipsoid/datum value? Again, I can
call proj_get_ellipsoid to get an ellipsoid, and from that I've been
using proj_get_id_auth_name/proj_get_id_code. But this only sometimes gives
a value, and ideally I'm trying to retrieve the "WGS84" value used in the
original proj string.
(I'm trying to use the official proj methods to retrieve these values -
without resorting to regex parsing)
3. Using proj_as_proj_string sometimes results in errors like:
"proj_as_proj_string: Unsupported conversion method: Lambert Conic
Conformal (West Orientated)". I'm guessing this indicates that there's NO
way of representing that projection using proj strings, and I'm wasting my
time if I try to work around this?
Nyall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20190503/ffef4630/attachment.html>
More information about the PROJ
mailing list