grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

delete.c File Reference

Vedit library - delete vector features. More...

#include <stdlib.h>
#include <grass/vedit.h>
#include <grass/dbmi.h>
#include <grass/glocale.h>
Include dependency graph for delete.c:

Go to the source code of this file.

Functions

int Vedit_delete_lines (struct Map_info *Map, struct ilist *List)
 Delete selected features. More...
 
int Vedit_delete_area_centroid (struct Map_info *Map, int centroid)
 Delete area (centroid and set of boundaries) by centroid. More...
 
int Vedit_delete_area (struct Map_info *Map, int area)
 Delete area (centroid + set of boundaries) by id. More...
 
int Vedit_delete_areas_cat (struct Map_info *Map, int field, int cat)
 Delete vector areas of given category. More...
 

Detailed Description

Vedit library - delete vector features.

(C) 2007-2008, 2012 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Martin Landa <landa.martin gmail.com>

Definition in file delete.c.

Function Documentation

◆ Vedit_delete_area()

int Vedit_delete_area ( struct Map_info Map,
int  area 
)

Delete area (centroid + set of boundaries) by id.

Parameters
Mappointer to Map_info struct
areaid
Returns
0 no area deleted
1 area deleted

Definition at line 92 of file delete.c.

References _, G_debug(), G_warning(), line(), list, Vect_delete_line(), Vect_destroy_list(), Vect_get_area_boundaries(), Vect_get_area_centroid(), Vect_get_line_areas(), and Vect_new_list().

Referenced by Vedit_delete_area_centroid(), and Vedit_delete_areas_cat().

◆ Vedit_delete_area_centroid()

int Vedit_delete_area_centroid ( struct Map_info Map,
int  centroid 
)

Delete area (centroid and set of boundaries) by centroid.

Parameters
Mappointer to Map_info struct
centroid
Returns
0 no area deleted
1 area deleted

Definition at line 64 of file delete.c.

References _, G_debug(), G_warning(), Vect_get_centroid_area(), and Vedit_delete_area().

◆ Vedit_delete_areas_cat()

int Vedit_delete_areas_cat ( struct Map_info Map,
int  field,
int  cat 
)

Delete vector areas of given category.

Parameters
Mappointer to Map_info struct
fieldlayer number
catcategory number
Returns
number of deleted areas

Definition at line 139 of file delete.c.

References G_debug(), Vect_area_alive(), Vect_get_area_cat(), Vect_get_num_areas(), and Vedit_delete_area().

◆ Vedit_delete_lines()

int Vedit_delete_lines ( struct Map_info Map,
struct ilist List 
)

Delete selected features.

Parameters
Mappointer to Map_info
Listlist of features to be deleted
Returns
number of deleted features
-1 on on error

Definition at line 29 of file delete.c.

References _, G_debug(), G_warning(), line(), ilist::n_values, ilist::value, Vect_delete_line(), and Vect_line_alive().