[PROJ] Proj / cs2cs differences
Even Rouault
even.rouault at spatialys.com
Sat Sep 18 05:22:17 PDT 2021
Roberto,
the proj utility only works with a projection operation, where input
geographic coordinates are expressed in the base CRS of the projected
CRS (which is EPSG:4162 "Korean 1985" here), and doesn't apply any datum
transformation. So the equivalent of your proj invokation with cs2cs
would be cs2cs +init=epsg:4162 +to +init=epsg:5174
If you use EPSG:4326 as the input CRS, then there will be a datum shift
from EPSG:4326 to EPSG:4162
Regarding the pipeline output by projinfo -s -t, you can't use it with
the proj utility, which is a historic one and is aimed only at
understanding +proj={projection_id} style of PROJ strings. You should
rather use the newer cct utility.
Even
Le 18/09/2021 à 14:13, Roberto Toldo a écrit :
> I was able to get the actual pipeline transformation used by "cs2cs"
> by running:
> /projinfo -s EPSG:4326 -t EPSG:5174/
>
> Still, I'm having problems using the output proj string:
> /+proj=pipeline
> +step +proj=axisswap +order=2,1
> +step +proj=unitconvert +xy_in=deg +xy_out=rad
> +step +proj=push +v_3
> +step +proj=cart +ellps=WGS84
> +step +inv +proj=molobadekas +x=-145.907 +y=505.034 +z=685.756
> +rx=-1.162
> +ry=2.347 +rz=1.592 +s=6.342 +px=-3159521.31 +py=4068151.32
> +pz=3748113.85 +convention=coordinate_frame
> +step +inv +proj=cart +ellps=bessel
> +step +proj=pop +v_3
> +step +proj=tmerc +lat_0=38 +lon_0=127.002890277778 +k=1 +x_0=200000
> +y_0=500000 +ellps=bessel
> +step +proj=axisswap +order=2,1/
>
> The error I get is "can't initialize operations that take non-angular
> input coordinates". If I remove the "unitconvert" step, I can run proj
> bin, but I get wrong results (even if I manually convert the input
> from degree to radians). Any suggestions?
>
> Many thanks,
> Roberto
>
>
> On Fri, Sep 17, 2021 at 9:35 AM Roberto Toldo
> <roberto.toldo at 3dflow.net <mailto:roberto.toldo at 3dflow.net>> wrote:
>
> Hello!
>
> I found some issues/differences from the "proj" bin and "cs2cs"
> bin utilities. I'm using the last version, directly compiled from
> Github.
> Probably it's something due to my inexperience with the library,
> so please bear with me :)
>
> Specifically, I was trying to convert coordinates from geodetic to
> EPSG:5174 ( Korean 1985 / Modified Central Belt).
>
> I used proj with the parameters extracted from "projinfo EPSG:5174":
> proj +proj=tmerc +lat_0=38 +lon_0=127.002890277778 +k=1
> +x_0=200000 +y_0=500000 +ellps=bessel +units=m +no_defs
>
> and then cs2cs with direct conversion parameters:
> cs2cs +init=epsg:4326 +to +init=epsg:5174
>
> However, I obtain quite different results.
>
> For example, If I use lat_0 and lon_0 as input (127.002890277778,
> 38), I obtain exactly false_easting and false_northing (200000,
> 500000) when using proj4 (as expected), while I obtain something
> different when using cs2cs (200185.04 499695.19).
> I would be expecting the same results. I tried with other
> coordinate systems (e.g., EPSG:32633 UTM zone 33N), and I noticed
> no differences between proj and cs2cs results.
> Can anybody help me understand what the reason for the differences
> is? Are the parameters used internally by cs2cs different for
> EPSG:5174? I also tried setting the accuracy, but it doesn't seem
> to work.
>
> Thanks,
> Roberto
>
>
>
> --
> Roberto Toldo
> Technical Director & Co-founder | 3Dflow srl
> +39 045 4500109 | roberto.toldo at 3dflow.net
> <mailto:roberto.toldo at 3dflow.net> | http://www.3dflow.net
> <http://www.3dflow.net>
>
> _______________________________________________
> 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/20210918/22d385bf/attachment.html>
More information about the PROJ
mailing list