[GRASS-user] Question about layers and categories

Moritz Lennert mlennert at club.worldonline.be
Fri Apr 5 02:15:52 PDT 2013

On 04/04/13 22:39, Vincent Bain wrote:
> Thank you Markus for your reply.
> The least we can say is that my message was not very well stated, in
> cause it reveals several questions... eventhough I was convinced to be
> clear-minded about vector/database grass model !
> So, let's put aside wxGUI-related questions. And go on with an example :
>          v.to.points -v input=project output=test type=line
> The result is a point vector with 2 layers :
>          v.db.connect -p map=test
>                  Vector map<test at vincent>  is connected by:
>                  layer<1>  table<test_1>  in database
>                  </home/vincent/Pro/toraval/cauterets2013/L2e/vincent/sqlite.db>  through driver<sqlite>  with key<cat>
>                  layer<2>  table<test_2>  in database
>                  </home/vincent/Pro/toraval/cauterets2013/L2e/vincent/sqlite.db>  through driver<sqlite>  with key<cat>
> As I need to work with data from layer 2 only, I want to purge layer 1
> (i.e. (i) its symbolic link to table test_1, (ii) the set of categories
> attached to layer 1, and secondarily table test_1, but I can perform it
> at the sqlite3 prompt, no problem).
> Your comment "Usually it does not harm to have categories attached to
> geometries in multiple layers" suggests me to leave these unused
> categories in place, isn't it ?
> So I run
>          v.db.connect -d layer=1 map=test

v.db.droptable does i and iii for you in one go.
for ii:
v.category op=del layer=1

> Now, what about wxGUI ?
> I agree with your comment "The wxGUI query ignores d.vect options and
> will (should) report anything found in any layer." : the query tool
> works quite well if you refer to results returned to command console,
> but when no data is retrieved from layer<1>, the "update attributes"
> popup does not appear, in other words, if you want to change layer<2>
> attributes on the fly from the map display... you can't.

cf [1], but also [2]

Which version of GRASS are you working in ?


[1] http://trac.osgeo.org/grass/ticket/1606
[2] https://trac.osgeo.org/grass/ticket/1703

More information about the grass-user mailing list