GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
|
Vector library - update topo for nodes (lower level functions) More...
Go to the source code of this file.
Functions | |
int | dig_node_add_line (struct Plus_head *plus, int nodeid, int lineid, const struct line_pnts *points, int type) |
Add line info to node. More... | |
int | dig_add_node (struct Plus_head *plus, double x, double y, double z) |
Add new node to plus structure. More... | |
int | dig_which_node (struct Plus_head *plus, double x, double y, double thresh) |
Return actual index into node arrays of the first set of matching coordinates. More... | |
float | dig_node_line_angle (struct Plus_head *plus, int nodeid, int lineid) |
Return line angle. More... | |
Vector library - update topo for nodes (lower level functions)
Lower level functions for reading/writing/manipulating vectors.
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file plus_node.c.
int dig_add_node | ( | struct Plus_head * | plus, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Add new node to plus structure.
[in] | plus | pointer to Plus_head structure |
[in] | x,y,z | coordinates |
Definition at line 101 of file plus_node.c.
References Plus_head::alloc_nodes, dig_alloc_node(), dig_alloc_nodes(), dig_spidx_add_node(), G_debug(), Plus_head::n_nodes, Plus_head::Node, P_node::x, x, P_node::y, and P_node::z.
int dig_node_add_line | ( | struct Plus_head * | plus, |
int | nodeid, | ||
int | lineid, | ||
const struct line_pnts * | points, | ||
int | type | ||
) |
Add line info to node.
Line will be negative if END node
'node' must of course already exist space will be allocated to add 'line' to array
Lines are sorted in increasing angle order and degenerated lines are set to -9 (ignored).
[in] | plus | pointer to Plus_head structure |
[in] | nodeid | node id |
[in] | lineid | line id |
[in] | points | line geometry |
[in] | type | line type |
Definition at line 44 of file plus_node.c.
float dig_node_line_angle | ( | struct Plus_head * | plus, |
int | nodeid, | ||
int | lineid | ||
) |
Return line angle.
Lines is specified by line id in topology, NOT by order number. Negative id if looking for line end point.
[in] | plus | pointer to Plus_head structure |
[in] | nodeid | node id |
[in] | lineid | line id |
Definition at line 198 of file plus_node.c.
References _, P_node::angles, G_debug(), G_fatal_error(), P_node::lines, P_node::n_lines, and Plus_head::Node.
int dig_which_node | ( | struct Plus_head * | plus, |
double | x, | ||
double | y, | ||
double | thresh | ||
) |
Return actual index into node arrays of the first set of matching coordinates.
[in] | plus | pointer to Plus_head structure |
[in] | x,y | coordinates |
[in] | thresh | threshold value |
Definition at line 146 of file plus_node.c.
References Plus_head::n_nodes, Plus_head::Node, NULL, P_node::x, x, and P_node::y.