<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Javier,</p>
<p>The error message comes from the XYZ driver which is confused and
believes it might be for it, but this is definitely not a .xyz
file</p>
<p>There are quite a lot of variations of ASCII grid formats. This
one reminds me a bit of the IGN France ones that are handled by
the
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal-extra-drivers/blob/master/src/ignfheightasciigrid/ignfheightasciigrid.cpp">https://github.com/OSGeo/gdal-extra-drivers/blob/master/src/ignfheightasciigrid/ignfheightasciigrid.cpp</a>
driver (note that it has been retired as out of tree), but I can
see that this .gri file has min_lat, max_lat first whereas the
French ones have min_lon, max_lon :-)</p>
<p>I've tried with
<a class="moz-txt-link-freetext" href="https://www.isgeoid.polimi.it/Geoid/America/Argentina/public/GEOIDEAR16_20160419.isg">https://www.isgeoid.polimi.it/Geoid/America/Argentina/public/GEOIDEAR16_20160419.isg</a>,
linked from
<a class="moz-txt-link-freetext" href="https://www.isgeoid.polimi.it/Geoid/America/Argentina/argentina2016_g.html">https://www.isgeoid.polimi.it/Geoid/America/Argentina/argentina2016_g.html</a>
. Hopefully it has the same content as the .gri file. I had to
push in <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/7730">https://github.com/OSGeo/gdal/pull/7730</a> a fix to open it
as the rounding of coordinates & resolution is quite rough in
those .isg files.</p>
<p>with the fix:</p>
<p>$ gdalinfo GEOIDEAR16_20160419.isg -mm<br>
Driver: ISG/International Service for the Geoid<br>
Files: GEOIDEAR16_20160419.isg<br>
Size is 1440, 2220<br>
Coordinate System is:<br>
GEOGCRS["WGS 84",<br>
DATUM["World Geodetic System 1984",<br>
ELLIPSOID["WGS 84",6378137,298.257223563,<br>
LENGTHUNIT["metre",1]]],<br>
PRIMEM["Greenwich",0,<br>
ANGLEUNIT["degree",0.0174532925199433]],<br>
CS[ellipsoidal,2],<br>
AXIS["geodetic latitude (Lat)",north,<br>
ORDER[1],<br>
ANGLEUNIT["degree",0.0174532925199433]],<br>
AXIS["geodetic longitude (Lon)",east,<br>
ORDER[2],<br>
ANGLEUNIT["degree",0.0174532925199433]],<br>
ID["EPSG",4326]]<br>
Data axis to CRS axis mapping: 2,1<br>
Origin = (-76.009853500000006,-20.008733500000002)<br>
Pixel Size = (0.016667000000000,-0.016667000000000)<br>
Metadata:<br>
MODEL_NAME=GEOIDEAR16<br>
MODEL_TYPE=gravimetric<br>
Corner Coordinates:<br>
Upper Left ( -76.0098535, -20.0087335) ( 76d 0'35.47"W, 20d
0'31.44"S)<br>
Lower Left ( -76.0098535, -57.0094735) ( 76d 0'35.47"W, 57d
0'34.10"S)<br>
Upper Right ( -52.0093735, -20.0087335) ( 52d 0'33.74"W, 20d
0'31.44"S)<br>
Lower Right ( -52.0093735, -57.0094735) ( 52d 0'33.74"W, 57d
0'34.10"S)<br>
Center ( -64.0096135, -38.5091035) ( 64d 0'34.61"W,
38d30'32.77"S)<br>
Band 1 Block=1440x1 Type=Float32, ColorInterp=Undefined<br>
Computed Min/Max=-6.007,45.203<br>
NoData Value=-9999<br>
Unit Type: meters</p>
<p><br>
</p>
<p>Note that CRS is hard coded to WGS 84 by the driver, and should
be altered to something more relevant.<br>
</p>
<p>Even<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 09/05/2023 à 17:21, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKtc9QLxEFfc65rStgEbJHio_GEV1kMUsJY77txn9UHEBA@mail.gmail.com">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>I want to read the Argentinian Geoid model with GDAL.</div>
<div>It is an ascii raster floating-point file with just one
band.</div>
<div><a
href="https://dnsg.ign.gob.ar/apps/geoidear/documentos/GEOIDE-Ar16.gri"
moz-do-not-send="true" class="moz-txt-link-freetext">https://dnsg.ign.gob.ar/apps/geoidear/documentos/GEOIDE-Ar16.gri</a>
(22 MB)<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>The content is starts with:</div>
<div><br>
</div>
<div> -57.0007400000 -20.0166670000 -76.0000000000
-52.0161870000 0.01666700000000001 0.01666700000000000<br>
<br>
13.278 13.310 13.321 13.322 13.357 13.383 13.429 13.442<br>
13.477 13.504 13.516 13.549 13.574 13.549 13.570 13.602<br>
13.623 13.584 13.574 13.661 13.766 13.802 13.823 13.821<br>
13.835 13.881 13.907 13.944 14.005 14.060 14.085 14.070<br>
14.098 14.153 14.221 14.259 14.277 14.396 14.446 14.451<br>
14.390 14.471 14.572 14.645 14.681 14.674 14.702 14.745<br>
14.796 14.843 14.872 14.872 14.952 15.065 15.110 15.053<br>
15.056 15.050 15.095 15.126 15.125 15.154 15.222 15.261<br>
15.244 15.369 15.480 15.519 15.464 15.462 15.505 15.477<br>
</div>
<div><br>
</div>
<div>and finishes with</div>
<div><br>
</div>
<div>19.069 19.065 19.057 19.047 19.039 19.031 19.021 19.012<br>
19.004 18.997 18.990 18.987 18.987 18.988 18.991 18.998<br>
19.001 19.009 19.027 19.042 19.067 19.141 19.209 19.208<br>
19.179 19.156 19.147 19.150 19.152 19.156 19.164 19.155<br>
</div>
<div><br>
</div>
<div>Total number of lines: 399602</div>
<div><br>
</div>
<div>It seems to have a width of 1440 and height of 2220.<br>
</div>
<div><br>
</div>
<div>gdalinfo says</div>
<div><br>
</div>
<div>$ gdalinfo GEOIDE-Ar16.gri<br>
ERROR 1: Maximum number of characters allowed reached.<br>
ERROR 1: Couldn't determine X spacing<br>
gdalinfo failed - unable to open 'GEOIDE-Ar16.gri'.</div>
<div><br>
</div>
<div>I do not know which exact format it is. I can deduce the
meaning of the values (specially knowing that it covers
Argentina ;), but I would like to read it directly if
possible.</div>
<div><br>
</div>
<div>Is that a know format for GDAL?<br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Javier.<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ...
.... ._ .__</div>
</div>
</div>
</div>
</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>