#4764 closed defect (fixed)
Artifacts in gdaldem color-relief output
Reported by: | YellowBeard | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.2 |
Component: | Utilities | Version: | |
Severity: | major | Keywords: | gdaldem color-relief |
Cc: |
Description
Using the command
gdaldem color-relief K:\1secSRTM_DEM_DSM\e113s22dem1_0\w001001.adf colourTextFile.txt K:\1secSRTM_DEM_DSM\e113s22.png -of PNG
with the color specification file
100% 255 255 255 2048 95 8 0 2047 95 7 255 1792 95 7 0 1791 95 6 255 1536 95 6 0 1535 95 5 255 1280 95 5 0 1279 95 4 255 1024 95 4 0 1023 95 3 255 768 95 3 0 767 95 2 255 512 95 2 0 511 95 1 255 256 95 1 0 255 95 0 255 1 95 0 1 0 95 0 0 -1 94 255 255 -256 94 254 0 -257 94 253 255 -512 94 253 0 -513 94 252 255 -768 94 252 0 nv 255 255 255
The results all come out with odd artifacts on the right-hand edge. An image is attached.
These files do not appear corrupted when viewing in various GIS packages.
Attachments (1)
Change History (7)
by , 11 years ago
Attachment: | Artifacts.png added |
---|
comment:1 by , 11 years ago
I'd need a source raster file that exhibits the issue to investigate (as .adf isn't very convenient due to the number of files, if you can convert it into geotiff first, that would be better)
When you say "These files do not appear corrupted when viewing in various GIS packages.", which files are you talking about : the input or output files ?
comment:2 by , 11 years ago
I'll keep working on getting a source file - My .adfs are around 50MB - 60MB each. I'm not currently able to convert into a tif using openEV as a part of FWTools for some reason. I'll keep tying to create something smaller.
The *input files* appear perfectly normal, and the data seems valid in OpenEV when hovering over it.
comment:3 by , 11 years ago
You can zip the .adf if you prefer. (TIFF was just a suggestion. You should be able to do the translation with gdal_translate)
comment:5 by , 11 years ago
Milestone: | → 1.9.2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Version: | 1.9.1 |
ok, I managed to reproduce. Here's the fix :
r24722 /trunk/gdal/apps/gdaldem.cpp: gdaldem: fix color-relief output with driver that has only CreateCopy() capability, and when the source block dimensions are not multiple of the raster dimension (#4764)
r24723 /branches/1.9/gdal/apps/gdaldem.cpp: gdaldem: fix color-relief output with driver that has only CreateCopy() capability, and when the source block dimensions are not multiple of the raster dimension (#4764)
Right-hand section of PNG output of color-relief utility