[Proj] Convert a planetographic latitude to a planetocentric latitude

Even Rouault even.rouault at spatialys.com
Sat Aug 18 15:21:13 EST 2018

On samedi 18 août 2018 20:11:24 CEST Kristian Evers wrote:
> Jean-Christophe,
> You can do that transformation with PROJ, yes. I can see why you get
> confused though. It is not really apparent but to do this type of
> transformation cs2cs needs some hint that it is doing a change in reference
> frame (which this essentially is). You can do that by adding +towgs84=0,0,0
> to both CRS1 and CRS2. When I do that I get the following:
> $ echo 0 80 0 | cs2cs +proj=latlong +R=3396190 +towgs84=0,0,0 +to
> +proj=latlong +a=3396190 +b=3376200 +towgs84=0,0,0
 0dE     80d6'51.824"N
> 19392.342
> It is not unreasonable to expect cs2cs to figure this out on it’s own. I’ll
> give it some thoughts the next couple of days and see if I can come up with
> a simple solution that handles this particular case.


cs2cs *used* to do this implicit +towgs84=0,0,0 in versions earlier than 4.6, 
and in 4.6 this was changed:

4.6.0 Release Notes

 o MAJOR: Rework pj_transform() to avoid applying ellipsoid to ellipsoid
   transformations as a datum shift when no datum info is available.


Spatialys - Geospatial professional services

More information about the Proj mailing list