How to fix a GeoTIFF that has an invalid NO DATA value: Difference between revisions
m (Frank@tygron.nl moved page How to fix a GeoTIFF that has an invalid NODATA value to How to fix a GeoTIFF that has an invalid NO DATA value without leaving a redirect) |
No edit summary |
||
Line 1: | Line 1: | ||
When importing a GeoTIFF into a project that you are editing, it can occur that you will receive the following error: | When importing a GeoTIFF into a project that you are editing, it can occur that you will receive the following error: | ||
[[File:nodata_tiff_error.PNG|thumb|GeoTIFF error panel shown when importing a GeoTIFF with a | [[File:nodata_tiff_error.PNG|thumb|GeoTIFF error panel shown when importing a GeoTIFF with a {{nodata}}-metadata value that is in ','-number notation.]] | ||
This error means that the metadata of the GeoTIFF for the | This error means that the metadata of the GeoTIFF for the {{nodata}} value was written in the ','-number notation, instead of the expected '.'-number notation. | ||
It is possible to fix the metadata of a GeoTIFF. You can download the free ''exiftool'' program to automatically adjust the | It is possible to fix the metadata of a GeoTIFF. You can download the free ''exiftool'' program to automatically adjust the {{nodata}}-metadata. | ||
Download url exiftool: [https://exiftool.org/] | Download url exiftool: [https://exiftool.org/] | ||
Line 12: | Line 12: | ||
[[File:nodata_tool_extract.PNG|thumb|Once downloaded, extract the ''exiftool'' from the zip file.]] | [[File:nodata_tool_extract.PNG|thumb|Once downloaded, extract the ''exiftool'' from the zip file.]] | ||
Next, you can create a command file that automatically adjust the | Next, you can create a command file that automatically adjust the {{nodata}} to a valid value: -3.4028229999999999999e+038 (-Infinity) | ||
<code>exiftool.exe nodata_tiff_comma.tiff "-GDALNoData=-3.4028229999999999999e+038"</code> | <code>exiftool.exe nodata_tiff_comma.tiff "-GDALNoData=-3.4028229999999999999e+038"</code> | ||
Line 29: | Line 29: | ||
{{article end | {{article end | ||
|notes=* You can also adjust the {{nodata}} value to an other value than -Infinity, for example to -999. | |||
|seealso=* [[GeoTIFF]] | |seealso=* [[GeoTIFF]] | ||
*[[GeoTIFF Overlay]] | *[[GeoTIFF Overlay]] | ||
}} | }} |
Revision as of 12:07, 29 September 2023
When importing a GeoTIFF into a project that you are editing, it can occur that you will receive the following error:
This error means that the metadata of the GeoTIFF for the NO_DATA value was written in the ','-number notation, instead of the expected '.'-number notation.
It is possible to fix the metadata of a GeoTIFF. You can download the free exiftool program to automatically adjust the NO_DATA-metadata.
Download url exiftool: [1]
Once downloaded, extract the file
Next, you can create a command file that automatically adjust the NO_DATA to a valid value: -3.4028229999999999999e+038 (-Infinity)
exiftool.exe nodata_tiff_comma.tiff "-GDALNoData=-3.4028229999999999999e+038"
C:\Users\TYGRON\Downloads\downloadtool\exiftool-12.65\exiftool.exe %1 -GDALNoData=-3.4028229999999999999e+038
pause
C:\Users\TYGRON\Downloads\downloadtool\exiftool-12.65\exiftool.exe %1
pause
Notes
- You can also adjust the NO_DATA value to an other value than -Infinity, for example to -999.