christophe wrote > thank you markus for the reply > > well, in vector layer i don't have a field containing numbers in string > field, here is my attribute table: > > objectID Type > 1 A > 2 A > 3 B > 4 A > 5 C > > > so, i have to rasterize it using the type field wich is not numeric. > How can i do it ? > > thank you
something like this should do it: - use v.db.addcol to add a new numeric column (e.g. column name: typenumeric) - use v.db.update with WHERE conditions to 'translate' e.g. all A to 1, all B to 2 and so on (e.g. v.db.update map=yourvectordata column=typenumeric value=1 where="Type = A", v.db.update map=yourvectordata column=typenumeric value=2 where="Type = B", etc.) - use v.to.rast to rasterize the vector and label your raster map with the type information (e.g. v.to.rast input=yourvectordata column=typenumeric labelcolumn=Type) ----- best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/rasterize-vector-layer-string-column-tp5160150p5160418.html Sent from the Grass - Users mailing list archive at Nabble.com. _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
