[GRASS-user] GRASS-way to delete points from a map and attribute table

Markus Metz markus.metz.giswork at gmail.com
Fri Nov 10 07:20:45 PST 2017


On Fri, Nov 10, 2017 at 10:06 AM, Micha Silver <tsvibar at gmail.com> wrote:
>
> IMHO it would be helpful to add a flag to v.edit to also delete the
database entries when tool=delete.
> In general use, when I delete a feature, I don't expect to leave orphaned
entries in the attribute table.

It's not that simple, you would also need to check if this entry in the
attribute table, i.e. this category value, is not used by any of the other
geometries left (different geometries can share the same category value and
attributes).

Best would be a new library function that prunes a table, removing all
unused entries, something like Vect_prune_table().

Markus M

>
>
> On 11/09/2017 12:25 PM, Johannes Radinger wrote:
>
> Indeed, finally I also used a combination of v.edit to remove the point
from the map and db.execute ("DELETE FROM my_point_map WHERE cat IN
(1,2,3)") to delete the entries from the attribute table.
>
> /Johannes
>
> On Thu, Nov 9, 2017 at 10:27 AM, Stefan Blumentrath <
Stefan.Blumentrath at nina.no> wrote:
>>
>> So, removing records from the attribute table would be a job for
db.execute of db.select I guess…
>>
>>
>>
>> From: Johannes Radinger [mailto:johannesradinger at gmail.com]
>> Sent: torsdag 9. november 2017 10.17
>> To: Stefan Blumentrath <Stefan.Blumentrath at nina.no>
>> Cc: GRASS user list <grass-user at lists.osgeo.org>
>> Subject: Re: [GRASS-user] GRASS-way to delete points from a map and
attribute table
>>
>>
>>
>> Dear Stefan,
>>
>> thanks for the tip, but as said I tried already v.edit but somehow this
tools does not modify the attribute table (or do I miss something here?)
>>
>> /Johannes
>>
>>
>>
>> On Thu, Nov 9, 2017 at 10:10 AM, Stefan Blumentrath <
Stefan.Blumentrath at nina.no> wrote:
>>
>> Did you try v.edit:
>>
>> https://grass.osgeo.org/grass72/manuals/v.edit.html
>>
>> Cheers
>>
>> Stefan
>>
>>
>>
>> From: grass-user [mailto:grass-user-bounces at lists.osgeo.org] On Behalf
Of Johannes Radinger
>> Sent: torsdag 9. november 2017 10.04
>> To: GRASS user list <grass-user at lists.osgeo.org>
>> Subject: [GRASS-user] GRASS-way to delete points from a map and
attribute table
>>
>>
>>
>> Hi,
>>
>>
>>
>> what would be the most GRASS-like way to delete several points from a
points vector map.
>>
>>
>>
>> I know the specific cats of the points I would like to delete (10 of
200000) and I want to delete the points from the map and, of course, also
from the corresponding attribute table. I already tried v.edit but here the
points are not deleted from the attribute table. I could also use v.extract
with the reverse flag, however this requires to define a new output map
(which I would like to avoid if possible). Any straight forward way in
GRASS?
>>
>>
>>
>> /Johannes
>>
>>
>
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
>
> --
> Micha Silver
> Ben Gurion Univ.
> Sde Boker, Remote Sensing Lab
> cell: +972-523-665918
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20171110/2657a76b/attachment.html>


More information about the grass-user mailing list