|
Here's a correction to the format of the "where" clause that should work:
import grass.script as
gscript
types = ("primary" , "secondary" ,
"tertiary" , "service" , "pedestrian" , "footway" ,
"residential" , "path")
for typ in types:
where_str = ("type = '%s'" % typ) # Added single quotes around the %s outrast = "_".join(["type", typ]) gscript.run_command
("v.to.rast",
input = "road_clip",
type = "line",
where = where_str,
output = outrast,
use = "attr" ,
attribute_column = "cat")
On 11/11/18 12:02 PM, Alessandro
Sebastiani wrote:
-- Micha Silver Ben Gurion Univ. Sde Boker, Remote Sensing Lab cell: +972-523-665918 |
_______________________________________________ grass-user mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-user
