#include <stdlib.h>
#include <grass/gis.h>
#include <grass/Vect.h>
Go to the source code of this file.
Functions | |
void | remove_dangles (struct Map_info *Map, int type, int chtype, double maxlength, struct Map_info *Err, FILE *msgout) |
void | Vect_remove_dangles (struct Map_info *Map, int type, double maxlength, struct Map_info *Err, FILE *msgout) |
Remove dangles from vector map. | |
void | Vect_chtype_dangles (struct Map_info *Map, double maxlength, struct Map_info *Err, FILE *msgout) |
Change boundary dangles to lines. |
void remove_dangles | ( | struct Map_info * | Map, | |
int | type, | |||
int | chtype, | |||
double | maxlength, | |||
struct Map_info * | Err, | |||
FILE * | msgout | |||
) |
Definition at line 90 of file dangles.c.
References Vect_delete_line(), Vect_get_line_nodes(), Vect_get_node_line(), Vect_get_node_n_lines(), Vect_get_num_nodes(), Vect_line_length(), Vect_list_append(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_new_list(), Vect_node_alive(), Vect_read_line(), Vect_reset_list(), Vect_rewrite_line(), and Vect_write_line().
Referenced by Vect_chtype_dangles(), and Vect_remove_dangles().
void Vect_chtype_dangles | ( | struct Map_info * | Map, | |
double | maxlength, | |||
struct Map_info * | Err, | |||
FILE * | msgout | |||
) |
Change boundary dangles to lines.
Change boundary dangles to lines. Boundary is considered to be a dangle if on at least one end node is no other boundary. If a dangle is formed by more boundaries, such string of boundaries is taken as one dangle and either deleted are all parts or nothing. Optionaly deleted dangles are written to error map. Input map must be opened on level 2 for update at least on GV_BUILD_BASE.
Map | input map where have to be deleted | |
type | type of dangles | |
maxlength | maxlength of dangles or -1 for all dangles | |
Err | vector map where deleted dangles are written or NULL | |
msgout | file pointer where messages will be written or NULL |
Definition at line 67 of file dangles.c.
References remove_dangles().
void Vect_remove_dangles | ( | struct Map_info * | Map, | |
int | type, | |||
double | maxlength, | |||
struct Map_info * | Err, | |||
FILE * | msgout | |||
) |
Remove dangles from vector map.
Remove dangles of given type shorter than maxlength from vector map. Line is considered to be a dangle if on at least one end node is no other line of given type(s). If a dangle is formed by more lines, such string of lines is taken as one dangle and either deleted are all parts or nothing. Optionaly deleted dangles are written to error map. Input map must be opened on level 2 for update.
Map | input map where have to be deleted | |
type | type of dangles | |
maxlength | maxlength of dangles or -1 for all dangles | |
Err | vector map where deleted dangles are written or NULL | |
msgout | file pointer where messages will be written or NULL |
Definition at line 43 of file dangles.c.
References remove_dangles().