I have a vector layer I need to rasterize. I guess this is a basic operation, but I haven't found the information I need yet.
First, I have reprojected the vector shapefile:
ogr2ogr -s_srs "+init=EPSG:3763" -t_srs "+proj=utm +zone=29 +north +west +datum=WGS84 +ellps=WGS84 +units=m +no_defs" CLC06_PT_WGS84.shp CLC06_PT.shp
The ogrinfo command on the new shapefile yields the following:
INFO: Open of
CLC06_PT_WGS84.shp' using driverESRI Shapefile' successful.
Layer name: CLC06_PT_WGS84 Geometry: Polygon Feature Count: 46915 Extent: (248668.309849, 3768747.607570) - (537329.149160, 4365413.617030) Layer SRS WKT: PROJCS["WGS_1984_UTM_Zone_29N", GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-9], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["Meter",1]] FID: Real (11.0)
now, I want to convert it to raster using gdal_rasterize. The original file contains information on land use (classed as attribute data), and I want that information to be rasterized.
I have tried the -3d option, but I was asked for the feature source, which is not the .dbf nor the .shx files created.
Another try was
gdal_rasterize -a FID -sql "select FID, * from CLC06_PT_WGS84" CLC06_PT_WGS84.shp CLC06_PT_WGS84.tif
but I got the error message
ERROR 4: `CLC06_PT_WGS84.tif' does not exist in the file system
I am using gdal 1.6
How can I achieve this? many thanks.