Thanks, that suggestion worked great. For simplicity, I used KML instead of shapefile, as follows:
gdal_rasterize -burn 0 -b 1 -b 2 -b 3 -l TestLayerName HoleExtent.kml OriginalRGB.tif And my KML file looks like this, with 'coordinates' in longitude/latitude: <?xml version="1.0" encoding="utf-8" ?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document><Folder><name>TestLayerName</name> <Placemark> <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates>-101.00,30.00 -100.00,30.00 -100.00,29.50 -101.00,29.50 -101.00,30.00</coordinates> </LinearRing> </outerBoundaryIs> </Polygon> </Placemark> </Folder></Document> </kml> -----Original Message----- From: Travis Kirstine [mailto:[email protected]] Sent: Tuesday, November 22, 2011 1:16 PM To: Jay Jennings Cc: [email protected] Subject: Re: [gdal-dev] Making a "hole" in existing image gdal_rasterize can be used to create a hole using a polygon from a vector datasource. gdal_rasterize -burn 0 -b 1 -b 2 -b 3 -l my_polygon my_polygon.shp my_image.tif regards On 22 November 2011 11:22, Jay Jennings <[email protected]> wrote: > Hi List, > > I'm looking for a slick way, using GDAL utilities, to make a NoData "hole" > in an existing image : I'd like to set value 0 (which is this image's > NoData value) for each band of the image within the rectangle denoted by > minX, minY, maxX, maxY. I looked at 'gdal_translate' and 'gdalwarp' but I > didn't see any obvious way to get there. > > > > ......................................................... > > Jay Jennings > > Senior Software Developer > > GeoEye, Inc. (NASDAQ: GEOY) > > > > > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
