Issues with gdal_rasterize

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Issues with gdal_rasterize

Chetan Tiwari
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




_______________________________________________
FWTools mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issues with gdal_rasterize

Chetan Tiwari
Hi All,

I just noted that the version of gdal_rasterize packaged with FWTools 2.4.7 does not support raster creation. Please ignore my previous email.

Thanks,

Chetan

On Sat, Jul 28, 2012 at 5:55 PM, Chetan Tiwari <[hidden email]> wrote:
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






--
Chetan Tiwari, PhD
Assistant Professor
University of North Texas
Department of Geography
1155 Union Circle #305279
Denton, TX 76203-5017

_______________________________________________
FWTools mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/
Loading...