GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
remove_areas.c File Reference

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

#include <stdlib.h>
#include <grass/gis.h>
#include <grass/Vect.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 (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-2008 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
Date
2001

Definition in file remove_areas.c.

Function Documentation

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
Mapvector map
threshmaximum area size for removed areas
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 G_debug(), G_fatal_error(), G_percent(), l, NULL, tools::size, Vect_area_alive(), Vect_delete_line(), Vect_get_area_area(), Vect_get_area_boundaries(), Vect_get_area_centroid(), Vect_get_line_areas(), Vect_get_num_areas(), Vect_line_alive(), Vect_line_length(), Vect_list_append(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_new_list(), Vect_read_line(), Vect_reset_list(), and Vect_write_line().