[GRASS-user] Re: v.breach addon

Maciej Sieczka msieczka at sieczka.org
Wed Dec 2 15:35:49 EST 2009


Luís Ferreira pisze:
> I want to make a hydrological corrected DEM, using v.surf.rst for 
> interpolation/aproximation and v.breach to introduce aditional 
> elevation points at streams.
> 
> My spatial reference system is EPSG:3763 ETRS89 / Portugal TM06, 
> (metrical).
> 
> As required in v.breach document: - each input vect line have a 
> unique category in layer 1; - input lines not cross themselves; - 
> input lines not constitute loops; - the input vector lines not stand 
> out of the input raster DEM; - the input lines direction is from 
> upstream to downstream.
> 
> After creating a DEM using v.surf.rst I want to correct the false 
> sinks in narrow valleys and sparse points areas. Using v.breach I 
> have as result two output vectors for streams lines and points but 
> without entities or attributes. I tried with both PostgreSQL and 
> Sqlite database connections.
> 
> For PostgreSQL connection:
> 
> DBMI-Postgres driver error: Cannot select: SELECT cat,lcat,z,z_breach
>  FROM topografia.vbreachpoints_2 ERROR:  column "z" does not exist 
> LINE 1: SELECT cat,lcat,z,z_breach FROM topografia.vbreachpoints_2 ^
>  Unable to open select cursor: 'SELECT cat,lcat,z,z_breach FROM 
> topografia.vbreachpoints_2' Copy table failed Table <vbreach_2> does 
> not exist in database <host=localhost,dbname=grass_pp_muda_pttm06> 
> The table <vbreach_2> is now part of vector map <vbreach> and may be
>  deleted or overwritten by GRASS modules DBMI-Postgres driver error:
>  Cannot create index: create unique index vbreach_2_cat on vbreach_2
> ( cat ) ERROR:  relation "vbreach_2" does not exist Cannot create
> index DBMI-Postgres driver error: Cannot grant on table: grant select
> on vbreach_2 to public ERROR:  relation "vbreach_2" does not exist 
> Cannot grant privileges on table vbreach_2 Select privileges were 
> granted on the table
> 
> Any ideas? If wanted I'll send the files needed for replication.

Luís,

Glad to see someone trying to use my stuff :).

What GRASS version do you use? What OS? What was your command line, exactly?

Maybe the culprit is the DB backend. I have never used the script with
anything else than DBF. Try to switch to DBF in GRASS (db.connect). Or a
GRASS version "too new". I think I used it only against 6.3. There
*might* have been changes to underlying GRASS modules.

I've written the script, and used it the last time, about 2 years ago.
It did the job fine then. I don't have a personal interest in developing
it at the moment. I could provide you a commercial support if you like.
That would include testing the script against your data, in a GRASS
setup similar to yours, and fixing the tool if necessary.

Please contact me in priv if you are interested. I don't charge much :).
Or, if there's a GRASS hacker willing to do it for free - please go
ahead, anybody.

Best,
Maciek

-- 
Maciej Sieczka
http://www.sieczka.org



More information about the grass-user mailing list