[gdal-dev] Problem with gdal_translate

Chris Emberson chrisemberson at hotmail.com
Mon Sep 21 11:52:02 EDT 2009


Thanks for your reply.

Would you be able to give me an example of the syntax for the gdal_translate option?
How do I change the dynamics to 8 bits?
-scale [src_min src_max [dst_min dst_max]]:

Thanks

Chris

> Date: Fri, 11 Sep 2009 18:06:48 +0200
> From: even.rouault at mines-paris.org
> To: chrisemberson at hotmail.com
> CC: gdal-dev at lists.osgeo.org
> Subject: Re: [gdal-dev] Problem with gdal_translate
> 
> Selon Chris Emberson <chrisemberson at hotmail.com>:
> 
> The behaviour you see is expected. -expand rgb only works for bands that have
> color maps. You can transform your grey scale FILEA.asc into a RGB file by doing
> this :
> 
> gdal_translate -of GTiff -co "TILES=YES" -b 1 -b 1 -b 1 FILEA.asc FILEB.tif
> 
> This will use the source band 1 for the R, G, B components of the output file.
> You may need to use the scaling/translate options of gdal_translate to reduce
> the dynamics to 8 bits.
> 
> >
> > I am having trouble converting a single band raster (.asc) when using the
> > GDAL utility gdal_translate (version 1.6)
> >
> > This is the command...
> > gdal_translate -of GTiff -co "TILES=YES" -expand rgb FILEA.asc FILEB.tif
> >
> > I get this message....
> >
> >
> >
> >
> > Error : band 1 has no color table
> >
> > I want to be able to tile this raster using Mapnik - therefore it needs to be
> > a 3 band tiff - Can anyone help with this problem?
> >
> > Thanks in advance
> >
> > Chris
> >
> >
> >
> >
> >
> >
> >
> > _________________________________________________________________
> > Save time by using Hotmail to access your other email accounts.
> > http://clk.atdmt.com/UKM/go/167688463/direct/01/
> 
> 

_________________________________________________________________
View your other email accounts from your Hotmail inbox. Add them now.
http://clk.atdmt.com/UKM/go/167688463/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090921/f7ff9a13/attachment.html


More information about the gdal-dev mailing list