GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-d6dec75dd4
|
Vector library - Find nearest vector feature. More...
Go to the source code of this file.
Macros | |
#define | HUGE_VAL 9999999999999.0 |
Functions | |
int | Vect_find_node (struct Map_info *Map, double ux, double uy, double uz, double maxdist, int with_z) |
Find the nearest node. More... | |
int | Vect_find_line (struct Map_info *map, double ux, double uy, double uz, int type, double maxdist, int with_z, int exclude) |
Find the nearest line. More... | |
int | Vect_find_line_list (struct Map_info *map, double ux, double uy, double uz, int type, double maxdist, int with_z, const struct ilist *exclude, struct ilist *found) |
Find the nearest line(s). More... | |
int | Vect_find_area (struct Map_info *Map, double x, double y) |
Find the nearest area. More... | |
int | Vect_find_island (struct Map_info *Map, double x, double y) |
Find the nearest island. More... | |
Vector library - Find nearest vector feature.
Higher level functions for reading/writing/manipulating vectors.
(C) 2001-2009 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 vector/Vlib/find.c.
#define HUGE_VAL 9999999999999.0 |
Definition at line 23 of file vector/Vlib/find.c.
int Vect_find_area | ( | struct Map_info * | Map, |
double | x, | ||
double | y | ||
) |
Find the nearest area.
Map | vector map |
x,y | point coordinates |
Definition at line 258 of file vector/Vlib/find.c.
References bound_box::B, boxlist::box, bound_box::E, G_debug(), G_malloc, G_realloc, boxlist::id, bound_box::N, boxlist::n_values, NULL, Map_info::plus, PORT_DOUBLE_MAX, bound_box::S, bound_box::T, Vect_new_boxlist(), Vect_select_areas_by_box(), bound_box::W, and x.
int Vect_find_island | ( | struct Map_info * | Map, |
double | x, | ||
double | y | ||
) |
Find the nearest island.
Map | vector map |
x,y | points coordinates |
Definition at line 362 of file vector/Vlib/find.c.
int Vect_find_line | ( | struct Map_info * | map, |
double | ux, | ||
double | uy, | ||
double | uz, | ||
int | type, | ||
double | maxdist, | ||
int | with_z, | ||
int | exclude | ||
) |
Find the nearest line.
map | vector map |
ux,uy,uz | points coordinates |
type | feature type (GV_LINE, GV_POINT, GV_BOUNDARY or GV_CENTROID) if only want to search certain types of lines or -1 if search all lines |
maxdist | max distance from the line |
with_z | 3D (WITH_Z, WITHOUT_Z) |
exclude | if > 0 number of line which should be excluded from selection. May be useful if we need line nearest to other one. |
Definition at line 126 of file vector/Vlib/find.c.
int Vect_find_line_list | ( | struct Map_info * | map, |
double | ux, | ||
double | uy, | ||
double | uz, | ||
int | type, | ||
double | maxdist, | ||
int | with_z, | ||
const struct ilist * | exclude, | ||
struct ilist * | found | ||
) |
Find the nearest line(s).
map | vector map |
ux,uy,uz | points coordinates |
type | feature type (GV_LINE, GV_POINT, GV_BOUNDARY or GV_CENTROID) if only want to search certain types of lines or -1 if search all lines |
maxdist | max distance from the line |
with_z | 3D (WITH_Z, WITHOUT_Z) |
exclude | list of lines which should be excluded from selection |
found | list of found lines (or NULL) |
Definition at line 159 of file vector/Vlib/find.c.
int Vect_find_node | ( | struct Map_info * | Map, |
double | ux, | ||
double | uy, | ||
double | uz, | ||
double | maxdist, | ||
int | with_z | ||
) |
Find the nearest node.
Map | vector map |
ux,uy,uz | point coordinates |
maxdist | max distance from the line |
with_z | 3D (WITH_Z, WITHOUT_Z) |
Definition at line 56 of file vector/Vlib/find.c.
References bound_box::B, bound_box::E, G_debug(), HUGE_VAL, bound_box::N, PORT_DOUBLE_MAX, bound_box::S, bound_box::T, ilist::value, Vect_get_node_coor(), Vect_new_list(), Vect_points_distance(), Vect_select_nodes_by_box(), bound_box::W, and x.