21 #include <grass/gis.h>
22 #include <grass/site.h>
23 #include <grass/Vect.h>
24 #include <grass/glocale.h>
25 #include <grass/gstypes.h>
54 G_warning(_(
"Raster map <%s> not found"), grassname);
60 for (tp = gp; tp; tp = tp->next) {
65 color = (r & 0xff) | ((g & 0xff) << 8) | ((b & 0xff) << 16);
94 static struct line_pnts *Points =
NULL;
95 static struct line_cats *Cats =
NULL;
96 geopoint *top, *gpt, *prev;
98 struct Cell_head wind;
99 RASTER_MAP_TYPE rtype;
105 *has_z = *has_att = 0;
109 G_warning(_(
"Vector map <%s> not found"), grassname);
122 top = gpt = (geopoint *) G_malloc(
sizeof(geopoint));
143 G_warning(_(
"Unable to read vector map <%s>"),
153 if ((ltype & GV_POINTS)) {
155 gpt->p3[
X] = Points->x[0];
156 gpt->p3[
Y] = Points->y[0];
161 gpt->p3[Z] = Points->z[0];
168 if (Cats->n_cats > 0) {
170 gpt->fattr = Cats->field[0];
172 gpt->highlight_color = gpt->highlight_size =
173 gpt->highlight_marker =
FALSE;
180 gpt->iattr = gpt->fattr;
183 G_debug(3,
"loading vector point %d %f %f -- %d",
184 np, Points->x[0], Points->y[0], Cats->n_cats);
186 gpt->next = (geopoint *) G_malloc(
sizeof(geopoint));
204 G_warning(_(
"No points from vector map <%s> fall within current region"),
209 G_message(_(
"Vector map <%s> loaded (%d points)"),