[FWTools] Issues with gdal_rasterize

Chetan Tiwari chetan.tiwari at gmail.com
Sat Jul 28 17:55:11 EST 2012


Dear List Members,

I was having trouble executing gdal_rasterize and was hoping to get some
advice from other members of the list. I've spent the better part of the
afternoon trying to figure this out, but have been unsuccessful. Here are
the details:

I am trying to convert a polygon shapefile to a raster. The shapefile
was originally a table in PostGIS that was converted to a shapefile using
ogr2ogr. I am able to successfully load the shapefile in QGIS and I am also
able to convert this shapefile to a raster layer using the GDAL tools menu.
However, I have several such files (and several other preceding steps), so
I've written a simple script that executes the appropriate command
(gdal_rasterize) with the required parameters on the command line. I
constructed the command line version of this conversion process using
information from QGIS. My command for this operation is as follows:

F:\>"c:\Program Files (x86)\FWTools2.4.7\bin\gdal_rasterize.exe" -a count
-l cty_u_d -ts 3000 3000 "f:\temp\cty_u_d.shp" "f:\temp\raster.tif"

 where count is an integer attribute in the shapefile called cty_u_d. When
I run this command, all I get is the usage information. No files are
created. Please note that I am able to successfully convert the same file
into a raster using QGIS (and on the same machine running Windows 7, QGIS
1.8.1, and FWTools 2.4.7). Any help or suggestions would be
most appreciated.

Thanks and regards,

Chetan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20120728/27c8db69/attachment.htm 


More information about the FWTools mailing list