Re: GRASS-way to delete points from a map and attribute table
Markus Metz <[email protected]>
| Newsgroups | gmane.comp.gis.grass.user |
|---|---|
| Message-ID | <CAG+h=FGB0H5O7hM24e=6Uuey9rWF6UDgDmqZ9bG_aju1G7otxg@mail.gmail.com> |
On Fri, Nov 10, 2017 at 10:06 AM, Micha Silver <[email protected]> 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 < [email protected]> wrote: >> >> So, removing records from the attribute table would be a job for db.execute of db.select I guess… >> >> >> >> From: Johannes Radinger [mailto:[email protected]] >> Sent: torsdag 9. november 2017 10.17 >> To: Stefan Blumentrath <[email protected]> >> Cc: GRASS user list <[email protected]> >> 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 < [email protected]> wrote: >> >> Did you try v.edit: >> >> https://grass.osgeo.org/grass72/manuals/v.edit.html >> >> Cheers >> >> Stefan >> >> >> >> From: grass-user [mailto:[email protected]] On Behalf Of Johannes Radinger >> Sent: torsdag 9. november 2017 10.04 >> To: GRASS user list <[email protected]> >> 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 > [email protected] > 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 > [email protected] > https://lists.osgeo.org/mailman/listinfo/grass-user _______________________________________________ grass-user mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-user