[GRASS-user] extract a "dinamic" vector layer

Moritz Lennert mlennert at club.worldonline.be
Wed Jul 31 05:10:06 PDT 2013


On 31/07/13 10:27, Ing. Pierluigi De Rosa wrote:
> Dear all,
>
> I know this problem could be sorted easily using statialdb but I'm
> asking if is possible to do the same think in grass.
>
> I have a vector layer that store db in posgtres.

So GRASS vector layer with attributes in PostgreSQL ?

> I'm able to extract
> (v.extract) vector feature from this using sql query based on data
> stored into an other table 2 into the postgres db.
> The question is that if I change a value into the table 2 the vector
> extracted does not reflect this changes but I have to run again
> v.extract
>
> Dou you have any suggestion?

Depending on the module that you use to treat the result of the 
v.extract, you might be able to not do a v.extract at all, but just use 
the 'where' parameter of the module (MarkusM has started integrating 
that parameter in more vector modules in GRASS 7 [1])

If you can use the where parameter, the you can create a view in your 
database connecting the attribut table of the map with your table 2, 
then use v.db.connect to connect your map to that view and then use 
'where' to work on the features that meet your criteria.

Moritz

[1] http://trac.osgeo.org/grass/ticket/1798


More information about the grass-user mailing list