Re: [GRASS-user] syntax for grass.run_command("v.rast.stat")

2015-10-24 Thread Grazia Zulian
A
Sorry
I forgot the 's'
Sorry thanks

Inviato da iPhone

> Il giorno 24/ott/2015, alle ore 10:53, Helmut Kudrnovsky  ha 
> scritto:
> 
> Grazia Zulian wrote
>> Hi Anna
>> It should add a new field to a vector with a statistic derived from a
>> raster.
>> It works manually. Not in the pytho scrip. Is the syntax correct? 
>> 
>> Inviato da iPhone
>> 
>>> Il giorno 23/ott/2015, alle ore 19:07, Anna Petrášová <
> 
>> kratochanna@
> 
>> > ha scritto:
>>> 
>>> 
>>> 
 On Fri, Oct 23, 2015 at 10:31 AM, Gra <
> 
>> graziaz@
> 
>> > wrote:
 I'm using 
 
 v.rast.stat in a python code
>>> it's v.rast.stats and use map instead of vector, please see manual page:
>>> https://grass.osgeo.org/grass70/manuals/v.rast.stats.html 
 
 
 grass.run_command("v.rast.stat", vector = vect+"_"+suffix +'_300',
 raster= "r_main_roads_dist" + suffix, colprefix="AVG_mainroads",
 method="average")
 
 apparently it doens't like my syntax
 
 ideas?
> 
> as Anna mentioned in her reply:
> 
> the command is "v.rast.stats" and not as in your python code "v.rast.stat"
> 
> the second issue (also mentioned by Anna):
> 
> v.rast.stats vector=elev_wakes3@user1 raster=elevation@PERMANENT
> colprefix=rast_ave2 method=average
> 
> ERROR: v.rast.stats: Sorry,  is not a valid
> parameter
> ERROR: Required parameter  not set:
>(Name of vector map)
> 
> 
> 
> -
> best regards
> Helmut
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/syntax-for-grass-run-command-v-rast-stat-tp5232220p5232312.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] syntax for grass.run_command("v.rast.stat")

2015-10-24 Thread Helmut Kudrnovsky
Grazia Zulian wrote
> Hi Anna
> It should add a new field to a vector with a statistic derived from a
> raster.
> It works manually. Not in the pytho scrip. Is the syntax correct? 
> 
> Inviato da iPhone
> 
>> Il giorno 23/ott/2015, alle ore 19:07, Anna Petrášová <

> kratochanna@

> > ha scritto:
>> 
>> 
>> 
>>> On Fri, Oct 23, 2015 at 10:31 AM, Gra <

> graziaz@

> > wrote:
>>> I'm using 
>>> 
>>> v.rast.stat in a python code
>> it's v.rast.stats and use map instead of vector, please see manual page:
>> https://grass.osgeo.org/grass70/manuals/v.rast.stats.html 
>>> 
>>> 
>>> grass.run_command("v.rast.stat", vector = vect+"_"+suffix +'_300',
>>> raster= "r_main_roads_dist" + suffix, colprefix="AVG_mainroads",
>>> method="average")
>>> 
>>> apparently it doens't like my syntax
>>> 
>>> ideas?
>>> 

as Anna mentioned in her reply:

the command is "v.rast.stats" and not as in your python code "v.rast.stat"

the second issue (also mentioned by Anna):

v.rast.stats vector=elev_wakes3@user1 raster=elevation@PERMANENT
colprefix=rast_ave2 method=average

ERROR: v.rast.stats: Sorry,  is not a valid
parameter
ERROR: Required parameter  not set:
(Name of vector map)



-
best regards
Helmut
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/syntax-for-grass-run-command-v-rast-stat-tp5232220p5232312.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] syntax for grass.run_command("v.rast.stat")

2015-10-23 Thread Grazia Zulian
Hi Anna
It should add a new field to a vector with a statistic derived from a raster.
It works manually. Not in the pytho scrip. Is the syntax correct? 

Inviato da iPhone

> Il giorno 23/ott/2015, alle ore 19:07, Anna Petrášová  
> ha scritto:
> 
> 
> 
>> On Fri, Oct 23, 2015 at 10:31 AM, Gra  wrote:
>> I'm using 
>> 
>> v.rast.stat in a python code
> it's v.rast.stats and use map instead of vector, please see manual page:
> https://grass.osgeo.org/grass70/manuals/v.rast.stats.html 
>> 
>> 
>> grass.run_command("v.rast.stat", vector = vect+"_"+suffix +'_300', raster= 
>> "r_main_roads_dist" + suffix, colprefix="AVG_mainroads", method="average")
>> 
>> apparently it doens't like my syntax
>> 
>> ideas?
>> 
>> thanks
>> 
>> ___
>> grass-user mailing list
>> grass-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] syntax for grass.run_command("v.rast.stat")

2015-10-23 Thread Anna Petrášová
On Fri, Oct 23, 2015 at 10:31 AM, Gra  wrote:

> I'm using
>
> v.rast.stat in a python code
>
> it's v.rast.stats and use map instead of vector, please see manual page:
https://grass.osgeo.org/grass70/manuals/v.rast.stats.html

>
>
> grass.run_command("v.rast.stat", vector = vect+"_"+suffix +'_300', raster=
> "r_main_roads_dist" + suffix, colprefix="AVG_mainroads", method="average")
>
> apparently it doens't like my syntax
>
> ideas?
>
> thanks
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] syntax for grass.run_command("v.rast.stat")

2015-10-23 Thread Markus Neteler
On Oct 23, 2015 4:31 PM, "Gra"  wrote:
>
> I'm using
>
> v.rast.stat in a python code
>
>
>
> grass.run_command("v.rast.stat", vector = vect+"_"+suffix +'_300',
raster= "r_main_roads_dist" + suffix, colprefix

I'm on mobile and cannot check but colprefix seems to be an abbreviation.
Not sure if the python api likes that.

Markus

> ="AVG_mainroads", method="average")
>
> apparently it doens't like my syntax
>
> ideas?
>
> thanks
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] syntax for grass.run_command("v.rast.stat")

2015-10-23 Thread Moritz Lennert

On 23/10/15 16:31, Gra wrote:

I'm using

v.rast.stat in a python code



grass.run_command("v.rast.stat", vector = vect+"_"+suffix +'_300',
raster= "r_main_roads_dist" + suffix, colprefix="AVG_mainroads",
method="average")

apparently it doens't like my syntax


Do you get an error message ?

Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user