GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-ee9fa48798
merge_lines.c File Reference

Vector library - clean geometry (merge lines/boundaries) More...

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

Go to the source code of this file.


int Vect_merge_lines (struct Map_info *Map, int type, int *new_lines, struct Map_info *Err)
 Merge lines or boundaries in vector map. More...

Detailed Description

Vector library - clean geometry (merge lines/boundaries)

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.

Markus Metz

Definition in file merge_lines.c.

Function Documentation

◆ Vect_merge_lines()

int Vect_merge_lines ( struct Map_info Map,
int  type,
int *  new_lines,
struct Map_info Err 

Merge lines or boundaries in vector map.

Merges lines specified by type in vector map. Useful for generalization and smoothing. Adjacent boundaries are merged as long as topology is maintained. Adjacent lines are merged as long as there are exactly two different lines with identical categories connected at a given node. Zero-length lines need to be removed first. GV_BUILD_BASE as topo build level is sufficient, areas need not be built.

Mapinput vector map
typefeature type
[out]Errvector map where merged lines/boundaries will be written or NULL
new_linespointer to where number of new lines/boundaries is stored or NULL
number of merged lines/boundaries

Definition at line 79 of file merge_lines.c.