GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Vector library - update topo for nodes (lower level functions) More...
#include <stdlib.h>
#include <math.h>
#include <grass/Vect.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | dig_node_add_line (struct Plus_head *plus, int nodeid, int lineid, 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 106 of file plus_node.c.
References dig_alloc_node(), dig_alloc_nodes(), dig_spidx_add_node(), G_debug(), point::x, and y.
int dig_node_add_line | ( | struct Plus_head * | plus, |
int | nodeid, | ||
int | lineid, | ||
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 alloced to add 'line' to array
[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 42 of file plus_node.c.
References dig_calc_begin_angle(), dig_calc_end_angle(), dig_node_alloc_line(), G_debug(), and main::GV_LINES.
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 202 of file plus_node.c.
References G_debug(), and G_fatal_error().
Referenced by dig_build_area_with_line(), and dig_node_angle_check().
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 150 of file plus_node.c.
References NULL.