gdal_translate -scale src_dataset.asc dst_dataset.tif
-scale [src_min src_max [dst_min dst_max]]:
Rescale the input pixels values from the range src_min to src_max
to the range dst_min to dst_max. If omitted the output range is 0 to
255. If omitted the input range is automatically computed from the
source data.
see: http://gdal.org/gdal_translate.html
By the way: TILES is not a valid creation option (TILED however is).
Hermann
Chris Emberson wrote:
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.roua...@mines-paris.org
> To: chrisember...@hotmail.com
> CC: gdal-dev@lists.osgeo.org
> Subject: Re: [gdal-dev] Problem with gdal_translate
>
> Selon Chris Emberson <chrisember...@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/>
------------------------------------------------------------------------
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev