<div dir="auto">Hi,<div dir="auto"><br><div dir="auto">Which CRS is exactly the hub in the old API? Is it WGS84 lat/lon or geocentric?</div><div dir="auto">Should it be more accurate or faster to use the new API to transform WGS84 lat/lon to WGS84 UTM,  will it use any different transformation path?</div><div dir="auto"><br></div><div dir="auto">Thanks. </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 20 Feb 2018 01:10, &quot;Kristian Evers&quot; &lt;<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Matthias,<br>
<br>
Let me try to answer on Thomas’ behalf:<br>
<br>
&gt; On 19 Feb 2018, at 21:16, Matthias Gabriel &lt;<a href="mailto:matthias.gabriel@etit.tu-chemnitz.de">matthias.gabriel@etit.tu-<wbr>chemnitz.de</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi Thomas,<br>
&gt;<br>
&gt; thank your for your fast and very helpful answer! indeed that makes it much clearer... Maybe that usecase could be part of the upcoming documentation as I believe it&#39;s very common…<br>
&gt;<br>
<br>
I have added Thomas’ answer to the API migration guide. See a preview of the 5.0.0 docs here: <a href="https://kbevers.github.io/development/migration.html" rel="noreferrer" target="_blank">https://kbevers.github.io/<wbr>development/migration.html</a><br>
<br>
<br>
&gt; I got one follow up question: In which coordinate system is the&quot;result&quot; of the first part of your pipeline, the&quot;inverse&quot; utm projection, defined?<br>
<br>
The coordinate system in the first part is just UTM Zone 33 on the GRS80 ellipsoid. In Thomas’ example there is not any datum attached to the coordinate system, which I think is what you are really asking. UTM is just a projection that converts coordinates on the sphere/ellipsoid onto the plane. That’s it. Thomas’ example though, is also a good explanation  of what happens in the old API, if we say that the thing that the input coordinates are converted to is WGS84 geodetic coordinates. WGS84 is used as the hub-datum in cs2cs and pj_transform() from the old API. The last step of the pipeline-example converts of course from WGS84 to UTM32. Of course with the old API it is also possible to use parameters such as +towgs84 that defines a set of parameters for a Helmert transformation going from whatever datum your coordinates are in TO WGS84. Depending on whether the proj-string is used as the source og destination system.<br>
<br>
<br>
&gt; I understand that the transformation is &quot;taking&quot; a utm coordinate pair as argument but what does it actually calculate?<br>
&gt;<br>
<br>
So in summation, the transformation calculates the corresponding geodetic coordinate of that particular UTM coordinate. The next step converts the geodetic coordinate to UTM again, albeit a different zone this time.<br>
<br>
Thomas and I wrote a paper about this concept last year in which we go into some more details about how the pipeline setup works. It might be of interest to you: <a href="http://www.fig.net/resources/proceedings/fig_proceedings/fig2017/papers/iss6b/ISS6B_evers_knudsen_9156.pdf" rel="noreferrer" target="_blank">http://www.fig.net/resources/<wbr>proceedings/fig_proceedings/<wbr>fig2017/papers/iss6b/ISS6B_<wbr>evers_knudsen_9156.pdf</a><br>
<br>
/Kristian<br>
<br>
&gt; Again: thanks a lot, your answer was very helpful!<br>
&gt;<br>
&gt; Regards,<br>
&gt; Matthias<br>
&gt;<br>
&gt; On 19 February 2018 18:44:03 CET, Thomas Knudsen &lt;<a href="mailto:knudsen.thomas@gmail.com">knudsen.thomas@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Matthias,<br>
&gt;<br>
&gt; Note that the old API is still available - the new, however, introduces methods that are needed in order to obtain high accuracy transformations.<br>
&gt;<br>
&gt; The world view represented by the old API is always sufficient if all you care about is meter level accuracy - and in many cases it will provide much higher accuracy than that. But the view that “WGS84 is the *true* foundation of the world, and everything else can be transformed natively to and from WGS84” is inherently flawed.<br>
&gt;<br>
&gt; First and foremost because any time WGS84 is mentioned, you should ask yourself “Which of the six WGS84 realizations are we talking about here?”.<br>
&gt;<br>
&gt; Second, because for many (especially legacy) systems, it may not be straightforward to transform to WGS84 (or actually ITRF-something, ETRS-something or NAD-something which appear to be the practical meaning of the term WGS84 in everyday PROJ related work), while centimeter-level accurate transformations may exist between pairs of older systems.<br>
&gt;<br>
&gt; The concept of a pivot reference frame (“datum”) is not inherently bad, but in many cases you need to handle and select that datum with more care than the old API allows. The primary aim of the new API is to allow just that. And to do that, you must realize that the world is inherently 4 dimensional. You may in many cases assume one or more of the coordinates to be constant, but basically, to obtain geodetic accuracy transformations, you need to work in 4 dimensions.<br>
&gt;<br>
&gt; Now, having described the background for introducing the new API, I (being the architect and primary - but certainly not sole - implementer of the new API) should probably also try to reply to your request for a hint about how to use it.<br>
&gt;<br>
&gt; First note that in order to go from system A to system B, the old API starts by doing an INVERSE transformation from system A to WGS84, then does a FORWARD transformation from WGS84 to system B.<br>
&gt;<br>
&gt; With cs2cs being the command line interface to the old API, and cct being the same for the new, I think this example of doing the same thing in both world views will probably be ample hinting for you:<br>
&gt;<br>
&gt; $ echo 300000 6100000 | cs2cs_d +proj=utm +zone=33 +ellps=GRS80 +to +proj=utm +zone=32 +ellps=GRS80<br>
&gt;<br>
&gt; 683687.87       6099299.66 0.00<br>
&gt;<br>
&gt; $ echo 300000 6100000 0 0 | cct +proj=pipeline +step +inv +proj=utm +zone=33 +ellps=GRS80 +step +proj=utm +zone=32 +ellps=GRS80<br>
&gt;<br>
&gt; 683687.8667   6099299.6624    0.0000    0.0000<br>
&gt;<br>
&gt;<br>
&gt; (lookout for the &quot;+inv&quot; in the first +step, indicating an inverse transform).<br>
&gt;<br>
&gt; /Thomas<br>
&gt;<br>
&gt;<br>
&gt; 2018-02-19 16:07 GMT+01:00 Matthias Gabriel &lt;<a href="mailto:matthias.gabriel@etit.tu-chemnitz.de">matthias.gabriel@etit.tu-<wbr>chemnitz.de</a>&gt;:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;ve been using the old proj4 API successfully an did understand that by<br>
&gt; specifying source and target systems i could transform my coordinates.<br>
&gt; Now I tried to use the new API (proj.h) which seems to be much cleaner<br>
&gt; and easier to use. I checked the manual and found:<br>
&gt;<br>
&gt; &quot;the fundamental concept of transformations in PROJ are now handled in a<br>
&gt; single transformation object (PJ) and not by stating the source and<br>
&gt; destination systems as previously.&quot;<br>
&gt;<br>
&gt; Ok, fine.. understood. Unfortunately my problem definition is still the<br>
&gt; same: given a set of coordinates in source system A I want to calculate<br>
&gt; their representation in system B. ..<br>
&gt;<br>
&gt; So before it was straight-forward: I specified what I had and what I<br>
&gt; wanted, but now I don&#39;t know how to get the required &quot;direct<br>
&gt; transformation&quot; from A to B using the new API?! I tried to use a<br>
&gt; cs2cs-style string with the &quot;+to&quot; specifier  but that didn&#39;t work.<br>
&gt; proj_create_crs_to_crs would be an option but doesn&#39;t quite suit my<br>
&gt; problem (we don&#39;t use EPSG codes etm).<br>
&gt;<br>
&gt; Could you please give me a hint on how to proceed here?<br>
&gt;<br>
&gt; Best Regards,<br>
&gt; Matthias<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Proj mailing list<br>
&gt; <a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
&gt; <a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a><br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; M.Sc. Matthias Gabriel<br>
&gt; Fakultät für Elektrotechnik und Informationstechnik<br>
&gt;<br>
&gt; Technische Universität Chemnitz<br>
&gt; Reichenhainer Straße 70 | R. W440<br>
&gt; 09126 Chemnitz<br>
&gt; Germany<br>
&gt;<br>
&gt; Tel: <a href="tel:%2B49%20371%20531-34458" value="+4937153134458">+49 371 531-34458</a><br>
&gt; Fax: <a href="tel:%2B49%20371%20531-834458" value="+49371531834458">+49 371 531-834458</a><br>
&gt;<br>
&gt; <a href="mailto:matthias.gabriel@etit.tu-chemnitz.de">matthias.gabriel@etit.tu-<wbr>chemnitz.de</a> www.tu-chemnitz.de____________<wbr>______________________________<wbr>_____<br>
&gt; Proj mailing list<br>
&gt; <a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
&gt; <a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a><br>
<br>
______________________________<wbr>_________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a></blockquote></div></div>