<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 23/01/2024 à 20:56, Wilco K via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:PRAPR10MB5275D700F4E4EEAFB3AED51ADF742@PRAPR10MB5275.EURPRD10.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div class="elementToProof"><span
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Hi,</span></div>
      <div class="elementToProof"><span
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
        </span></div>
      <div class="elementToProof"><span
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">why
          is
          <b>units=km</b> not working?</span></div>
      <div class="elementToProof"><span
style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);"><b><br>
          </b></span></div>
      <div class="elementToProof"><span
style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);"><b>gdaltransform
            -s_srs EPSG:4326 -t_srs "+proj=stere +lat_0=90 +lon_0=0
            +lat_ts=60 +a=6378.14 +b=6356.75 +x_0=0 +y_0=0
          </b></span><span
style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><b>+units=km" </b></span></div>
      <div class="elementToProof"><span
style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;"><br>
        </span></div>
      <div class="elementToProof"><span
style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">The
          following error is returned:</span></div>
      <div style="text-align: left; margin: 0px;"><span
style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">ERROR
          1: PROJ: proj_create_operations: Source and target ellipsoid
          do not belong to the same celestial body</span></div>
      <div><span
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
          <br>
        </span></div>
      <div class="elementToProof"><span
style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); font-weight: 400;">Converting
          +a and +b to meters and it does works:</span></div>
      <div class="elementToProof"><span
style="letter-spacing: normal; font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);"><b>gdaltransform
            -s_srs EPSG:4326 -t_srs "+proj=stere +lat_0=90 +lon_0=0
            +lat_ts=60 +a=6378140 +b=6356750 +x_0=0 +y_0=0"</b></span></div>
      <div><span
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br>
          <br>
        </span></div>
      <div class="elementToProof"><span
style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Any
          ideas?</span></div>
    </blockquote>
    <p>Cf <a class="moz-txt-link-freetext" href="https://proj.org/en/9.3/usage/projections.html#units">https://proj.org/en/9.3/usage/projections.html#units</a> :
      "Horizontal coordinate system units can be specified using the <code
        class="docutils literal notranslate"><span class="pre">+units</span></code>
      keyword [...] Note that this does <em>not</em> affect the units
      of linear parameters such as <code
        class="docutils literal notranslate"><span class="pre">+x_0</span></code>
      or <code class="docutils literal notranslate"><span class="pre">+y_0</span></code>
      which should always be specified in meters." .  This also applies
      to the +a and +b parameters. Doc enhancement filed in
      <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/PROJ/pull/4010">https://github.com/OSGeo/PROJ/pull/4010</a></p>
    <p><br>
    </p>
    <p>When you specify +units=km, it just means that you wish the
      output projected coordinates are expressed in km. But this doesn't
      affect the units of any linear parameters of the projection
      definition.<br>
    </p>
    <p><span style="white-space: pre-wrap">
</span></p>
    <p><span style="white-space: pre-wrap">Even
</span></p>
    <p><span style="white-space: pre-wrap">
</span></p>
    <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>