GRASS Programmer's Manual 6.4.1(2011)
Vlib/select.c File Reference
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/Vect.h>
Include dependency graph for Vlib/select.c:

Go to the source code of this file.

Functions

int Vect_select_lines_by_box (struct Map_info *Map, BOUND_BOX *Box, int type, struct ilist *list)
 Select lines by box.
int Vect_select_areas_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
 Select areas by box.
int Vect_select_isles_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
 Select isles by box.
int Vect_select_nodes_by_box (struct Map_info *Map, BOUND_BOX *Box, struct ilist *list)
 Select nodes by box.
int Vect_select_lines_by_polygon (struct Map_info *Map, struct line_pnts *Polygon, int nisles, struct line_pnts **Isles, int type, struct ilist *List)
 Select lines by Polygon with optional isles.
int Vect_select_areas_by_polygon (struct Map_info *Map, struct line_pnts *Polygon, int nisles, struct line_pnts **Isles, struct ilist *List)
 Select areas by Polygon with optional isles.

Function Documentation

int Vect_select_areas_by_box ( struct Map_info *  Map,
BOUND_BOX *  Box,
struct ilist *  list 
)

Select areas by box.

Select areas whose boxes overlap specified box!!! It means that selected area may or may not overlap the box.

Parameters:
Mapvector map
Boxbounding box
[out]outputlist, must be initialized
Returns:
number of areas

Definition at line 92 of file Vlib/select.c.

References dig_select_areas(), and Vect_build_sidx_from_topo().

Referenced by Vect_find_area(), and Vect_isle_find_area().

int Vect_select_areas_by_polygon ( struct Map_info *  Map,
struct line_pnts *  Polygon,
int  nisles,
struct line_pnts **  Isles,
struct ilist *  List 
)

Select areas by Polygon with optional isles.

Polygons should be closed, i.e. first and last points must be identical.

Warning : values in list may be duplicate!

Parameters:
Mapvector map
Polygonouter ring
nislesnumber of islands or 0
Islesarray of islands or NULL
[out]listoutput list, must be initialised
Returns:
number of areas

Definition at line 296 of file Vlib/select.c.

References dig_list_add(), Vect_find_area(), Vect_get_isle_area(), Vect_get_line_areas(), Vect_new_list(), and Vect_select_lines_by_polygon().

int Vect_select_isles_by_box ( struct Map_info *  Map,
BOUND_BOX *  Box,
struct ilist *  list 
)

Select isles by box.

Select isles whose boxes overlap specified box!!! It means that selected isle may or may not overlap the box.

Parameters:
Mapvector map
Boxbounding box
[out]listoutput list, must be initialized
Returns:
number of isles

Definition at line 131 of file Vlib/select.c.

References dig_select_isles(), and Vect_build_sidx_from_topo().

Referenced by Vect_attach_isles(), and Vect_find_island().

int Vect_select_lines_by_box ( struct Map_info *  Map,
BOUND_BOX *  Box,
int  type,
struct ilist *  list 
)

Select lines by box.

Select lines whose boxes overlap specified box!!! It means that selected line may or may not overlap the box.

Parameters:
Mapvector map
Boxbounding box
typeline type
[out]listoutput list, must be initialized
Returns:
number of lines

Definition at line 38 of file Vlib/select.c.

References dig_list_add(), dig_select_lines(), Vect_build_sidx_from_topo(), and Vect_new_list().

Referenced by Vect_attach_centroids(), Vect_break_lines_list(), Vect_find_line_list(), Vect_remove_duplicates(), and Vect_select_lines_by_polygon().

int Vect_select_lines_by_polygon ( struct Map_info *  Map,
struct line_pnts *  Polygon,
int  nisles,
struct line_pnts **  Isles,
int  type,
struct ilist *  List 
)

Select lines by Polygon with optional isles.

Polygons should be closed, i.e. first and last points must be identical.

Parameters:
Mapvector map
Polygonouter ring
nislesnumber of islands or 0
Islesarray of islands or NULL
typeline type
[out]listoutput list, must be initialised
Returns:
number of lines

Definition at line 198 of file Vlib/select.c.

References dig_line_box(), dig_list_add(), Vect_line_check_intersection(), Vect_new_line_struct(), Vect_new_list(), Vect_point_in_poly(), Vect_read_line(), and Vect_select_lines_by_box().

Referenced by Vect_select_areas_by_polygon(), and Vedit_merge_lines().

int Vect_select_nodes_by_box ( struct Map_info *  Map,
BOUND_BOX *  Box,
struct ilist *  list 
)

Select nodes by box.

Parameters:
Mapvector map
Boxbounding box
[out]listoutput list, must be initialized
Returns:
number of nodes

Definition at line 159 of file Vlib/select.c.

References dig_select_nodes(), and Vect_build_sidx_from_topo().

Referenced by Vect_find_node().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines