<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><span style="margin:0px;font-family:Calibri, Helvetica, sans-serif">When creating a transformation that requires a change of datum, it does not work. For instance, going from Geographic
coordinates in WGS84 to UTM coordinates in NAD83CSRS. It does convert from geographic lat,lon to UTM projection easting,northing but the datum remains WGS84.</span><span style="margin:0px;font-family:"segoe ui westeuropean", "segoe ui", Helvetica, Arial, sans-serif"><br>
</span><br>
<span style="margin:0px;font-family:Calibri, Helvetica, sans-serif">I am using Proj 8.2 (but I've also tried this with Proj 7.1 and 7.2) with C++. Here is the code with comments describing the values of the variables, the expected output of the code and the
actual output of the code.</span></div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><span style="margin:0px;font-family:Calibri, Helvetica, sans-serif"><br>
</span></div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><span style="margin:0px;font-family:Calibri, Helvetica, sans-serif">// ENTRY: x=-1614798.938 y=-3690228.026 z=4929942.509
<div>GeographicLib::Geocentric::WGS84().Reverse(x, y, z, point.m_latitude, point.m_longitude, point.m_ellipsoidal_height);</div>
<div>// REVERSE: point.m_latitude=50.937434634728845 point.m_longitude=-113.63360224940385 point.m_m_ellipsoidal_height=1005.9387180001410</div>
<div>PJ_COORD coord = proj_coord(point.m_latitude, point.m_longitude, point.m_ellipsoidal_height, 0.0);</div>
<div>PJ* proj_from_WGS84_to_2956 = proj_create_crs_to_crs(0, "EPSG:4326", "EPSG:2956", 0);</div>
<div>PJ_XYZ proj_point_2 = proj_trans(proj_from_WGS84_to_2956, PJ_FWD, coord).xyz;</div>
<div>// EXPECTED RESULT: 314967.330, 5646169.740, 1006.379</div>
// ACTUAL RESULT: 314967.085, 5646169.595, 1005.939<br>
</span></div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><span style="margin:0px;font-family:Calibri, Helvetica, sans-serif"><br>
</span></div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255, 255, 255)"><span style="margin:0px;font-family:Calibri, Helvetica, sans-serif">Am I doing something wrong? Am I missing something? If someone could help me out with this bit of code, it would be
hugely appreciated.<br>
<br>
Thanks,</span></div>
<div style="margin:0px;font-size:15px;font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;color:rgb(32, 31, 30);background-color:rgb(255, 255, 255)">
<div style="margin:0px;font-size:12pt;font-family:Calibri, Arial, Helvetica, sans-serif;color:rgb(0, 0, 0)">
<div style="margin:0px"><br>
- Mathieu Poulin</div>
</div>
</div>
<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<p style="color:rgb(32,31,30); text-align:start; font-size:11pt; font-family:Calibri,sans-serif; background-color:white; margin:0px">
<span lang="fr-CA" style="margin:0px; color:black"></span></p>
<p style="color:rgb(32,31,30); font-size:11pt; background-color:white; margin:0px">
<span style="margin:0px; color:black"></span></p>
<p style="color:rgb(32,31,30); text-align:start; font-size:11pt; font-family:Calibri,sans-serif; background-color:white; margin:0px">
<span style="margin:0px; font-size:10pt; font-family:Arial,sans-serif; color:black"></span></p>
<p style="margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span style="margin:0px; font-size:10pt; font-family:Arial,sans-serif; color:black"></span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span style="margin:0px; font-size:10pt; font-family:Arial,sans-serif; color:black"><img size="0" tabindex="-1" style="margin:0px; font-size:14.6667px; font-family:Calibri,sans-serif; background-color:rgb(255,255,255); width:179.24pt; height:93.74pt" data-outlook-trace="F:3|T:3" src="cid:b842d2e7-e23d-4c75-9eb0-6cdf834de5b1"></span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black"> </span></p>
<p style="font-size:14px; text-align:start; background:white"><b><span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black">Mathieu Poulin</span></b></p>
<p style="font-size:14px; text-align:start; background:white"><b><span style="margin:0px; font-size:10pt; font-family:Arial,sans-serif; color:rgb(32,31,30)">Développeur | Developer</span></b></p>
<p style="font-size:14px; text-align:start; background:white"><span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black">Division arpentage et géomatique<br>
</span><span style="margin:0px; font-size:10pt; font-family:Arial,sans-serif; color:black">Département Recherche et Développement</span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black"> </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; font-size:10pt; font-family:Arial,sans-serif; color:black">Siège social</span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black">15069, boulevard Henri-Bourassa </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black">Québec (Québec) G1G 3Z5, Canada </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black">Tel : 1+(418) 641-0344</span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black">Sans frais: 1+ (888) 576-7898</span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<b><span lang="EN-CA" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(13,13,13)"><a href="http://www.mvtgeosolutions.com/" target="_blank" style="margin:0px"><span lang="FR-CA" style="margin:0px; color:rgb(0,0,0)">mvtgeosolutions.com</span></a></span></b></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span style="margin:0px; font-size:10pt; font-family:Arial,sans-serif; color:rgb(0,0,0)"> </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span style="margin:0px; color:black"><span style="margin:0px; font-size:14.6667px; font-family:Calibri,sans-serif; color:black"><a href="https://www.facebook.com/mvtgeosolutions" target="_blank" rel="noopener noreferrer" style="margin:0px"><span lang="fr-CA" style="margin:0px"><img size="0" tabindex="-1" style="margin:0px; width:25.49pt; height:25.49pt" data-outlook-trace="F:3|T:3" src="cid:ab93d6d0-85d4-4ebe-8af2-044e71f94958"></span></a></span><span lang="fr-CA" style="margin:0px; font-size:14.6667px; font-family:Calibri,sans-serif; color:rgb(32,31,30)"> <span style="margin:0px"> </span></span><span style="margin:0px; font-size:14.6667px; font-family:Calibri,sans-serif; color:black"><a href="https://www.linkedin.com/company/mvtgeosolutions" target="_blank" rel="noopener noreferrer" style="margin:0px"><span lang="fr-CA" style="margin:0px"><img size="0" tabindex="-1" style="margin:0px; width:29.24pt; height:25.49pt" data-outlook-trace="F:3|T:3" src="cid:a54b447d-ac65-4951-8fcf-d10c737d0c3a"></span></a></span><span lang="fr-CA" style="margin:0px; font-size:14.6667px; font-family:Calibri,sans-serif; color:rgb(32,31,30)"> </span><span style="margin:0px; font-size:14.6667px; font-family:Calibri,sans-serif; color:black"><a href="https://www.youtube.com/channel/UCOFguYWgpbxOlKndKRqqRRQ" target="_blank" rel="noopener noreferrer" style="margin:0px"><span lang="fr-CA" style="margin:0px"><img size="0" tabindex="-1" style="margin:0px; width:25.49pt; height:25.49pt" data-outlook-trace="F:3|T:3" src="cid:cfbd29c9-c9c3-4973-afce-0be0062013bb"></span></a></span></span><span style="margin:0px; color:black"><a href="https://www.youtube.com/channel/UCOFguYWgpbxOlKndKRqqRRQ" style="margin:0px"><span style="margin:0px; font-size:10pt; font-family:Arial,sans-serif; color:blue"></span></a></span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black"> </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:black"> </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)">ATTENTION NOTICE </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)"> </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)">Les informations contenues dans le présent message et dans toute pièce qui lui est jointe sont confidentielles
et peuvent être protégées par le secret professionnel, industriel et/ou droits d'auteurs. Ces informations sont à l'usage exclusif de son ou de ses destinataires. Si vous avez reçu ce message par mégarde, veuillez communiquer avec l'expéditeur au +1 (888)
576-7898 poste 101, l'effacer de tout disque dur ou autre média sur lequel il peut être enregistré et ne pas en conserver de copie. </span><span lang="EN-CA" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)">Merci. </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="EN-CA" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)"> </span></p>
<p style="text-align:start; margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="EN-CA" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)">This E-mail message and any attachment thereto contain confidential information which may be privileged, industrial
secrets or copyrighted and which is intended for the exclusive use of its addressee(s). If you have received this communication in error, please immediately notify us by telephone at +1 (888) 576-7898 poste 101, erase it from any hard disk or other medium
on which it may have been saved and do not keep any copy thereof. Thank you.</span><span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)"> </span></p>
<p style="margin:0cm; font-size:11pt; font-family:Calibri,sans-serif; background:white">
<span lang="FR" style="margin:0px; padding:0cm; border:1pt none windowtext; font-size:10pt; font-family:Arial,sans-serif; color:rgb(118,113,113)"></span></p>
</div>
</div>
</div>
</div>
</body>
</html>