Hi Alain EPSG:4326 is expecting lat-long. So the proper way is echo "70 10 0" | cs2cs EPSG:4326 EPSG:5041
The axis swap is because internally all the projections are expecting easing-northing coordinates, so they should be swapped from the northing-easing that is the input. An easy way to see the axis order is looking at the WKT2 representation of a CRS. On Fri, 14 Apr 2023 at 08:29, Alain Orsoni <[email protected]> wrote: > Hello, > > Basic question but necessary for me : > > We use PROJ Version 8.2.1 > Exemple : I convert from Longitude=10 Latitude=70 from 4326 to UPS stereo > North Pole (5041) > > projinfo -s EPSG:4326 -t EPSG:5041 -o PROJ > Gives output : > > +proj=pipeline > +step +proj=axisswap +order=2,1 > +step +proj=unitconvert +xy_in=deg +xy_out=rad > +step +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 > +ellps=WGS84 > > But > echo "10 70 0" | cs2cs EPSG:4326 EPSG:5041 > > Gives output : 11976062.58 -1630989.83 0.00 > The good result given by EPSG.IO is : 2389386.90 -208322.83 0.00 > I get the good result with : echo « 70 10 0" | cs2cs EPSG:4326 EPSG:5041 > > So it seems that the syntax. cs2cs EPSG:4326 EPSG:5041 doesn’t apply the > step axisswap > > Can someone confirm this behavior ? > > Second question : > In C++ API the proj_create_crs_to_crs() associated to > proj_normalize_for_visualization() allows to avoid this problem. > But we use also PROJ in shell scripts. It seems to me that some > geodetic_crs expect lat-lon entry and some other Lon-lat. > Is there a way in the SQL database (proj.db) to find this information? > > Thanks for any answer. > > Alain > > > > _______________________________________________ > PROJ mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/proj >
_______________________________________________ PROJ mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/proj
