[Gdal-dev] Weird colors in gdal_translate
Morten Nielsen
mn at blominfo.dk
Tue Aug 30 09:57:50 EDT 2005
I'm sorry if this is a double-post, but I think something went wrong in
the first email...
Anyway, I'm trying to extract tiles from a large image, but all I get is
a weird-looking image consisting only of rgb levels at either 0 or 255.
There is an example here: http://blominfo.dk/3d/gdalerror.png
<http://blominfo.dk/3d/gdalerror.png>
The input image is an orthophoto mosaic and the top of the extracted
image only contain black pixels (I guess this is kinda like a nodata
area).
In the extracted image, the black area in the lower right corner is
where the actual data was, and the "psychedelic" colored and white area
is where there was actually no-data.
The funny thing is that when I extract from an area just below it, it
all works fine.
I've seen similar problems before when I was merging and ECW-compressing
large images, but never found a solution either.
Any kind of solution or workaround is highly appreciated.
I'm using "FW Tools 0.9.9".
Here is the gdalinfo on the input image:
----------------------------------
Driver: ECW/ERMapper Compressed Wavelets
Size is 206250, 75000
Coordinate System is:
LOCAL_CS["LOCAL",
UNIT["Meter",1]]
Origin = (-280500.000000,194000.000000)
Pixel Size = (0.08000000,-0.08000000)
Corner Coordinates:
Upper Left ( -280500.000, 194000.000)
Lower Left ( -280500.000, 188000.000)
Upper Right ( -264000.000, 194000.000)
Lower Right ( -264000.000, 188000.000)
Center ( -272250.000, 191000.000)
Band 1 Block=206250x1 Type=Byte, ColorInterp=Red
Overviews: arbitrary
Band 2 Block=206250x1 Type=Byte, ColorInterp=Green
Overviews: arbitrary
Band 3 Block=206250x1 Type=Byte, ColorInterp=Blue
Overviews: arbitrary
----------------------------------
Here's the command that produces the output:
gdal_translate -projwin -266437.5 193600 -265412.5 192575 input.ecw
output.tif
Best regards
/Morten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20050830/985df2be/attachment.html
More information about the Gdal-dev
mailing list