<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
Thanks Even,<br>
<br>
I started with the implementation of GDAL in MapWinGIS, but I also
tried it with my stand-alone installation of GDAL<br>
I'm using the precompiled windows-version, 32bit from 18 jan 2015
bit by Tamas:
<meta charset="utf-8">
<a
href="http://www.gisinternals.com/query.html?content=filelist&file=release-1800-gdal-1-11-1-mapserver-6-4-1.zip"
style="font-family: 'Segoe UI'; font-size: medium; color: rgb(0,
0, 0); font-style: italic; font-weight: bold; text-decoration:
none; padding: 0px; font-variant: normal; letter-spacing: normal;
line-height: normal; orphans: auto; text-align: left; text-indent:
0px; text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; background:
rgb(204, 204, 255);">release-1800-gdal-1-11-1-mapserver-6-4-1</a><br>
However still I get an ascii grid with xxxE9 in nodata-cells.<br>
<br>
If I look in my GDAL\bin directory I see a gdal111.dll there, so it
must be the correct version I'm using.<br>
<br>
for the record: this is my batchfile's contents:<br>
setx PATH "C:\GDAL\bin"<br>
"c:\GDAL\bin\gdal\apps\gdal_translate.exe" -of AAIGrid -b 13
C:\Temp\H11_V7_NED_SINGLE_LEVEL_2011013018_000_GB
c:\temp\tempgrid.asc<br>
<br>
So version is ok, path is ok.<br>
Is it possible that all DLL's have been updated in this package, but
that the stand-alone tools are outdated?<br>
<br>
Thanks,<br>
Siebe<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="moz-forward-container"><br>
<br>
-------- Forwarded Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
</th>
<td>Re: [gdal-dev] gdal_translate truncates nodata_value
< -4.21358e-09</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Fri, 10 Apr 2015 18:28:04 +0200</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>Even Rouault <a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">CC: </th>
<td>Siebe Bosch <a class="moz-txt-link-rfc2396E" href="mailto:siebe@hydroconsult.nl"><siebe@hydroconsult.nl></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>Le vendredi 10 avril 2015 17:18:04, Siebe Bosch a écrit :
> Dear list,
>
> I am trying to convert one band from a GRIB2-file into an ASCII raster,
> using gdal_translate.
> Upon inspection (opening the original raster using the MapWinGis
> ActiveX-component) and requesting the nodata_value, I get this:
>
> ? mygrid.Header.NodataValue
> -3.40282346638529E+38 {Double}
> Double: -3.40282346638529E+38 {Double}
>
> So far, so good. Now l tried to convert to ASCII using gdal_translate,
> with the arguments "-of AAIGrid -b 13" (to ASC, band #13)
> Much to my surprise the nodata-value (inside the grid) has changed in
> -4.2135788191899337e-009. A NODATA_value in the header has not been set
> at all!
Are you using GDAL 1.11 or above ? It should output values with "%.20g"
formatting by default. See end of <a class="moz-txt-link-freetext" href="http://trac.osgeo.org/gdal/ticket/3732">http://trac.osgeo.org/gdal/ticket/3732</a>
>
> So I tried converting to an ERDAS IMG file. Arguments: "-of HFA -b 13"
> Inspecting the results in QGIS I see in the metadata that the
> "nodata-value has not been set". The grid itself however contains data
> of the Float type, and the cells that should have nodata-values have now
> values of -4.21358e-09
>
> My conclusion:
>
> GDAL_Translate does not support numbers smaller than -4.21358e-09. Am I
> right?
>
> The problem however is that I do need the nodata-cells to be recognized
> correctly. Is there any tool that can help me to correct this? E.g. can
> I change the nodata-value of the original (multi-band) grid on forehand?
> Or are there additional arguments for gdal_translate that allow values
> up to the original nodata_value?
>
> Many thanks,
> Siebe
--
Spatialys - Geospatial professional services
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
</pre>
<br>
</div>
<br>
</body>
</html>