<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Gordon,</p>
    <p>urn:ogc:def:coordinateOperation:EPSG::1311 is from ED50 to WGS84,
      so what you observe with gdaltransform is expected. You'd get the
      correct result by just switching EPSG:4326 and EPSG:4230</p>
    <p>Regarding the use of the API, it is true that this was lacking.
      Adressed per <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/6175">https://github.com/OSGeo/gdal/pull/6175</a></p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 09/08/2022 à 13:16, Gordon Paterson
      a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAF9Cb5j6r1sRrVp_YgxdO-_dFmEo9jC+3FqQxVSDz769H3kzhg@mail.gmail.com">
      <div dir="ltr">Hi everyone,
        <div><br>
        </div>
        <div>GDAL 3.5.0</div>
        <div><br>
        </div>
        <div>I have an application written in c# that takes data in
          WGS84 and transforms the coordinates to the relevant local
          projected CRS. </div>
        <div><br>
        </div>
        <div>In the code I use a URN with the EPSG transformation code,
          for example for ED50 data -</div>
        <div><br>
        </div>
        <blockquote>
          <div><span>urn:ogc:def:coordinateOperation:EPSG::1311</span></div>
        </blockquote>
        <div><span><br>
          </span></div>
        <div><span>to convert between EPSG:4326 and EPSG:4230 and it
            works great for going from EPSG:4230 > EPSG:4326 but it
            doesn't give the correct results the other way.</span></div>
        <div><span><br>
          </span></div>
        <div><span>Checking the coordinates with gdaltransform from the
            command line using the following -</span></div>
        <div><span><br>
          </span></div>
        <blockquote>
          <div>gdaltransform -s_srs EPSG:4326 -t_srs EPSG:4230 -ct
            urn:ogc:def:coordinateOperation:EPSG::1311</div>
        </blockquote>
        <div><span><br>
          </span></div>
        <div><span>I get this -</span></div>
        <div><span><br>
          </span></div>
        <blockquote>
          <div><span>WGS84 (EPSG:4326)</span></div>
          <div><span> </span><span>2.25661712354279 56.4136492649363</span></div>
          <div><span><br>
            </span></div>
          <div><span>ED50 (EPSG:4230)</span></div>
          <div><span>2.25511244583886 56.4129769077511</span></div>
        </blockquote>
        <div><span><br>
          </span></div>
        <div><span>which are the same coordinates I get through code,
            which is not right,  but with the -i switch -</span></div>
        <div><span><br>
          </span></div>
        <blockquote>
          <div>gdaltransform -s_srs EPSG:4326 -t_srs EPSG:4230 -ct
            urn:ogc:def:coordinateOperation:EPSG::1311 -i</div>
        </blockquote>
        <div><br>
        </div>
        <div>I get this -</div>
        <div><br>
        </div>
        <blockquote>
          <div><span>ED50 (EPSG:4230)</span></div>
          <div><span>2.25812179682132 56.414321584992</span></div>
        </blockquote>
        <div><span><br>
          </span></div>
        <div><span>which is correct.</span></div>
        <div><span><br>
          </span></div>
        <div><span>In the gdal docs there is a bReverseCT boolean
            parameter for SetCoordinateOperation that is not accessible
            and is set to always be false in the SWIG interface.</span></div>
        <div><span><br>
          </span></div>
        <div><span>I set the correct Axis mapping on the spatial
            reference within code. </span><span>I'm no doubt missing
            something, what am I doing wrong? </span></div>
        <div><span><br>
          </span></div>
        <div><span>thanks very much,</span></div>
        <div><span><br>
          </span></div>
        <div><span>-Gordon</span></div>
        <div><br>
        </div>
        <div><span><br>
          </span></div>
        <div><span><br>
          </span></div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</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>