[Gdal-dev] Weird colors in gdal_translate

Morten Nielsen mn at blominfo.dk
Tue Aug 30 05:56:07 EDT 2005


I'm trying to extract tiles from a large image, but all I get is a
weird-looking image consisting of primary colors (ie. rgb values are
either 0 or 255). There is an example here:
http://blominfo.dk/3d/gdalerror.png

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 image:
gdal_translate -projwin -266437.5 193600 -265412.5 192575 input.ecw
output.tif

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 the 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".


Best regards
/Morten 





More information about the Gdal-dev mailing list