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));
129 wind.west, PORT_DOUBLE_MAX, -PORT_DOUBLE_MAX);
145 G_warning(_(
"Unable to read vector map <%s>"),
155 if ((ltype & GV_POINTS)) {
157 gpt->p3[
X] = Points->x[0];
158 gpt->p3[
Y] = Points->y[0];
163 gpt->p3[Z] = Points->z[0];
170 if (Cats->n_cats > 0) {
172 gpt->fattr = Cats->field[0];
174 gpt->highlight_color = gpt->highlight_size =
175 gpt->highlight_marker =
FALSE;
182 gpt->iattr = gpt->fattr;
185 G_debug(3,
"loading vector point %d %f %f -- %d",
186 np, Points->x[0], Points->y[0], Cats->n_cats);
188 gpt->next = (geopoint *) G_malloc(
sizeof(geopoint));
206 G_warning(_(
"No points from vector map <%s> fall within current region"),
211 G_message(_(
"Vector map <%s> loaded (%d points)"),