[gdal-dev] gdal_rasterize usage problems

Roger André randre at gmail.com
Mon Nov 10 16:43:02 EST 2008


Andrew,

I believe your syntax is incorrect.  Assuming that you are trying to exclude
water from your image, it should be something like this:
% gdal_rasterize -b 1 -b 2 -b 3 -i -burn 0 -burn 0 -burn 0 -l gshhs_land
gshhs_land.shp warped.tif

Have a look at http://www.gdal.org/gdal_rasterize.html for a list of all the
options.

Roger
--





On Mon, Nov 10, 2008 at 11:11 AM, Andrew Brooks <arb at sat.dundee.ac.uk>wrote:

> Hello
>
> I'm trying to overlay coastlines on an image using gdal_rasterize but
> can't get it to do anything at all.
>
> % gdal_rasterize gshhs_land.shp warped.tif
> Usage: gdal_rasterize [-b band] [-i]
>       [-burn value] | [-a attribute_name] | [-3d]
>       [-l layername]* [-where expression] [-sql select_statement]
>       <src_datasource> <dst_filename>
>
> The files are ok:
>
> % ogrinfo gshhs_land.shp
> INFO: Open of `gshhs_land.shp'  using driver `ESRI Shapefile' successful.
> 1: gshhs_land (Polygon)
>
> % gdalinfo warped.tif
> Driver: GTiff/GeoTIFF
> Size is 396, 396
> Coordinate System is: PROJCS["OSGB 1936 / British National Grid", ...
> Band 1 Block=396x10 Type=UInt16, ColorInterp=Gray
>
> Andrew
>
> P.S. Unrelated to this problem there's also another problem:
>
> % gdal_rasterize -l gshhs_land gshhs_land.shp warped.tif
> To many of -3d, -burn and -a specified.
>
> "To" should be "Too", but since I've not specified any of -3d,
> -burn or -a then I'm not sure what it's complaining about...
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20081110/a688a7cb/attachment.html


More information about the gdal-dev mailing list