thank you Mika, it's working!
Il giorno dom 11 nov 2018 alle ore 13:40 Micha Silver
ha scritto:
> Here's a correction to the format of the "where" clause that should work:
>
>
> *i*mport grass.script as gscript
> types = ("primary" , "secondary" , "tertiary" , "service" , "pedestrian" ,
> "footw
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")
Hello to everybody ,
i* tried with this piece of code, following suggestios by both:*
# note that for the moment i reduced the street types to 3
>>>types = ("primary" , "secondary" , "tertiary")
>>>for typ in types:
gscript.run_command ("v.to.rast" , input = "road_clip" , type =
"line" , wh
I would do as follows:
(Notice that each street type will become a *separate* raster)
On 11/9/18 1:49 PM, Alessandro
Sebastiani wrote:
Dear all
i have a vector (downloaded from OpenStreetmap) with
Hi Alessandro,
seems you oversaw a typo:
gscript.run_command ("v.to.rast" , input = "road_clip" , type = "line" ,
where ="type"=typ , output = types, use = "attr" , attribute_column = "cat")
where ="type"=typ schould rather be where ="type=%s"%typ
Regards.
Stefan
> Alessandro Sebastiani
Dear all
i have a vector (downloaded from OpenStreetmap) with all the streets in my
study area. Streets are divided in categories (there is a specific string
column in the db). now i want to convert to raster each category
separately. I now how to do that separately, but i was not able to automate