GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Vector library - spatial index (lower level functions) More...
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/Vect.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | dig_spidx_init (struct Plus_head *Plus) |
Initit spatial index (nodes, lines, areas, isles) More... | |
void | dig_spidx_free_nodes (struct Plus_head *Plus) |
Free spatial index for nodes. More... | |
void | dig_spidx_free_lines (struct Plus_head *Plus) |
Free spatial index for lines. More... | |
void | dig_spidx_free_areas (struct Plus_head *Plus) |
Free spatial index for areas. More... | |
void | dig_spidx_free_isles (struct Plus_head *Plus) |
Free spatial index for isles. More... | |
void | dig_spidx_free (struct Plus_head *Plus) |
Free spatial index (nodes, lines, areas, isles) More... | |
int | dig_spidx_add_node (struct Plus_head *Plus, int node, double x, double y, double z) |
Add new node to spatial index. More... | |
int | dig_spidx_add_line (struct Plus_head *Plus, int line, BOUND_BOX *box) |
Add new line to spatial index. More... | |
int | dig_spidx_add_area (struct Plus_head *Plus, int area, BOUND_BOX *box) |
Add new area to spatial index. More... | |
int | dig_spidx_add_isle (struct Plus_head *Plus, int isle, BOUND_BOX *box) |
Add new island to spatial index. More... | |
int | dig_spidx_del_node (struct Plus_head *Plus, int node) |
Delete node from spatial index. More... | |
int | dig_spidx_del_line (struct Plus_head *Plus, int line) |
Delete line from spatial index. More... | |
int | dig_spidx_del_area (struct Plus_head *Plus, int area) |
Delete area from spatial index. More... | |
int | dig_spidx_del_isle (struct Plus_head *Plus, int isle) |
Delete isle from spatial index. More... | |
int | dig_select_nodes (struct Plus_head *Plus, BOUND_BOX *box, struct ilist *list) |
Select nodes by bbox. More... | |
int | dig_find_node (struct Plus_head *Plus, double x, double y, double z) |
Find one node by coordinates. More... | |
int | dig_select_lines (struct Plus_head *Plus, BOUND_BOX *box, struct ilist *list) |
Select lines by box. More... | |
int | dig_select_areas (struct Plus_head *Plus, BOUND_BOX *box, struct ilist *list) |
Select areas by box. More... | |
int | dig_select_isles (struct Plus_head *Plus, BOUND_BOX *box, struct ilist *list) |
Select isles by box. More... | |
Vector library - spatial index (lower level functions)
Lower level functions for reading/writing/manipulating vectors.
(C) 2001 by the GRASS Development Team
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 spindex.c.
int dig_find_node | ( | struct Plus_head * | Plus, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Find one node by coordinates.
Plus | pointer to Plus_head structure |
x,y,z | coordinates |
Definition at line 420 of file spindex.c.
References Rect::boundary, dig_init_list(), G_debug(), RTreeSearch(), and y.
int dig_select_areas | ( | struct Plus_head * | Plus, |
BOUND_BOX * | box, | ||
struct ilist * | list | ||
) |
Select areas by box.
Plus | pointer to Plus_head structure |
box | bounding box |
list | list of selected lines |
Definition at line 482 of file spindex.c.
References Rect::boundary, G_debug(), and RTreeSearch().
Referenced by Vect_select_areas_by_box().
int dig_select_isles | ( | struct Plus_head * | Plus, |
BOUND_BOX * | box, | ||
struct ilist * | list | ||
) |
Select isles by box.
Plus | pointer to Plus_head structure |
box | bounding box |
list | list of selected lines |
Definition at line 511 of file spindex.c.
References Rect::boundary, G_debug(), and RTreeSearch().
Referenced by Vect_select_isles_by_box().
int dig_select_lines | ( | struct Plus_head * | Plus, |
BOUND_BOX * | box, | ||
struct ilist * | list | ||
) |
Select lines by box.
Plus | pointer to Plus_head structure |
box | bounding box |
list | list of selected lines |
Definition at line 453 of file spindex.c.
References Rect::boundary, G_debug(), and RTreeSearch().
Referenced by Vect_select_lines_by_box().
int dig_select_nodes | ( | struct Plus_head * | Plus, |
BOUND_BOX * | box, | ||
struct ilist * | list | ||
) |
Select nodes by bbox.
Plus | pointer to Plus_head structure |
box | bounding box |
list | list of selected lines |
Definition at line 385 of file spindex.c.
References Rect::boundary, G_debug(), and RTreeSearch().
Referenced by Vect_select_nodes_by_box().
Add new area to spatial index.
Plus | pointer to Plus_head structure |
area | area id |
box | bounding box |
Definition at line 174 of file spindex.c.
References Rect::boundary, G_debug(), and RTreeInsertRect().
Referenced by dig_add_area(), and Vect_build_sidx_from_topo().
Add new island to spatial index.
Plus | pointer to Plus_head structure |
isle | isle id |
box | bounding box |
Definition at line 201 of file spindex.c.
References Rect::boundary, G_debug(), and RTreeInsertRect().
Referenced by dig_add_isle(), and Vect_build_sidx_from_topo().
Add new line to spatial index.
Plus | pointer to Plus_head structure |
line | line id |
box | bounding box |
Definition at line 148 of file spindex.c.
References Rect::boundary, G_debug(), and RTreeInsertRect().
Referenced by Vect_build_sidx_from_topo().
Add new node to spatial index.
Plus | pointer to Plus_head structure |
node | node id |
x,y,z | node coordinates |
Definition at line 120 of file spindex.c.
References Rect::boundary, G_debug(), RTreeInsertRect(), and y.
Referenced by dig_add_node(), and Vect_build_sidx_from_topo().
Delete area from spatial index.
G_fatal_error() called on error.
Plus | pointer to Plus_head structure |
area | area id |
Definition at line 303 of file spindex.c.
References Rect::boundary, G_debug(), G_fatal_error(), NULL, and RTreeDeleteRect().
Referenced by dig_del_area().
Delete isle from spatial index.
G_fatal_error() called on error.
Plus | pointer to Plus_head structure |
isle | isle id |
Definition at line 342 of file spindex.c.
References Rect::boundary, G_debug(), G_fatal_error(), and RTreeDeleteRect().
Referenced by dig_del_isle().
Delete line from spatial index.
G_fatal_error() called on error.
Plus | pointer to Plus_head structure |
line | line id |
Definition at line 263 of file spindex.c.
References Rect::boundary, G_debug(), G_fatal_error(), and RTreeDeleteRect().
Referenced by dig_del_line().
Delete node from spatial index.
G_fatal_error() called on error.
Plus | pointer to Plus_head structure |
node | node id |
Definition at line 228 of file spindex.c.
References Rect::boundary, G_debug(), G_fatal_error(), and RTreeDeleteRect().
Referenced by dig_del_line().
void dig_spidx_free | ( | struct Plus_head * | Plus | ) |
Free spatial index (nodes, lines, areas, isles)
Plus | pointer to Plus_head structure |
Definition at line 101 of file spindex.c.
References dig_spidx_free_areas(), dig_spidx_free_isles(), dig_spidx_free_lines(), and dig_spidx_free_nodes().
Referenced by Vect__open_old(), and Vect_close().
void dig_spidx_free_areas | ( | struct Plus_head * | Plus | ) |
Free spatial index for areas.
Plus | pointer to Plus_head structure |
Definition at line 79 of file spindex.c.
References RTreeDestroyNode(), and RTreeNewIndex().
Referenced by dig_spidx_free(), and Vect_build_nat().
void dig_spidx_free_isles | ( | struct Plus_head * | Plus | ) |
Free spatial index for isles.
Plus | pointer to Plus_head structure |
Definition at line 90 of file spindex.c.
References RTreeDestroyNode(), and RTreeNewIndex().
Referenced by dig_spidx_free(), and Vect_build_nat().
void dig_spidx_free_lines | ( | struct Plus_head * | Plus | ) |
Free spatial index for lines.
Plus | pointer to Plus_head structure |
Definition at line 68 of file spindex.c.
References RTreeDestroyNode(), and RTreeNewIndex().
Referenced by dig_spidx_free(), and Vect_build_nat().
void dig_spidx_free_nodes | ( | struct Plus_head * | Plus | ) |
Free spatial index for nodes.
Plus | pointer to Plus_head structure |
Definition at line 57 of file spindex.c.
References RTreeDestroyNode(), and RTreeNewIndex().
Referenced by dig_spidx_free(), and Vect_build_nat().
int dig_spidx_init | ( | struct Plus_head * | Plus | ) |
Initit spatial index (nodes, lines, areas, isles)
Plus | pointer to Plus_head structure |
Definition at line 31 of file spindex.c.
References G_debug(), and RTreeNewIndex().
Referenced by dig_init_plus(), dig_read_spidx(), Vect_build_sidx_from_topo(), and Vect_open_spatial_index().