GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
remove_areas.c File Reference

Vector library - clean geometry (remove small areas) More...

#include <stdlib.h>
#include <grass/vector.h>
#include <grass/glocale.h>
Include dependency graph for remove_areas.c:

Go to the source code of this file.

Functions

int Vect_remove_small_areas_nat (struct Map_info *, double, struct Map_info *, double *)
 
int Vect_remove_small_areas_ext (struct Map_info *, double, struct Map_info *, double *)
 
int Vect_remove_small_areas (struct Map_info *Map, double thresh, struct Map_info *Err, double *removed_area)
 Remove small areas from the map map. More...
 

Detailed Description

Vector library - clean geometry (remove small areas)

Higher level functions for reading/writing/manipulating vectors.

(C) 2001-2009 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
Radim Blazek, Markus Metz

Definition in file remove_areas.c.

Function Documentation

◆ Vect_remove_small_areas()

int Vect_remove_small_areas ( struct Map_info Map,
double  thresh,
struct Map_info Err,
double *  removed_area 
)

Remove small areas from the map map.

Centroid of the area and the longest boundary with adjacent area is removed. Map topology must be built GV_BUILD_CENTROIDS.

Parameters
[in,out]Mapvector map
threshmaximum area size for removed areas
[out]Errvector map where removed lines and centroids are written
removed_areapointer to where total size of removed area is stored or NULL
Returns
number of removed areas

Definition at line 41 of file remove_areas.c.

References Map_info::format, GV_FORMAT_NATIVE, Vect_remove_small_areas_ext(), and Vect_remove_small_areas_nat().

◆ Vect_remove_small_areas_ext()

int Vect_remove_small_areas_ext ( struct Map_info Map,
double  thresh,
struct Map_info Err,
double *  removed_area 
)

Definition at line 51 of file remove_areas.c.

Referenced by Vect_remove_small_areas().

◆ Vect_remove_small_areas_nat()

int Vect_remove_small_areas_nat ( struct Map_info Map,
double  thresh,
struct Map_info Err,
double *  removed_area 
)

Definition at line 200 of file remove_areas.c.

Referenced by Vect_remove_small_areas().