[gdal-dev] bring through shapefile attribute in gdal_rasterize

Derek Morgan jdmorgan at unca.edu
Sun Apr 8 21:26:11 EDT 2012


Hello GDAL colleagues,

This may be a simple question for most of you but I thought I would
ask it anyhow as I am at an impasse.  I have a Counties shape file.  I
am attempting to convert it to raster utilizing gdal_rasterize, and
this does work.  However, I am attempting to carry into the output
file the county name preferably e.g. Orange County, or at least a
county identify of some kind.  I have utilized a command similar to
the following:

gdal_rasterize -a COUNTY  -l -sql "select COUNTY, * from Counties"
Counties Counties.shp CountiesRaster.tif

However, when I open the resulting raster file in ArcGIS and click on
one of the pixel to identify it I don’t see the county name. Is the
county name there and I am just not seeing it in ArcGIS indentify.  I
realize there are probably more GDAL intensive ways to check for the
data, but I am still learning. I was hoping to someone could explain
to me what I am doing incorrectly.

Thanks,
Derek


More information about the gdal-dev mailing list