[gdal-dev] grey output from gdal2tiles.py

Wendell Turner wendell at enflight.com
Wed May 14 11:26:05 EDT 2008


Yes, sure enough, that was it.  Converting it with
pct2rgb.py works great!  (And yes, it was a NOAA chart I was
working with).

I use gtviewer
(http://nixbit.com/cat/science-and-engineering/geographical/geotiff-viewer/)
to view the files with.  Are there better/easier ones to
use?

Thank you both for this answer and the tremendous work in
all of these tools.

Wendell


On Wed, May 14, 2008 at 01:47:42PM +0200, Klokan Petr Přidal wrote:
> Hi,
> 
> I guess it is because your GeoTIFF is paletted. (result of gdalinfo
> will tell us that probably).
> 
> If I am right then fast solution will be to run first
> 
> pct2rgb.py on your TIFF to convert it to true RGB colors and then run
> gdal2tiles.py on the result.
> 
> Same problem appear for example with NOAA marine maps, which are also paletted.
> Frank, do you think functionality of pct2rgb should be embedded
> directly in gdal2tiles? I realized several people have trouble with
> that...
> 
> Klokan
> 
> On Wed, May 14, 2008 at 4:21 AM, Frank Warmerdam <warmerdam at pobox.com> wrote:
> > 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
> >
> >
> >
> >  _______________________________________________
> >  gdal-dev mailing list
> >  gdal-dev at lists.osgeo.org
> >  http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list