[Proj] Convert a planetographic latitude to a planetocentric latitude

Kristian Evers kreve at sdfe.dk
Sat Aug 18 15:29:17 EST 2018



On 18 Aug 2018, at 22:21, Even Rouault <even.rouault at spatialys.com<mailto:even.rouault at spatialys.com>> wrote:

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.

Kristian,

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.

Good catch. I wonder why this was changed to the current implementation. The
differing ellipsoid parameters for CRS1 and CRS2 can be regarded as datum
information (albeit rudimentary datums).

/Kristian


Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com<http://www.spatialys.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20180818/e6fb27d5/attachment-0001.htm 


More information about the Proj mailing list