[PROJ] cs2cs and +towgs84

Stefano Iacovella stefano.iacovella at gmail.com
Wed Feb 5 05:28:39 PST 2020


Hi Kristian,

thank you very much for your very clear reply, I was confused by some old
posts where it was possible to force cs2cs using a different operation than
the best estimate.

All the best

Stefano

Il giorno mer 5 feb 2020 alle ore 14:14 Kristian Evers <kreve at sdfe.dk> ha
scritto:

> Stefano,
>
>
>
> cs2cs uses the ”best guestimate” operation between source and destination
> CRS.
>
> If you want something else you need to specify that yourself. projinfo can
> help you
>
> find the correct transformation:
>
>
>
> $ projinfo -k operation -o PROJ EPSG:1660
>
> 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=intl
> +step +proj=helmert +x=-104.1 +y=-49.1 +z=-9.9 +rx=0.971 +ry=-2.917
> +rz=0.714 +s=-11.68 +convention=position_vector +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
>
>
>
> Which you can then use with cct:
>
>
>
> $ echo 41.7447031 15.0618939 | cct -z0 -t0 -d8 +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=intl +step +proj=helmert
> +x=-104.1 +y=-49.1 +z=-9.9 +rx=0.971 +ry=-2.917 +rz=0.714 +s=-11.68
> +convention=position_vector +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.74535412    15.06180323    0.00000000        0.0000
>
>
>
> That should do the trick :-)
>
>
>
> Please don’t use the +towgs84 parameter – it is deprecated and only
> supported for legacy reasons.
>
>
>
> /Kristian
>
>
>
> *From:* PROJ <proj-bounces at lists.osgeo.org> *On Behalf Of *Stefano
> Iacovella
> *Sent:* 5. februar 2020 13:57
> *To:* proj at lists.osgeo.org
> *Subject:* [PROJ] cs2cs and +towgs84
>
>
>
> Hello,
>
> I already read the cs2cs usage page at [1] but I am still a little bit
> confused about the +towgs84 option so I am looking for your help.
>
> I am trying to convert from EPSG:4265 CRS to EPSG:4326 CRS
>
> First of all I used the following syntax
>
> $> cs2cs -d 8 epsg:4265 epsg:4326
> 41.7447031 15.0618939
> 41.74535412     15.06180323 0.00000000
>
> this way the coordinate are transformed but I have no control on which
> operation is really used, e.g. I don't know which are the towgs84's
> parameters
>
> Really I want to use the EPSG:1660 operation, so I tried to add the
> +towgs84 option but I got an error:
>
> $> cs2cs -d 8 epsg:4265 epsg:4326
> +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68
> proj_create: crs not found
> Rel. 6.3.0, January 1st, 2020
> <cs2cs>:
> cannot instantiate source coordinate system
> program abnormally terminated
>
> Which is the correct syntax to be used?
>
> Thank you in advance
>
> Stefano
>
> [1] https://proj.org/apps/cs2cs.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200205/2c64cb00/attachment.html>


More information about the PROJ mailing list