Re: How to construct proper cs2cs command line arguments

Even Rouault <[email protected]> Sun, 01 Dec 2019 11:55:09 +0100
Newsgroups gmane.comp.gis.proj-4.devel
Message-ID <18321641.me0ZmC3Eci@even-i700>
On dimanche 1 décembre 2019 11:11:18 CET Jean Louis wrote:
> * Kristian Evers <[email protected]> [2019-11-25 13:23]:
> > Jean Louis,
> > 
> > Take a look at the documentation for cs2cs. I believe it should answer all
> > your questions regarding cs2cs. Here it is:
> > https://proj.org/apps/cs2cs.html
> 
> Dear Kristian,
> 
> So I chose for example input coordinate system EPSG:4326 and output
> EPSG:21036 and then on https://mygeodata.cloud/cs2cs/ I have selected
> that, and used coordinate: -1.122159, 29.714413 for which I get the
> result: -2897602.84658;13830181.544
> 
> and same result I cannot get by using:
> 
> $ cs2cs EPSG:4326 EPSG:21036
> -1.122159, 29.714413
> -3394656.76	9852263.62 0.00, 29.714413
> 
> What is then wrong?

The website you mention likely uses PROJ < 6 and the deprecated PROJ.4 syntax for CRS strings. See
https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems

PROJ 6 honours axis order of the authority when using the EPSG:XXXX syntax. See
https://proj.org/faq.html#why-is-the-axis-ordering-in-proj-not-consistent for the full explanation.

So when using EPSG:4626 you must put first latitude

$ echo "29.714413 -1.122159" | cs2cs EPSG:4326 EPSG:21036
-2897602.83	13830181.55 0.00

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
PROJ mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/proj