<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 29/10/2021 à 12:00, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKsO_bv0WxF1mnZ-rcT3cZayQ_-9qWA3oQN0GZqiauJRFw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>Using C++ I am trying this: Given two CRSs, I would like to
have access to the list of possible transformations (like with
projinfo), and use those transformations to transform
coordinates (like with cs2cs).</div>
<div><br>
</div>
<div>Studying the code of projinfo, that uses mainly the C++
API, I already have a
std::vector<CoordinateOperationNNPtr>. Nice, I can dump
them in different formats.</div>
<div><br>
</div>
<div>However, when I go to the code of cs2cs, I see that it is
mainly using the C API.</div>
<div><br>
</div>
<div>Is there any C++ equivalent to the function</div>
<div>PJ_COORD proj_trans (PJ *P, PJ_DIRECTION direction,
PJ_COORD coord);</div>
<div>?</div>
</div>
</blockquote>
<p>No.</p>
<p>If you know which transformation you want to do, what you can
easily do is exportToPROJString() it, and use proj_create() to
instanciate it as a PJ* object you can use with proj_trans()</p>
<p>That's more or less what proj_create_operations() +
proj_list_get() do.<br>
</p>
<p>Even<br>
</p>
<blockquote type="cite"
cite="mid:CADRrdKsO_bv0WxF1mnZ-rcT3cZayQ_-9qWA3oQN0GZqiauJRFw@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>Thanks.<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">.___ ._ ..._ .. . ._.
.___ .. __ . _. . __.. ... .... ._ .__<br>
Entre dos pensamientos racionales <br>
hay infinitos pensamientos irracionales.<br>
<br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>