[GRASS-user] v.extract and layer/table settings with layer=2

Johannes Radinger johannesradinger at gmail.com
Wed Nov 28 05:19:34 PST 2018


Thank you Moritz for clarification...
...I also issued an enhancement ticket for v.extract to include a new
output_layer parameter (https://trac.osgeo.org/grass/ticket/3700#ticket)

/J

On Wed, Nov 28, 2018 at 8:26 AM Moritz Lennert <mlennert at club.worldonline.be>
wrote:

>
>
> Am 27. November 2018 20:51:37 MEZ schrieb Johannes Radinger <
> johannesradinger at gmail.com>:
> >Hi all,
> >
> >this is maybe I quite easy routine for somebody that is using v.extract
> >regularly.
> >
> >Here my challenge: I have a vector map (initially created by v.net
> >tools)
> >that has several layers and associated tables to each layer. Now for
> >further processing I want to extract only some features from layer=2
> >and
> >the corresponding attribute table.
> >
> >I can do that using "v.extract input=mymap1 layer=2 where='mycol=x'
> >output=mymap2". The resulting 'mymap2' has an attribute table connected
> >to
> >layer 2 and there are no other layers (e.g. there is no layer 1, which
> >is
> >considered in most grass tools as default layer). So I wanted to change
> >that and to shift layer 2 (and the attribute table) to layer 1 using
> >"v.category option=chlayer layer='2,1' input=mymap2 output=mymap3"
> >
> >...however, this does not change the attribute table connection (as
> >checked
> >by "v.db.connect -p "). So I guess I also have to use v.db.connect in
> >some
> >way (??) to get the attribute table shifted from connection at former
> >layer
> >2 to layer 1 (unused).
>
> Yes:
>
> v.db.connect -d layer=2
> v.db.connect layer=1 table=
>
>
> >
> >In my opinion this is quite a bit complicated, considering that I just
> >wanted to extract some features from a 3-layered map?? Is there a
> >easier
> >way or a general description if one want to extract some feature that
> >are
> >not stored in layer 1?
>
> The best would probably be some form of output_layer parameter in
> v.extract, probably with a default of 1. Worth a trac ticket I think.
>
> Moritz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181128/2c12eb98/attachment.html>


More information about the grass-user mailing list