24 #include <grass/Vect.h>
25 #include <grass/glocale.h>
28 struct Map_info *,
int,
struct ilist *,
struct ilist *,
42 if (strcmp(str, GV_ON_AND) == 0)
44 else if (strcmp(str, GV_ON_OVERLAP) == 0)
64 int Vect_overlay(
struct Map_info *AMap,
int atype,
struct ilist *AList,
struct ilist *AAList,
65 struct Map_info *BMap,
int btype,
struct ilist *BList,
struct ilist *BAList,
66 int operator,
struct Map_info *OMap)
103 struct ilist *AAList,
struct Map_info *BMap,
int btype,
104 struct ilist *BList,
struct ilist *BAList,
105 struct Map_info *OMap)
107 int i, j, k, node, line, altype, bltype, oltype, area, centr;
108 struct line_pnts *Points;
109 struct line_cats *ACats, *BCats, *OCats;
110 struct ilist *AOList, *BOList;
122 if ((atype &
GV_LINES) || (btype & GV_LINES))
123 G_warning(_(
"Overlay: line/boundary types not supported by AND operator"));
125 if ((atype & GV_AREA) && (btype & GV_AREA))
126 G_warning(_(
"Overlay: area x area types not supported by AND operator"));
131 if ((atype & GV_POINTS) && (btype & GV_POINTS)) {
132 G_debug(3,
"overlay: AND: point x point");
135 if (!(altype & GV_POINTS))
141 G_debug(3,
"overlay: node = %d", node);
150 if (!(bltype & GV_POINTS))
155 for (k = 0; k < ACats->n_cats; k++)
158 for (k = 0; k < BCats->n_cats; k++)
173 if ((atype & GV_POINTS) && (btype & GV_AREA)) {
174 G_debug(3,
"overlay: AND: point x area");
178 if (!(altype & GV_POINTS))
188 for (k = 0; k < ACats->n_cats; k++)
194 for (k = 0; k < BCats->n_cats; k++)
207 if ((btype & GV_POINTS) && (atype & GV_AREA)) {
208 G_debug(3,
"overlay: AND: area x point");
212 if (!(bltype & GV_POINTS))
222 for (k = 0; k < BCats->n_cats; k++)
228 for (k = 0; k < ACats->n_cats; k++)