Thanks for the replies so far, but I'm obviously missing a trick as it doesnt seem to be working.<br><br>The gdalinfo on my TIF looks like this.<br><br>E:\rasters>gdalinfo tq00ne.tif<br>Driver: GTiff/GeoTIFF<br>Files: tq00ne.tif<br>
tq00ne.tfw<br>Size is 7874, 7874<br>Coordinate System is `'<br>Origin = (505000.000000000000000,110000.000000000000000)<br>Pixel Size = (0.635001270002540,-0.635001270002540)<br>Metadata:<br> TIFFTAG_IMAGEDESCRIPTION=1:10000 TILE TQ00NE<br>
TIFFTAG_DATETIME=2008:07:14 23:22:37<br> TIFFTAG_COPYRIGHT=ORDNANCE SURVEY CROWN COPYRIGHT 2008<br> TIFFTAG_XRESOLUTION=400<br> TIFFTAG_YRESOLUTION=400<br> TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)<br>Image Structure Metadata:<br>
COMPRESSION=LZW<br> INTERLEAVE=BAND<br>Corner Coordinates:<br>Upper Left ( 505000.000, 110000.000)<br>Lower Left ( 505000.000, 105000.000)<br>Upper Right ( 510000.000, 110000.000)<br>Lower Right ( 510000.000, 105000.000)<br>
Center ( 507500.000, 107500.000)<br>Band 1 Block=7874x8 Type=Byte, ColorInterp=Palette<br> Image Structure Metadata:<br> NBITS=4<br> Color Table (RGB with 16 entries)<br> 0: 0,0,0,255<br> 1: 107,107,107,255<br>
2: 90,90,90,255<br> 3: 220,220,220,255<br> 4: 209,209,209,255<br> 5: 243,243,243,255<br> 6: 190,190,190,255<br> 7: 243,243,243,255<br> 8: 190,190,190,255<br> 9: 255,255,255,255<br> 10: 0,0,0,255<br>
11: 0,0,0,255<br> 12: 0,0,0,255<br> 13: 0,0,0,255<br> 14: 0,0,0,255<br> 15: 0,0,0,255<br><br><br>But whenever I try to do a gdalwarp with the using -dstalpha I get an error message and an unsuable TIF file as output<br>
<br><br>E:\rasters>gdalwarp -of GTiff -s_srs "EPSG:27700" -t_srs "EPSG:4326" -co "TFW=YES" -co "TILED=YES" -co "COMPRESS=LZW" -dstalpha TQ00NE.TIF TQwarpa.TIF<br>Copying color table from TQ00NE.TIF to new file.<br>
Creating output file that is 9687P x 6132L.<br>ERROR 6: SetColorTable() not supported for multi-sample TIFF files.<br>Processing input file TQ00NE.TIF.<br>0...10...20...30...40...50...60...70...80...90...100 - done.<br><br>
<br>E:\rasters>gdalwarp -of GTiff -s_srs "EPSG:27700" -t_srs "EPSG:4326" -co "TFW=YES" -co "TILED=YES" -co "COMPRESS=LZW" -dstnodata 12 -dstalpha TQ00NE.TIF TQwarpa.TIF<br>
Copying color table from TQ00NE.TIF to new file.<br>Creating output file that is 9687P x 6132L.<br>ERROR 6: SetColorTable() not supported for multi-sample TIFF files.<br>Processing input file TQ00NE.TIF.<br>0...10...20...30...40...50...60...70...80...90...100 - done.<br>
<br>Any more suggestions? <br><br>Thanks<br><br>Rob<br><br><br><div class="gmail_quote">On 18 June 2010 15:06, Chaitanya kumar CH <span dir="ltr"><<a href="http://chaitanya.ch">chaitanya.ch</a>@<a href="http://gmail.com">gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Rob,<br><br>You can try the -dstalpha option in gdalwarp to create an alpha band. (<a href="http://www.gdal.org/gdalwarp.html" target="_blank">http://www.gdal.org/gdalwarp.html</a>)<br>
<br><div class="gmail_quote"><div><div></div><div class="h5">On Fri, Jun 18, 2010 at 7:22 PM, Rob <span dir="ltr"><<a href="mailto:gis@vanbooth.com" target="_blank">gis@vanbooth.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Hi Guys<br><br>I'm reprojecting some rasters from OSGB (EPSG:27700) to WGS84 (EPSG:4326) and am running into a problem.<br>
<br>The rasters are reprojecting nicely, but I am left with black pixels around the image where the reprojected image doesnt fit squarely within the rectangular dimensions of the file.<br>
<br>I posted about this issue a few weeks ago, and then realised that I should be marking that colour as transparent when rendering using GeoServer, and ho! everything was OK.<br><br>However, I am now reprojecting some greyscale rasters, and by making the black pixels on the outside transparent, I am losing the black details of the raster image that I want to display!<br>
<br>Is there a way of selecting the colour that gdal uses to populate these dead pixels around the side?<br><br>MTIA<br><font color="#888888"><br>Rob<br>
</font><br></div></div><div class="im">_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></div></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>Best regards,<br>
Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>
</font></blockquote></div><br>