18 #include <grass/gis.h>
19 #include <grass/Vect.h>
20 #include <grass/glocale.h>
21 #include <grass/dbmi.h>
22 #include <grass/neta.h>
36 int node,
struct line_cats *Cats)
38 static struct line_pnts *Points;
77 for (i = 0; i < point_list->n_values; i++) {
79 point_list->value[i] = node;
105 int i, nlines, nnodes;
107 struct line_cats *Cats;
108 struct line_pnts *Points;
111 struct field_info *Fi;
116 G_fatal_error(_(
"Unable to open database <%s> by driver <%s>"),
117 Fi->database, Fi->driver);
123 for (i = 1; i <= nnodes; i++)
131 for (i = 1; i <= nlines; i++) {
134 if (type == GV_POINT) {
142 node_costs[node] = value * 1000000.0;
167 struct ilist *nodes,
int *nodes_to_features)
169 int nlines, nnodes, i;
173 if (nodes_to_features)
174 for (i = 1; i <= nnodes; i++)
175 nodes_to_features[i] = -1;
177 for (i = 1; i <= nlines; i++)
181 if (type == GV_POINT) {
186 if (nodes_to_features)
187 nodes_to_features[node] = i;
195 if (nodes_to_features)
196 nodes_to_features[node1] = nodes_to_features[node2] = i;
214 char *where,
char *cat,
struct varray **varray)
219 G_fatal_error(_(
"'%s' must be > 0 for '%s'"),
"layer",
"where");
221 G_warning(_(
"'where' and 'cats' parameters were supplied, cat will be ignored"));
224 (In, layer, where, mask_type, 1, *varray) == -1) {
225 G_warning(_(
"Unable to load data from database"));
232 G_fatal_error(_(
"'%s' must be > 0 for '%s'"),
"layer",
"cat");
235 (In, layer, cat, mask_type, 1, *varray) == -1) {
236 G_warning(_(
"Problem loading category values"));