[gdal-dev] grey output from gdal2tiles.py

Frank Warmerdam warmerdam at pobox.com
Tue May 13 22:21:35 EDT 2008


Wendell Turner wrote:
> I used gdal2tiles.py to convert a GeoTIFF file into a
> directory for use with OpenLayers.  The tiles are generated,
> and can be viewed with OpenLayers, but the tiles are all
> gray.  There appears to be some structure to the images, but
> they do not have any colors, and little detail.
> 
> The input file looks fine in gtviewer.
> 
> Is the input to gdal2tiles supposed to be in some other
> format?  It uses gdal.Open, which I suppose can open any
> type of file format.  Any suggestions?

Wendell,

I don't know what gtviewer is.  Can you make the original file available
to review?  I suspect it has a very limited dynamic range and the viewer
you are using for it directly does a contrast stretch, but this doesn't
happen with the tiles in openlayers. Alternatively, perhaps it doesn't
start out as an RGB image as is expected by gdal2tiles.

So basically, review the input file structure (a gdalinfo report will
help) vs. what gdal2tiles expects as input.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list