GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Vector library - Clean vector map (break lines) More...
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/Vect.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
void | Vect_break_lines (struct Map_info *Map, int type, struct Map_info *Err) |
Break lines in vector map at each intersection. More... | |
int | Vect_break_lines_list (struct Map_info *Map, struct ilist *List_break, struct ilist *List_ref, int type, struct Map_info *Err) |
Break selected lines in vector map at each intersection. More... | |
Vector library - Clean vector map (break lines)
(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.
Definition in file break_lines.c.
void Vect_break_lines | ( | struct Map_info * | Map, |
int | type, | ||
struct Map_info * | Err | ||
) |
Break lines in vector map at each intersection.
For details see Vect_break_lines_list().
Map | input vector map | |
type | feature type | |
[out] | Err | vector map where points at intersections will be written or NULL |
Definition at line 36 of file break_lines.c.
References NULL, and Vect_break_lines_list().
int Vect_break_lines_list | ( | struct Map_info * | Map, |
struct ilist * | List_break, | ||
struct ilist * | List_ref, | ||
int | type, | ||
struct Map_info * | Err | ||
) |
Break selected lines in vector map at each intersection.
Breaks selected lines specified by type in vector map. Points at intersections may be optionally written to error map. Input vector map must be opened on level 2 for update at least on GV_BUILD_BASE.
The function also breaks lines forming collapsed loop, for example 0,0;1,0;0,0 is broken at 1,0.
If reference lines are given (List_ref) break only lines which intersect reference lines.
Map | input vector map | |
List_break | list of lines (NULL for all lines in vector map) | |
List_ref | list of reference lines or NULL | |
type | feature type | |
[out] | Err | vector map where points at intersections will be written or NULL |
Definition at line 66 of file break_lines.c.
References G_debug(), G_free(), G_percent(), G_verbose_message(), l, NULL, Vect_append_point(), Vect_delete_line(), Vect_destroy_line_struct(), Vect_destroy_list(), Vect_get_line_box(), Vect_get_line_nodes(), Vect_get_node_coor(), Vect_get_num_lines(), Vect_is_3d(), Vect_line_alive(), Vect_line_intersection(), Vect_line_prune(), Vect_list_append(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_new_list(), Vect_read_line(), Vect_reset_line(), Vect_select_lines_by_box(), Vect_val_in_list(), Vect_write_line(), and y.
Referenced by wxdigit.IVDigit::BreakLine(), wxdigit.IVDigit::OpenBackgroundMap(), and Vect_break_lines().