<div dir="ltr"><div><div><div><div><div><div><div>I'm trying to understand how gdal_rasterize works.<br></div>As a test I'm trying to convert a shapefile with all counties of the USA to a GeoTiff.<br></div>I've added a field to the shapefile called myID which is equal to the shape number.<br>
</div>The goal is to create a tiff with each county its own value.<br><br></div>This is my command:<br>gdal_rasterize -a myID -l counties -of GTiff -a_nodata -999 -ts 800 800 counties.shp GDALRasterizeTest.tif<br><br></div>
I'm having trouble understanding the -ts or -tr parameters.<br></div>Using the above command I get an 800*800 tiff which shows the USA, but it looks like all pixels are the same color.<br></div>I would have expected I could set the cell size and the dimensions of the resulting tiff file would be equal to the input shapefile.<br>
<br clear="all"><div><div><div><div><div><div><div><div><div><div>I also tried creating an ASCII file so I could 'read' the values, but I can't figure out how to create an ASCII file.<br><br>Any help will be much appreciated.<br>
<br></div><div>Thanks,<br></div><div>
<br>
Paul</div>
</div></div></div></div></div></div></div></div></div></div>