<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/09/2021 à 17:03, José Luis García
      Pallero a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFemY3aBmA-2O1rdud52wS+4r1sYXOHrNSQsGeu-UFioaTg-gg@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">El mié, 29 sept 2021 a las 16:42, Even Rouault
(<a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a>) escribió:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">
Hi,

you're actually hitting this very old change in behavior in PROJ that
still applies with recent versions:
<a class="moz-txt-link-freetext" href="https://proj.org/usage/differences.html#version-4-6-0">https://proj.org/usage/differences.html#version-4-6-0</a>

Just specifying a +ellps= doesn't define a datum. There's no way we can
relate the 2 datums that are partially defined by just their ellipsoids.
So when considering the geographic coordinates, they are just kept
unchanged; Which explains the behaviour of the second cs2cs invokation.

Why do you get different results in the UTM projected coordinates ?
Because projection computation takes into account the ellipsoid shape.
But you won't get a datum shift by itself when doing so.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Thank you for yout answer

But I understand that in this case the operations are:

1. Inverse projection step from UTM ellps=intl to geographic
coordinates in ellps=intl
2. Geographic coordinates in ellps=intl to cartesian geocentric
coordinates referred to ellps=intl
3. Helmert transformation from cartesian geocentric referred to
ellps=intl to cartesian geocentric referred to ellps=WGS84 using the
parameters defined in PROJ database
4. Cartesian geocentric referred to ellps=WGS84 to geographic
coordinated in ellps=WGS84
5. Projection from geographic coordinated in ellps=WGS84 to UTM ellps=WGS84

Am I right? Then, why do not perform the steps 2, 3, 4 in the case
just specifying +ellps=?</pre>
    </blockquote>
    No, they aren't done. You would need to add +towgs84=0,0,0 to do
    2,3,4 but that's unlikely to be what is appropriate.<br>
    <blockquote type="cite"
cite="mid:CAFemY3aBmA-2O1rdud52wS+4r1sYXOHrNSQsGeu-UFioaTg-gg@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">

About the datum definitions for the +datum option, I can see in
<a class="moz-txt-link-freetext" href="https://proj.org/operations/conversions/latlon.html">https://proj.org/operations/conversions/latlon.html</a> that there is the
option -ld in order to see all defined datums. But in my PROJ 7.2.1
there is no such option. Is the -ld option only present in PROJ 8?</pre>
    </blockquote>
    <p>Yes, it was removed per
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/PROJ/commit/a955947c1f3279e51d1272df0cb6aa61ce4b85ee">https://github.com/OSGeo/PROJ/commit/a955947c1f3279e51d1272df0cb6aa61ce4b85ee</a></p>
    <p>"Remove -ld option from proj and cs2cs </p>
    <pre>It promotes use of deprecated paramters +datum and +towgs84 which we
don't want to encourage."

PROJ.4 style strings to express CRSs, and in particular datums, are rather limited and we want people to use codes, WKT or PROJJSON instead.

Even
</pre>
    <blockquote type="cite"
cite="mid:CAFemY3aBmA-2O1rdud52wS+4r1sYXOHrNSQsGeu-UFioaTg-gg@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">

Thanks

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">
So you'll probably have to specify a +towgs84 or +nadgrids parameters to
your source CRS to define how it relates with the WGS 84 datum, and
replace on the target CRS +ellps=WGS84 by +datum=WGS84

The PROJ debug traces are quite verbose and hard to understand if you're
not a developer, so they won't help much.

If you know the EPSG codes of the CRS, you'd better using them directly
to get more significant transformations.

Even

Le 29/09/2021 à 16:18, José Luis García Pallero a écrit :
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Hello:

I'm using PROJ 7.2.1 from Debian repositories and I have some
questions about cs2cs. If I run

echo 1445748.66 5053500.03 | cs2cs +proj=utm +zone=10 +ellps=intl +to
+proj=utm +zone=10 +ellps=WGS84

I obtain

1445704.69      5053404.02 0.00

so the transformation of UTM coordinates between a point on the
international ellipsoid to WGS84 was performed.

But if I try to do the same with geographical coordinates as

echo 111W 45N | cs2cs +proj=latlong +ellps=intl +to +proj=latlong +ellps=WGS84

I obtain

111dW   45dN 0.000

so no transformation was performed. Why? Setting PROJ_DEBUG I obtain
for this case

pj_open_lib(proj.db): call fopen(/usr/share/proj/proj.db) - succeeded
pj_open_lib(proj.ini): call fopen(/usr/share/proj/proj.ini) - succeeded
pj_ellipsoid - final: a=6378137.000 f=1/298.257, errno=0
pj_ellipsoid - final:    ellps=GRS80

Here I understand that only the second declaration of +ellps was taken
into account (althoug EGS84 and GRS80 ellipsoids are not exactly the
same)

Thanks
</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
--
<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>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">

</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>