[PROJ] API migration - Offset on z-axis
Kilian Demeulemeester
kilian.demeulemeester at yellowscan-lidar.com
Thu Jul 16 07:48:38 PDT 2020
Hello everyone.
Our team upgraded proj API from 4 to 6.
We noticed difference between the result when using projection in
Switzerland (for instance EPSG:2056).
Here, I try to recap the difference between our implementation:
*Initial implementation (PROJ 4):*
// Input: x,y,z be coordinate expressed in EPSG:4978
projPJ pj_in;
projPJ pj_out;
pj_in = pj_init_plus("+init=epsg:4978");
pj_out = pj_init_plus("+init=epsg:2056");
pj_transform(pj_in, pj_out, 1, 1, x, y, z);
*Current implementation (PROJ 6)*
// Input: PJ_COORD coord expressed in EPSG:4978
PJ_CONTEXT* context = projContextCreate();
PJ* p1 = proj_create_crs_to_crs(context, "EPSG:4978", "EPSG:2056", NULL);
PJ* proj = proj_normalize_for_visualization(context, p1);
coord = proj_trans(proj , PJ_FWD, coord);
---
We noticed that the output using our current implementation yield the
wrong result: there is an offset along the z-axis.
Are we doing something wrong?
Thank you very much.
Kilian Demeulemeester
Software Developer - R&D
[https://yellowscan-lidar.com/]
1 Chemin de fescau
34980 Montferrier-Sur-Lez - France
Tel: +33 (0)4 11 93 14 06
yellowscan-lidar.com [https://yellowscan-lidar.com/]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200716/b9379c0d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x-disclaimer-534644925-0.png
Type: image/png
Size: 1125 bytes
Desc: x-disclaimer-534644925-0.png
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200716/b9379c0d/attachment.png>
More information about the PROJ
mailing list