to be able to easily filter vector maps geometrically (i.e. remove
vectors) I have
written the v.db.droprow script (G6.5; needs a Python port for GRASS 7).
It removes vector objects (point, line, area, face etc.) from a vector
map through
attribute selection in the table.
Example: remove all vector with a certain attribute missing (nice when doing
random sampling).
to be able to easily filter vector maps geometrically (i.e. remove
vectors) I have
written the v.db.droprow script (G6.5; needs a Python port for GRASS 7).
It removes vector objects (point, line, area, face etc.) from a vector
map through
attribute selection in the table.
Example: remove all vector with a certain attribute missing (nice when doing
random sampling).
On Tue, Aug 11, 2009 at 8:10 PM, Moritz
Lennert<mlennert@club.worldonline.be> wrote:
On 11/08/09 19:29, Markus Neteler wrote:
On Tue, Aug 11, 2009 at 5:53 PM, Moritz Lennert wrote:
On 11/08/09 14:49, Markus Neteler wrote:
...
Example: remove all vector with a certain attribute missing (nice when
doing random sampling).
Can't you do that with v.extract ?
It is using v.extract. But IMHO most non-power users won't get the idea to
use a reverse extraction to remove vectors via attribute selection...
Shouldn't this then be better documented ?
Please suggest where... (if I/user don't know that I have to use
v.extract for this
in the first place since I want to *delete*, it needs to be documented
elsewhere).
Just wondering whether multiplying the number of small scripts is really the
best way to go...
Well, since we have
r.mfilter + r.mfilter.fp or
r.colors + r.colors.stddev
r.grow + r.grow.distance
r.rescale + r.rescale.eq
r.surf.idw + r.surf.idw2
r.what + r.what.color
...
Luckily the v.* family looks better...
With vector objects removal I don't see the problem (while I agree in general).
to be able to easily filter vector maps geometrically (i.e. remove
vectors) I have
written the v.db.droprow script (G6.5; needs a Python port for GRASS 7).
Done in r38716.
It removes vector objects (point, line, area, face etc.) from a vector
map through
attribute selection in the table.
Also not sure if we need this script. In any case the name is probably
misleading. Prefix 'v.db' indicates that the module modifies only
attribute data, not geometry(?)
I have some questions regarding Bash script:
* are these extra checks needed (it's done by v.extract) [1,2]
* unused variables [3]
* G_OPT_OUTPUT instead of G_OPT_INPUT? [4]
On Fri, Aug 14, 2009 at 10:15 AM, Martin Landa<landa.martin@gmail.com> wrote:
2009/8/11 Markus Neteler <neteler@osgeo.org>:
It removes vector objects (point, line, area, face etc.) from a vector
map through attribute selection in the table.
Also not sure if we need this script.
How would you do vector removal based on attributes?
In any case the name is probably
misleading. Prefix 'v.db' indicates that the module modifies only
attribute data, not geometry(?)
Perhaps yes (I considered it a v.db.* since it uses the attribute table).
I have some questions regarding Bash script:
* are these extra checks needed (it's done by v.extract) [1,2]
Yes, I think so: if you create a map with v.random it won't have
a connected table, so better don't badly crash. Likewise with
a non-existing map. I used existing msg strings (for translation).
* are these extra checks needed (it's done by v.extract) [1,2]
Yes, I think so: if you create a map with v.random it won't have
a connected table, so better don't badly crash. Likewise with
a non-existing map. I used existing msg strings (for translation).
Badly crash? After r38718:
$ v.db.droprow in=x out=x1 w='x' --o
ERROR: Vector map <x> not found
$ v.db.droprow in=p out=x1 w='x' --o
ERROR: Database connection not defined for layer 1
* are these extra checks needed (it's done by v.extract) [1,2]
Yes, I think so: if you create a map with v.random it won't have
a connected table, so better don't badly crash. Likewise with
a non-existing map. I used existing msg strings (for translation).
BTW, why are you requesting the input vector map from the current mapset?
On Fri, Aug 14, 2009 at 12:16 PM, Martin Landa<landa.martin@gmail.com> wrote:
Hi,
2009/8/14 Martin Landa <landa.martin@gmail.com>:
* are these extra checks needed (it's done by v.extract) [1,2]
Yes, I think so: if you create a map with v.random it won't have
a connected table, so better don't badly crash. Likewise with
a non-existing map. I used existing msg strings (for translation).
BTW, why are you requesting the input vector map from the current mapset?