GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-6fb030f8d8
extend.c File Reference

Vedit library - extend lines (adopted from break.c) More...

#include <math.h>
#include <grass/vedit.h>
Include dependency graph for extend.c:

Go to the source code of this file.


#define TOL   1e-9


int Vedit_extend_lines (struct Map_info *Map, struct ilist *List, int nodes, int parallel, double thresh)
 Extend lines in given threshold. More...
int extend_lines (struct Map_info *Map, int first, int line_from, int line_to, int parallel, double thresh, struct ilist *List UNUSED)

Detailed Description

Vedit library - extend lines (adopted from break.c)

(C) 2017 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.

Huidae Cho <grass4u>

Definition in file extend.c.

Macro Definition Documentation


#define TOL   1e-9

Definition at line 17 of file extend.c.

Function Documentation

◆ extend_lines()

int extend_lines ( struct Map_info Map,
int  first,
int  line_from,
int  line_to,
int  parallel,
double  thresh,
struct ilist *List  UNUSED 

Definition at line 152 of file extend.c.

◆ Vedit_extend_lines()

int Vedit_extend_lines ( struct Map_info Map,
struct ilist List,
int  nodes,
int  parallel,
double  thresh 

Extend lines in given threshold.

1. Extend first line only
\ \
id1 \ -> \
id2 ---------- -----+----
2. Extend both lines
\ \
id1 \ -> \
id2 --- +----
3. Extend first line when both are on the same line
id1 --- --- id2 -> -----+----
4. Connect two parallel lines (parallel=1)
id1 ------ -------
-> /
id2 ------ +-----
5. Don't connect two parallel lines (parallel=0)
id1 ------ ------
id2 ------ ------
double t
Definition: r_raster.c:39
Mappointer to Map_info
Listlist of selected lines
nodes1 for start node, 2 for end node, other for both
parallelconnect parallel lines
threshthreshold value
number of modified lines

Definition at line 68 of file extend.c.

References ilist::n_values, and Vect_new_list().