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

Vector library - overlays. More...

#include <string.h>
#include <grass/vector.h>
#include <grass/glocale.h>
Include dependency graph for overlay.c:

Go to the source code of this file.

Functions

int Vect_overlay_and (struct Map_info *, int, struct ilist *, struct ilist *, struct Map_info *, int, struct ilist *, struct ilist *, struct Map_info *)
 
int Vect_overlay_str_to_operator (const char *str)
 Get operator code from string. More...
 
int Vect_overlay (struct Map_info *AMap, int atype, struct ilist *AList, struct ilist *AAList, struct Map_info *BMap, int btype, struct ilist *BList, struct ilist *BAList, int operator, struct Map_info *OMap)
 Overlay 2 vector maps and create new one. More...
 
int Vect_overlay_and (struct Map_info *AMap, int atype, struct ilist *AList UNUSED, struct ilist *AAList UNUSED, struct Map_info *BMap, int btype, struct ilist *BList UNUSED, struct ilist *BAList UNUSED, struct Map_info *OMap)
 Overlay 2 vector maps with AND. More...
 

Detailed Description

Vector library - overlays.

Higher level functions for reading/writing/manipulating vectors.

This is file is just example and starting point for writing overlay functions!!!

(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.

Author
Radim Blazek

Definition in file overlay.c.

Function Documentation

◆ Vect_overlay()

int Vect_overlay ( struct Map_info AMap,
int  atype,
struct ilist AList,
struct ilist AAList,
struct Map_info BMap,
int  btype,
struct ilist BList,
struct ilist BAList,
int  operator,
struct Map_info OMap 
)

Overlay 2 vector maps and create new one.

Parameters
AMapvector map A
atypefeature type for A
AListunused ?
AAListunused ?
BMapvector map B
btypefeature type for B
BListunused ?
BAListunused ?
operatoroperator code
[out]OMapoutput vector map
Returns
0 on success

Definition at line 62 of file overlay.c.

References _, G_fatal_error(), GV_O_AND, and Vect_overlay_and().

◆ Vect_overlay_and() [1/2]

int Vect_overlay_and ( struct Map_info ,
int  ,
struct ilist ,
struct ilist ,
struct Map_info ,
int  ,
struct ilist ,
struct ilist ,
struct Map_info  
)

Referenced by Vect_overlay().

◆ Vect_overlay_and() [2/2]

int Vect_overlay_and ( struct Map_info AMap,
int  atype,
struct ilist *AList  UNUSED,
struct ilist *AAList  UNUSED,
struct Map_info BMap,
int  btype,
struct ilist *BList  UNUSED,
struct ilist *BAList  UNUSED,
struct Map_info OMap 
)

Overlay 2 vector maps with AND.

AND supports:point line area point + - + line - - - area + - -

Parameters
AMapvector map A
atypefeature type for A
AListunused ?
AAListunused ?
BMapvector map B
btypefeature type for B
BListunused ?
BAListunused ?
OMapoutput vector map
Returns
1 on success
0 on error

Definition at line 101 of file overlay.c.

◆ Vect_overlay_str_to_operator()

int Vect_overlay_str_to_operator ( const char *  str)

Get operator code from string.

Parameters
stroperator code string
Returns
operator code
-1 on error

Definition at line 35 of file overlay.c.

References GV_O_AND, GV_O_OVERLAP, GV_ON_AND, and GV_ON_OVERLAP.