Opened 11 years ago
Closed 5 years ago
#4892 closed defect (wontfix)
[PATCH] gdal_convert creates incorrect negative values when converting to ARG format.
Reported by: | remanuele | Owned by: | dzwarg |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | gdal_translate ARG |
Cc: |
Description (last modified by )
reproduction:
In working directory, where ever attached dem file is located
$ gdal_translate -of ARG -ot Float32 mt_st_helens.dem mt_st_helens.arg
Actual Behavior:
$ gdalinfo -stats mt_st_helens.dem | grep Min
Minimum=676.000, ...
$ gdalinfo -stats mt_st_helens.arg | grep Min
Minimum=-32767.000, ...
Expected behavior: the Minimum for the .tiff and .arg files would be the same (676.0)
This same behavior happens if you were to convert the DEM to GeoTIFF, and then convert the GeoTIFF to ARG. The DEM and GeoTIFF formats both have a Minimum of 676.0, the ARG has -32767.0.
Attachments (2)
Change History (7)
by , 11 years ago
Attachment: | mt_st_helens.dem added |
---|
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
I'm getting this behavior with some other elevation model data (in GeoTiff format). This does seem to be a case where the NODATA value is being ignored. gdalinfo -stats provides the no data value, and the two values do not match up between the original and ARG files.
comment:3 by , 11 years ago
Status: | new → assigned |
---|
The NODATA value for each data type supported by ARG is fixed to the following:
- Int8: 128
- Int16: -32767
- Int32: -2e31
- UInt8: 255
- UInt16: 65535
- UInt32: -2e31
- Float32: NAN
- Float64: NAN
When converting between rasters with different data types, these NODATA values are not translated, and the old NODATA value cannot be stored in the raster, nor it's metadata. The ARG specification must be updated to support custom NODATA values before they can be tracked during file format conversion.
by , 11 years ago
Attachment: | nodata_support.patch added |
---|
Addition of 'nodata' key to .json file keeps track of the NODATA value, especially when changing data types.
comment:4 by , 9 years ago
Summary: | gdal_convert creates incorrect negative values when converting to ARG format. → [PATCH] gdal_convert creates incorrect negative values when converting to ARG format. |
---|
You are commiter, dzwarg. Do you trust in your patch so much that you could apply it and close this ticket?
comment:5 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
Mt. St. Helens DEM data from before the 1980 eruption.