Re: [GRASS-user] v.to.rast in a python loop, error

2012-02-09 Thread Scott Sinclair
On 10 February 2012 03:22, wrote: > > Scott Sinclair wrote: > >> Have you tried adding flags = '-o' as an argument to >> grass.run_command? That will overwrite the output raster if it already >> exists. > > Actually, it will raise a ScriptError if you're running anything later > than 6.4.1. If yo

Re: [GRASS-user] v.to.rast in a python loop, error

2012-02-09 Thread glynn
Scott Sinclair wrote: > Have you tried adding flags = '-o' as an argument to > grass.run_command? That will overwrite the output raster if it already > exists. Actually, it will raise a ScriptError if you're running anything later than 6.4.1. If you want to pass the --overwrite flag to the modul

[GRASS-user] How to link or combine adjacent vector lines

2012-02-09 Thread sluedtke
Dear friends, I have been trying for some hours now but could not find any solution. We do have a shape file of a river network, but a bad one because single rivers consist of multiple lines. Just think of the easiest example, a river with one tributary. I would like to end up with an vector d

Re: [GRASS-user] g.extension - ERROR: G_getenv(): Variable LOCATION_NAME not set

2012-02-09 Thread Eric Momsen
Thanks Hamish for these answers and suggestions. In the meantime we did end up installing version 7, so I haven't had a chance to test it on 6.4 yet. I was only running as root for installing the extension - I did create a new mapset just to start grass since the root account didn't have access t

Re: [GRASS-user] Import postgis vector form schema

2012-02-09 Thread Martin Landa
2012/2/9 matteo poletti : > >> try >> >> v.in.ogr [...] layer=administrative.test > > I tried this, but failed: >> v.in.ogr dsn='PG:host=aaa dbname=bbb user= password=*' >> output=prova layer=administrative.test > ERROR: Layer not available it should work in GRASS 7, I didn't try GRASS 6.

Re: [GRASS-user] An error in GRASS-7 manual

2012-02-09 Thread Andres Kuusk
Hi! ERROR: Sorry, is not a valid parameter ERROR: Required parameter not set Perhaps you need to recompile the code if you did it yourself I see! I am still using GRASS-7 r48844 and everything works fine. This minor discrepancy between the code and manual is not a problem. Thanks fo

Re: [GRASS-user] Import postgis vector form schema

2012-02-09 Thread Moritz Lennert
On 09/02/12 13:00, Martin Landa wrote: Hi, 2012/2/9 matteo poletti: In the manual page http://grass.fbk.eu/gdp/html_grass64/v.in.ogr.html, section "Support of database schema", there is an example in which is used <./>. this example seems very weird to me. From user POV I would assume db.con

Re: [GRASS-user] Import postgis vector form schema

2012-02-09 Thread matteo poletti
> this example seems very weird to me. Same for me, I thought that db.connect would create some files in ./ but this is not true. > From user POV I would assume > db.connect driver=pg database=test schema=user1 group=group1 > db.login driver=pg database=test user=user1 password=pwd1 > v.in.ogr d

Re: [GRASS-user] Import postgis vector form schema

2012-02-09 Thread matteo poletti
> try > > v.in.ogr [...] layer=administrative.test I tried this, but failed: > v.in.ogr dsn='PG:host=aaa dbname=bbb user= password=*' output=prova > layer=administrative.test ERROR: Layer not available Da: Martin Landa A: matteo poletti Cc: GR

Re: [GRASS-user] Import postgis vector form schema

2012-02-09 Thread Martin Landa
Hi, 2012/2/9 matteo poletti : > In the manual page http://grass.fbk.eu/gdp/html_grass64/v.in.ogr.html, > section "Support of database schema", there is an example in which is used > <./>. this example seems very weird to me. From user POV I would assume db.connect driver=pg database=test schema=

Re: [GRASS-user] Import postgis vector form schema

2012-02-09 Thread Martin Landa
Hi, 2012/2/9 matteo poletti : >> db.tables -p > ... > administrative.test > ... >> v.in.ogr  dsn=./  layer=test output=prova1 > ERROR: Unable to open data source <./> > > I'm using GRASS 6.4.0. Command such > v.in.ogr dsn='PG:host=aaa dbname=bbb user= password=*' output=prova > layer=prova

Re: [GRASS-user] Import postgis vector form schema

2012-02-09 Thread matteo poletti
> If you are trying to import from PostgreSQL, dsn shouldn't be './', or ? In the manual page http://grass.fbk.eu/gdp/html_grass64/v.in.ogr.html, section "Support of database schema", there is an example in which is used <./>. Are there other ways? Thanks! Matteo _

Re: [GRASS-user] Import postgis vector form schema

2012-02-09 Thread Moritz Lennert
On 09/02/12 00:59, matteo poletti wrote: Hi, I tried to import a postgis layer from a non public schema. I used this commands according to the documentation (http://grass.fbk.eu/gdp/html_grass64/v.in.ogr.html): > db.connect driver=pg database="host=aaa,dbname=bbb" schema=administrative > db.lo

Re: [GRASS-user] v.to.rast in a python loop, error

2012-02-09 Thread Moritz Lennert
On 08/02/12 13:09, Johannes Radinger wrote: Hi, On 8 February 2012 11:35, Johannes Radinger wrote: I try to run v.to.rast of a line in a loop to get a raster for each attribute of the vector (multiple columns). Therefore I created a short python script, which is working expept for that I am g