<div dir="ltr"><div>Hi Even,</div><div><br></div><div>Thanks for explaining the difference between the images. You're absolutely right: I indeed assumed the two were using the same ellipsoids. If I use epsg:4269 (nad83 ell.) as the src, all the numbers are consistent.</div><div><br></div><div>-</div><div>Regards<br></div><div>Rajsekar</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 10, 2022 at 8:05 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Rajsekar,</p>
<p>One of the reason that the -full image is larger than the -small
one is that the former includes > 500 MB of geodetic grids,
whereas the later only includes very basic ones. (I've just
amended <a href="https://github.com/OSGeo/gdal/blob/master/docker/README.md" target="_blank">https://github.com/OSGeo/gdal/blob/master/docker/README.md</a>
to make it clearer)</p>
<p>As you do a WGS 84 to NAD83 transformation, the ubuntu-full image
can use the HPGN grids, and in particular the Pennsylviana grid <br>
</p>
<p>$ echo -77.75 40.16666666666666 | PROJ_DEBUG=2 bin/cs2cs
'+init=epsg:4326' '+to' '+init=epsg:2271'<br>
[ ... snip ... ]<br>
Using coordinate operation axis order change (2D) + Inverse of
NAD83 to WGS 84 (57) + SPCS83 Pennsylvania North zone (US Survey
feet)<br>
pj_open_lib(us_noaa_pahpgn.tif): call
fopen(/home/even/proj/PROJ-data/us_noaa/us_noaa_pahpgn.tif) -
succeeded<br>
1968499.39 -0.15 0.00<br>
<br>
Whereas the -small image has no such grid and will assume that
NAD83 == WGS84.</p>
<p>In theory the result with the -full image should be more
accurate, but it depends if somewhere in your workflow someone has
not assumed that NAD83 == WGS84 ...</p>
<p>Anyway WGS 84 is literaly a moving and somewhat fuzzy target, so
you shouldn't expect in general results to have an accuracy better
than ~ 2m in any transformation involving it.</p>
<p>Even<br>
</p>
<div>Le 10/01/2022 à 15:21, Rajsekar
Manokaran a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi gdal devs and users,</div>
<div><br>
</div>
<div>I came across a discrepancy in proj. values between
ubuntu-small and ubuntu-full docker images even for the same
gdal version tag. I tried to convert a few coords from
epsg:4326 to epsg:2271. The coords are:</div>
<div><br>
</div>
<div>Input:</div>
<div>-77.75 40.16666666666666 # this is the center meridian,
lat of 2271<br>
</div>
<div>-75.18094433657971 40.25904959199275 # another sample
point</div>
<div><br>
</div>
<div>The outputs of all ubuntu-small-* images seem to be
correct, but the ubuntu-full-* images have about 1 feet error
(2271 uses US_SURVEY_FEET units).</div>
<div><br>
</div>
<div>Here's how I run it:</div>
<div><br>
</div>
<div>$ docker run --rm -i osgeo/gdal:"$tag" cs2cs
'+init=epsg:4326' '+to' '+init=epsg:2271' < input</div>
<div>where tag is the docker tag: "ubuntu-full-3.2.2", or
"ubuntu-small-3.4.1", etc.<br>
</div>
<div><br>
</div>
<div>Here are the outputs for the ubuntu-full images:</div>
<div><br>
</div>
<div>output-ubuntu-full-3.2.2<br>
1968499.39 -0.15 0.00<br>
2685535.97 44295.90 0.00<br>
output-ubuntu-full-3.3.3<br>
1968499.39 -0.15 0.00<br>
2685535.97 44295.90 0.00<br>
output-ubuntu-full-3.4.1<br>
1968499.39 -0.15 0.00<br>
2685535.97 44295.90 0.00</div>
<div><br>
</div>
<div>Here are the outputs for the small images:</div>
<div><br>
</div>
<div>output-ubuntu-small-3.2.2<br>
1968500.00 -0.00 0.00<br>
2685536.18 44296.27 0.00<br>
output-ubuntu-small-3.3.3<br>
1968500.00 -0.00 0.00<br>
2685536.18 44296.27 0.00</div>
<div>output-ubuntu-small-3.4.1<br>
1968500.00 -0.00 0.00<br>
2685536.18 44296.27 0.00</div>
<div><br>
</div>
<div>The first input is the center and so should translate to
"(false east, false north)". Going by that, the small
versions seem to be more correct. Any idea why this
difference in the values?<br>
</div>
<div><br>
</div>
<div>-</div>
<div>Rajsekar</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div>