GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <math.h>
#include <grass/gis.h>
#include <grass/Vect.h>
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, 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... | |
#define HUGE_VAL 9999999999999.0 |
Definition at line 23 of file vector/Vlib/find.c.
Referenced by Vect_find_line_list(), and Vect_find_node().
int Vect_find_area | ( | struct Map_info * | Map, |
double | x, | ||
double | y | ||
) |
Find the nearest area.
[in] | Map | vector map |
[in] | x,y | point coordinates |
Definition at line 248 of file vector/Vlib/find.c.
References tools::box, first, G_debug(), Vect_new_list(), Vect_point_in_area(), Vect_select_areas_by_box(), and y.
Referenced by Vect_attach_centroids(), Vect_build_nat(), Vect_overlay_and(), Vect_select_areas_by_polygon(), and Vect_tin_get_z().
int Vect_find_island | ( | struct Map_info * | Map, |
double | x, | ||
double | y | ||
) |
Find the nearest island.
[in] | Map | vector map |
[in] | x,y | points coordinates |
Definition at line 295 of file vector/Vlib/find.c.
References tools::box, first, G_area_of_polygon(), G_begin_polygon_area_calculations(), G_debug(), tools::size, Vect_get_isle_points(), Vect_new_line_struct(), Vect_new_list(), Vect_point_in_island(), Vect_select_isles_by_box(), and y.
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.
[in] | map | vector map |
[in] | ux,uy,uz | points coordinates |
[in] | 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 |
[in] | maxdist | max distance from the line |
[in] | with_z | 3D (WITH_Z, WITHOUT_Z) |
[in] | 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 110 of file vector/Vlib/find.c.
References NULL, Vect_destroy_list(), Vect_find_line_list(), Vect_list_append(), and Vect_new_list().
Referenced by Vect_net_nearest_nodes(), and Vedit_snap_point().
int Vect_find_line_list | ( | struct Map_info * | map, |
double | ux, | ||
double | uy, | ||
double | uz, | ||
int | type, | ||
double | maxdist, | ||
int | with_z, | ||
struct ilist * | exclude, | ||
struct ilist * | found | ||
) |
Find the nearest line(s).
[in] | map | vector map |
[in] | ux,uy,uz | points coordinates |
[in] | 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 |
[in] | maxdist | max distance from the line |
[in] | with_z | 3D (WITH_Z, WITHOUT_Z) |
[in] | exclude | list of lines which should be excluded from selection |
[in] | found | list of found lines (or NULL) |
Definition at line 145 of file vector/Vlib/find.c.
References tools::box, G_debug(), HUGE_VAL, NULL, Vect_destroy_list(), Vect_line_distance(), Vect_list_append(), Vect_new_line_struct(), Vect_new_list(), Vect_read_line(), Vect_reset_list(), Vect_select_lines_by_box(), and Vect_val_in_list().
Referenced by wxdisplay.DisplayDriver::SelectLineByPoint(), Vect_find_line(), and Vedit_connect_lines().
int Vect_find_node | ( | struct Map_info * | Map, |
double | ux, | ||
double | uy, | ||
double | uz, | ||
double | maxdist, | ||
int | with_z | ||
) |
Find the nearest node.
[in] | Map | vector map |
[in] | ux,uy,uz | point coordinates |
[in] | maxdist | max distance from the line |
[in] | with_z | 3D (WITH_Z, WITHOUT_Z) |
Definition at line 38 of file vector/Vlib/find.c.
References tools::box, G_debug(), HUGE_VAL, Vect_get_node_coor(), Vect_new_list(), Vect_points_distance(), Vect_select_nodes_by_box(), and y.
Referenced by Vect_overlay_and().