[PROJ] Transformation from WKT string?
Even Rouault
even.rouault at spatialys.com
Fri May 28 15:13:02 PDT 2021
Daniel,
It is likely one of the ESRI specific things at
https://raw.githubusercontent.com/Esri/projection-engine-db-doc/master/csv/pe_list_geogtran.csv
The situation is that the import script of the ESRI database does import
them in the PROJ database with some ad-hoc logic, but proj_create() has
no support for those strings themselves. However, as they are in the
database, you can use them by name (provided yours is a registered one,
and not a custom one), with proj_create_from_name() (or if you find its
code in the above list, with proj_create_from_database())
e.g.
projinfo -k operation Palestine_1923_To_WGS_1984_1X
PROJ string:
+proj=pipeline
+step +proj=axisswap +order=2,1
+step +proj=unitconvert +xy_in=deg +xy_out=rad
+step +inv +proj=longlat +a=6378300.789 +b=6356566.435
+step +proj=push +v_3
+step +proj=cart +a=6378300.789 +b=6356566.435
+step +proj=helmert +x=-181 +y=-122 +z=225
+step +inv +proj=cart +ellps=WGS84
+step +proj=pop +v_3
+step +proj=unitconvert +xy_in=rad +xy_out=deg
+step +proj=axisswap +order=2,1
WKT2:2019 string:
COORDINATEOPERATION["Palestine_1923_To_WGS_1984_1X",
SOURCECRS[
GEOGCRS["Palestine 1923",
DATUM["Palestine 1923",
ELLIPSOID["Clarke 1880
(Benoit)",6378300.789,293.466315538981,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4281]]],
TARGETCRS[
GEOGCRS["WGS 84",
ENSEMBLE["World Geodetic System 1984 ensemble",
MEMBER["World Geodetic System 1984 (Transit)"],
MEMBER["World Geodetic System 1984 (G730)"],
MEMBER["World Geodetic System 1984 (G873)"],
MEMBER["World Geodetic System 1984 (G1150)"],
MEMBER["World Geodetic System 1984 (G1674)"],
MEMBER["World Geodetic System 1984 (G1762)"],
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]],
ENSEMBLEACCURACY[2.0]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]],
METHOD["Geocentric translations (geog2D domain)",
ID["EPSG",9603]],
PARAMETER["X-axis translation",-181,
LENGTHUNIT["metre",1],
ID["EPSG",8605]],
PARAMETER["Y-axis translation",-122,
LENGTHUNIT["metre",1],
ID["EPSG",8606]],
PARAMETER["Z-axis translation",225,
LENGTHUNIT["metre",1],
ID["EPSG",8607]],
OPERATIONACCURACY[1.5],
USAGE[
SCOPE["Not known."],
AREA["Israel - onshore and offshore."],
BBOX[29.45,32.99,33.53,35.69]],
ID["ESRI",108220]]
If it is a custom one, the logic at
https://github.com/OSGeo/PROJ/blob/master/scripts/build_db_from_esri.py#L1480
might help
Even
Le 29/05/2021 à 00:00, Daniel Schilling a écrit :
> Greetings!
> I am trying to create a bound CRS using `proj_crs_create_bound_crs`,
> but I only have a WKT string (`GEOGTRAN`...) for the transformation,
> not an EPSG code. I cannot figure out how to do it.
>
> Neither `proj_create` nor `proj_create_from_wkt` seem able to create
> transformations. The only way I have been able to create a
> transformation so far is by using `proj_create_from_database`, but
> again - I don't have an EPSG code for this. Is there a way to do
> this? I am using Proj 8.
>
> Thank you in advance for your help!
> Daniel Schilling
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20210529/000ea570/attachment.html>
More information about the PROJ
mailing list