<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jan 31, 2017, at 7:46 AM, <a href="mailto:Niels.vonFestenberg-Packisch.ext@rohde-schwarz.com" class="">Niels.vonFestenberg-Packisch.ext@rohde-schwarz.com</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><font size="3" class="">Hi all, </font>
<br class=""><font size="3" class="">I would like to transform local cartesian coordinates
into longitude and latitude. According to all the documentation I could
find, I tried doing this (in C++, specifying a center for the orthographic
projection at 56 N 15 E): </font>
<br class="">
<br class=""><font size="3" face="Courier" class="">projPJ cSourceProjection = pj_init_plus("+proj=ortho
+ellps=WGS84 +datum=WGS84 +lat_0=56 +lon_0=15 +no_defs");</font>
<br class=""><font size="3" face="Courier" class="">projPJ cTargetProjection = pj_init_plus("+proj=longlat
+ellps=WGS84 +datum=WGS84 +no_defs");</font>
<br class=""><font size="3" face="Courier" class="">projXY pt;</font>
<br class=""><font size="3" face="Courier" class="">// 1</font>
<br class=""><font size="3" face="Courier" class="">pt.u = 0; pt.v = 0; </font>
<br class=""><font size="3" face="Courier" class="">pj_transform( cSourceProjection, cTargetProjection,
1, 0, &pt.u, &pt.v, 0 );</font>
<br class=""><font size="3" face="Courier" class="">printf ("Result 1: %2.6f %2.6f",
pt.u, pt.v); </font>
<br class=""><font size="3" face="Courier" class="">// 2</font>
<br class=""><font size="3" face="Courier" class="">pt.u = 0; pt.v = 111120; </font>
<br class=""><font size="3" face="Courier" class="">pj_transform( cSourceProjection, cTargetProjection,
1, 0, &pt.u, &pt.v, 0 );</font>
<br class=""><font size="3" face="Courier" class="">printf ("Result 2: %2.6f %2.6f",
pt.u, pt.v); </font>
<br class="">
<br class=""><font size="2" face="sans-serif" class="">--> Delivers : </font>
<br class=""><font size="3" face="Courier" class="">Result 1: 0.26180 0.97738 </font>
<br class=""></div></blockquote><div><br class=""></div><div><br class=""></div><div>Your Result 1 is 15.0° and 56.0° respectively, in radians. </div><div><br class=""></div><div>Chris</div><div><br class=""></div></div></body></html>