18 #include <grass/gis.h>
19 #include <grass/Vect.h>
20 #include <grass/glocale.h>
31 return (map->plus.n_nodes);
47 num += map->plus.n_plines;
49 num += map->plus.n_llines;
50 if (type & GV_BOUNDARY)
51 num += map->plus.n_blines;
52 if (type & GV_CENTROID)
53 num += map->plus.n_clines;
55 num += map->plus.n_flines;
57 num += map->plus.n_klines;
71 return (map->plus.n_lines);
83 return (map->plus.n_areas);
95 return (map->plus.n_klines);
108 return (map->plus.n_flines);
121 return (map->plus.n_volumes);
134 return (map->plus.n_isles);
147 return (map->plus.n_holes);
160 return (map->dblnk->n_fields);
172 return (map->plus.n_uplines);
185 return (map->plus.uplines[idx]);
197 return (map->plus.n_upnodes);
210 return (map->plus.upnodes[idx]);
228 Node = map->plus.Node[
num];
251 G_fatal_error(_(
"Vector map <%s> is not open on level >= 2"),
255 *n1 = Map->plus.Line[line]->N1;
258 *n2 = Map->plus.Line[line]->N2;
276 G_fatal_error(_(
"Vector map <%s> is not open on level >= 2"),
280 *left = Map->plus.Line[line]->left;
283 *right = Map->plus.Line[line]->right;
300 G_fatal_error(_(
"Vector map <%s> is not open on level >= 2"),
303 return (Map->plus.Node[node]->n_lines);
319 G_fatal_error(_(
"Vector map <%s> is not open on level >= 2"),
322 return (Map->plus.Node[node]->lines[line]);
337 G_fatal_error(_(
"Vector map <%s> is not open on level >= 2"),
340 return (Map->plus.Node[node]->angles[line]);
356 G_fatal_error(_(
"Vector map <%s> is not open on level >= 2"),
359 return (Map->plus.Line[centroid]->left);
int Vect_get_node_line(struct Map_info *Map, int node, int line)
Get line id for node line index.
int Vect_get_line_nodes(struct Map_info *Map, int line, int *n1, int *n2)
Get line nodes.
int Vect_get_line_areas(struct Map_info *Map, int line, int *left, int *right)
Get area/isle ids on the left and right.
int Vect_get_updated_node(struct Map_info *map, int idx)
Get updated node by index.
int Vect_get_num_updated_lines(struct Map_info *map)
Get number of updated features.
int Vect_get_num_areas(struct Map_info *map)
Get number of areas in vector map.
int Vect_get_num_holes(struct Map_info *map)
Fetch number of holes in vector map.
int Vect_get_num_dblinks(struct Map_info *map)
Get number of defined dblinks.
int Vect_get_num_primitives(struct Map_info *map, int type)
Get number of primitives in vector map.
int Vect_get_num_kernels(struct Map_info *map)
Fetch number of kernels in vector map.
int Vect_get_updated_line(struct Map_info *map, int idx)
Get updated line by index.
int Vect_get_num_updated_nodes(struct Map_info *map)
Get number of updated nodes.
int Vect_get_num_faces(struct Map_info *map)
Get number of faces in vector map.
int Vect_get_num_lines(struct Map_info *map)
Fetch number of features (points, lines, boundaries, centroids) in vector map.
int Vect_get_num_volumes(struct Map_info *map)
Fetch number of volumes in vector map.
float Vect_get_node_line_angle(struct Map_info *Map, int node, int line)
Angle of segment of the line connected to the node.
int Vect_get_centroid_area(struct Map_info *Map, int centroid)
Get area id the centroid is within.
int Vect_get_node_coor(struct Map_info *map, int num, double *x, double *y, double *z)
Get node coordinates.
int Vect_get_num_nodes(struct Map_info *map)
Get number of nodes in vector map.
int G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.
int Vect_get_num_islands(struct Map_info *map)
Get number of islands in vector map.
int Vect_get_node_n_lines(struct Map_info *Map, int node)
Get number of lines for node.