<div dir="ltr"><div>Hello everyone,</div><div><br></div><div>I've successfully compiled PROJ ver 7.2.0 on Windows 10 (build 19041.630) and I am trying to port my code from PROJ ver 4 API to PROJ ver 7 API but I can't find a clear matching between the old version 4 API <b>pj_latlong_from_proj</b> routine and version 7 API code.</div><div><br></div><div>I tried the suggested function mapping as specified here <a href="https://proj.org/development/migration.html#function-mapping-from-old-to-new-api">https://proj.org/development/migration.html#function-mapping-from-old-to-new-api</a>, but I am consistently getting a NULL pointer returned by the <b>proj_crs_get_horizontal_datum()</b>. Here is my sample code:</div><div><br></div><div><span style="font-family:monospace">//------------------------------------------------<br></span></div><div><span style="font-family:monospace">#include <iostream><br>#include <proj.h><br><br></span></div><div><span style="font-family:monospace">int main()<br>{</span></div><div><span style="font-family:monospace"> PJ *proj_test = proj_create(PJ_DEFAULT_CTX, "+proj=ortho +datum=WGS84 +ellps=WGS84 +lat_0=60 +lon_0=90");</span></div><div><span style="font-family:monospace"> PJ *datum = proj_crs_get_horizontal_datum(PJ_DEFAULT_CTX, proj_test);<br><br> return 0;<br>}</span></div><div>
<div><span style="font-family:monospace">//------------------------------------------------<br></span></div><div><span style="font-family:monospace"></span></div>
</div><div><br></div><div><i>datum</i> is returned NULL by
<b>proj_crs_get_horizontal_datum().</b></div><div><b><br></b></div><div>I've also tried to use <b>proj_crs_get_datum()</b> but I still get a NULL pointer.</div><div><br></div><div>Is there something wrong with my input projection?</div><div><br></div><div>Thanks for your help!<br></div><div><br></div><div><b>
</b></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Pierluigi Guasqui<br>Software Engineer<br><br>Applied Coherent Technology Corporation (ACT)<br><a href="http://www.actgate.com" target="_blank">www.actgate.com</a><br></div></div></div></div>