#include <math.h>
#include <grass/gis.h>
#include <grass/Vect.h>
Go to the source code of this file.
Defines | |
#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. | |
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. | |
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). | |
int | Vect_find_area (struct Map_info *Map, double x, double y) |
Find the nearest area. | |
int | Vect_find_island (struct Map_info *Map, double x, double y) |
Find the nearest island. |
Higher level functions for reading/writing/manipulating vectors.
(C) 2001-2007 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 find.c.
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 |
0 if not found
Definition at line 248 of file find.c.
References Vect_new_list(), Vect_point_in_area(), and Vect_select_areas_by_box().
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 |
0 if not found
Definition at line 295 of file find.c.
References Vect_get_isle_points(), Vect_new_line_struct(), Vect_new_list(), Vect_point_in_island(), and Vect_select_isles_by_box().
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. |
0 if not found
Definition at line 110 of file find.c.
References 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) |
0 if not found
Definition at line 145 of file find.c.
References HUGE_VAL, 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 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) |
0 if not found
Definition at line 38 of file find.c.
References HUGE_VAL, Vect_get_node_coor(), Vect_new_list(), Vect_points_distance(), and Vect_select_nodes_by_box().
Referenced by Vect_overlay_and().