<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Thanks for your reply.<br><br>Would you be able to give me an example of the syntax for the gdal_translate option<b>?<br></b>How do I change the dynamics to 8 bits?<b><br>-scale</b> <em>[src_min src_max [dst_min dst_max]]</em>:<br><br>Thanks<br><br>Chris<br><br>> Date: Fri, 11 Sep 2009 18:06:48 +0200<br>> From: even.rouault@mines-paris.org<br>> To: chrisemberson@hotmail.com<br>> CC: gdal-dev@lists.osgeo.org<br>> Subject: Re: [gdal-dev] Problem with gdal_translate<br>> <br>> Selon Chris Emberson <chrisemberson@hotmail.com>:<br>> <br>> The behaviour you see is expected. -expand rgb only works for bands that have<br>> color maps. You can transform your grey scale FILEA.asc into a RGB file by doing<br>> this :<br>> <br>> gdal_translate -of GTiff -co "TILES=YES" -b 1 -b 1 -b 1 FILEA.asc FILEB.tif<br>> <br>> This will use the source band 1 for the R, G, B components of the output file.<br>> You may need to use the scaling/translate options of gdal_translate to reduce<br>> the dynamics to 8 bits.<br>> <br>> ><br>> > I am having trouble converting a single band raster (.asc) when using the<br>> > GDAL utility gdal_translate (version 1.6)<br>> ><br>> > This is the command...<br>> > gdal_translate -of GTiff -co "TILES=YES" -expand rgb FILEA.asc FILEB.tif<br>> ><br>> > I get this message....<br>> ><br>> ><br>> ><br>> ><br>> > Error : band 1 has no color table<br>> ><br>> > I want to be able to tile this raster using Mapnik - therefore it needs to be<br>> > a 3 band tiff - Can anyone help with this problem?<br>> ><br>> > Thanks in advance<br>> ><br>> > Chris<br>> ><br>> ><br>> ><br>> ><br>> ><br>> ><br>> ><br>> > _________________________________________________________________<br>> > Save time by using Hotmail to access your other email accounts.<br>> > http://clk.atdmt.com/UKM/go/167688463/direct/01/<br>> <br>> <br><br /><hr />View your other email accounts from your Hotmail inbox. <a href='http://clk.atdmt.com/UKM/go/167688463/direct/01/' target='_new'>Add them now.</a></body>
</html>