GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
overlay.c File Reference

Vector library - overlays. More...

#include <string.h>
#include <grass/Vect.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 *AMap, int atype, struct ilist *AList, struct ilist *AAList, struct Map_info *BMap, int btype, struct ilist *BList, struct ilist *BAList, struct Map_info *OMap)
 Overlay 2 vector maps with AND. More...
 
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...
 

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

Author
Radim Blazek
Date
2001

Definition in file overlay.c.

Function Documentation

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
AListunused ?
AAListunused ?
BMapvector map B
BListunused ?
BAListunused ?
operatoroperator code
OMapoutput vector map
Returns
0 on success

Definition at line 64 of file overlay.c.

References G_fatal_error(), and Vect_overlay_and().

int Vect_overlay_and ( struct Map_info *  AMap,
int  atype,
struct ilist *  AList,
struct ilist *  AAList,
struct Map_info *  BMap,
int  btype,
struct ilist *  BList,
struct ilist *  BAList,
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 ?
operatoroperator code
Returns
1 on success
0 on error

Definition at line 102 of file overlay.c.

References G_debug(), G_warning(), main::GV_LINES, NULL, Vect_cat_set(), Vect_find_area(), Vect_find_node(), Vect_get_area_centroid(), Vect_get_node_line(), Vect_get_node_n_lines(), Vect_get_num_lines(), Vect_list_append(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_new_list(), Vect_read_line(), Vect_reset_cats(), Vect_val_in_list(), and Vect_write_line().

Referenced by Vect_overlay().

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 39 of file overlay.c.