[PROJ] Pipeline from "Local" projection to EPSG:4326

Even Rouault even.rouault at spatialys.com
Fri Sep 25 08:42:34 PDT 2020


On vendredi 25 septembre 2020 15:22:40 CEST Māris Nartišs wrote:
> Hello folks,
> I got a dataset with custom CRS in "Local" projection and have been
> trying unsuccessfully to set up a pipeline to transform coordinates
> into 4326.

See discussion thread
https://lists.osgeo.org/pipermail/proj/2020-September/thread.html#9818
in case you missed it

> To get correct results in ArcGIS, I have to select two transformations
> – EPSG:15844 followed by EPSG:15843
> I was trying various ways how to create pipeline for testing with
> cs2cs/cct in 6.3.1 but no luck. As pipelines are a new feature, there
> are not so many examples floating around unfortunately – didn't manage
> to get syntax right.
> 
> Thus:
> 1) how should such pipeline look like? (looking at shapefile
> transformed with ArcGIS, a point from 22000 77000 should land at
> 69.2642191 41.3335608)

> 
> Here's content of .prj file:
> PROJCS["Local_Tashkent",GEOGCS["GCS_Pulkovo_1942",DATUM["D_Pulkovo_1942",SPH
> EROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degre
> e",0.0174532925199433]],PROJECTION["Local"],PARAMETER["False_Easting",24547.
> 608],PARAMETER["False_Northing",76540.608],PARAMETER["Scale_Factor",1.0],PAR
> AMETER["Azimuth",0.0],PARAMETER["Longitude_Of_Center",69.295403],PARAMETER["
> Latitude_Of_Center",41.329238],UNIT["Meter",1.0]]

Changing in your above WKT "Local" to "Orthographic",


projinfo -s 
'PROJCS["Local_Tashkent",GEOGCS["GCS_Pulkovo_1942",DATUM["D_Pulkovo_1942",SPHER
OID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",
0.0174532925199433]],PROJECTION["Orthographic"],PARAMETER["False_Easting",
24547.608],PARAMETER["False_Northing",76540.608],PARAMETER["Scale_Factor",
1.0],PARAMETER["Azimuth",0.0],PARAMETER["Longitude_Of_Center",
69.295403],PARAMETER["Latitude_Of_Center",41.329238],UNIT["Meter",1.0]]' -t EPSG:4326 
--spatial-test intersects 

gives:


Candidate operations found: 12
-------------------------------------
Operation No. 1:

unknown id, Inverse of unnamed + axis order change (2D) + Pulkovo 1942 to WGS 84 (16), 4.5 
m, Europe - FSU onshore

PROJ string:
+proj=pipeline +step +inv +proj=ortho +lat_0=41.329238 +lon_0=69.295403 +x_0=24547.608 
+y_0=76540.608 +ellps=krass +step +proj=push +v_3 +step +proj=cart +ellps=krass +step 
+proj=helmert +x=25 +y=-141 +z=-78.5 +rx=0 +ry=-0.35 +rz=-0.736 +s=0 
+convention=coordinate_frame +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

[...]

            REMARK["Derived via PZ-90 at 30 stations throughout USSR (Former Soviet Union, 
FSU) through concatenation of Pulkovo 1942 to PZ-90 (1) (tfm code 15844) and PZ-90 to WGS 
84 (1) (tfm code 15843)."]]],
[...]


Which must be as close as you wish

echo "22000 77000 0" | cct -d 8 +proj=pipeline +step +inv +proj=ortho +lat_0=41.329238 
+lon_0=69.295403 +x_0=24547.608 +y_0=76540.608 +ellps=krass +step +proj=push +v_3 
+step +proj=cart +ellps=krass +step +proj=helmert +x=25 +y=-141 +z=-78.5 +rx=0 +ry=-0.35 
+rz=-0.736 +s=0 +convention=coordinate_frame +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

  41.33355118    69.26417454    0.00000000           inf

This isn't exactly the coordinates you mention, probably due to the issue of PROJ ortho not 
implementing the ellipsoidal formulation whereas ESRI Local does.

> 2) how to make it "default" pipeline for the source CRS for all proj
> utilizing tools (ogr2ogr, QGIS etc.)?

This is a tricky aspect. The current philosophy is that you either trust PROJ automated way to 
select the right pipeline (PROJ's cs2cs, GDAL utilities with no explicit pipeline, etc.), or you 
choose it yourself (with PROJ's cct utility, GDAL's ogr2ogr/gdalwarp -ct switch, QGIS UI datum 
change preference dialog box)
You could manage to change PROJ's default by tweeking PROJ's db. Either by adding a new 
record to it with a better accuracy than the ones present, or modifying the accuracy of an 
existing transform to be better than the best one presented by PROJ

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200925/769734b9/attachment.html>


More information about the PROJ mailing list