GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/Vect.h>
Go to the source code of this file.
Functions | |
int | Vect_point_in_box (double x, double y, double z, BOUND_BOX *Box) |
Tests for point in box. More... | |
int | Vect_box_overlap (BOUND_BOX *A, BOUND_BOX *B) |
Tests for overlap of two boxes. More... | |
int | Vect_box_copy (BOUND_BOX *A, BOUND_BOX *B) |
Copy box B to box A. More... | |
int | Vect_box_extend (BOUND_BOX *A, BOUND_BOX *B) |
Extend box A by box B. More... | |
int | Vect_box_clip (double *x, double *y, double *c_x, double *c_y, BOUND_BOX *Box) |
Clip coordinates to box, if necessary, lines extending outside of a box. More... | |
int | Vect_get_line_box (struct Map_info *Map, int line, BOUND_BOX *Box) |
Get boundary box of line. More... | |
int | Vect_get_area_box (struct Map_info *Map, int area, BOUND_BOX *Box) |
Get boundary box of area. More... | |
int | Vect_get_isle_box (struct Map_info *Map, int isle, BOUND_BOX *Box) |
Get boundary box of isle. More... | |
int | Vect_get_map_box (struct Map_info *Map, BOUND_BOX *Box) |
Get boundary box of map. More... | |
int | Vect_region_box (struct Cell_head *Window, BOUND_BOX *Box) |
Copy region Window to Box. More... | |
int Vect_box_clip | ( | double * | x, |
double * | y, | ||
double * | c_x, | ||
double * | c_y, | ||
BOUND_BOX * | Box | ||
) |
Clip coordinates to box, if necessary, lines extending outside of a box.
A line represented by the coordinates x, y and c_x, c_y is clipped to the window defined by s (south), n (north), w (west), and e (east). Note that the following constraints must be true: w <e s <n The x and c_x are values to be compared to w and e. The y and c_y are values to be compared to s and n. The x and c_x values returned lie between w and e. The y and c_y values returned lie between s and n.
x,y | coordinates (w, e) |
c_x,c_y | coordinates (s, n) |
Box | boundary box |
Definition at line 138 of file Vlib/box.c.
References y.
int Vect_box_copy | ( | BOUND_BOX * | A, |
BOUND_BOX * | B | ||
) |
Copy box B to box A.
A | boundary A |
B | boundary B |
Definition at line 72 of file Vlib/box.c.
Referenced by wxdisplay.DisplayDriver::GetRegionSelected(), V2_delete_line_nat(), V2_write_line_nat(), Vect_build_nat(), and Vect_topo_dump().
int Vect_box_extend | ( | BOUND_BOX * | A, |
BOUND_BOX * | B | ||
) |
Extend box A by box B.
A | boundary A |
B | boundary B |
Definition at line 93 of file Vlib/box.c.
Referenced by wxdisplay.DisplayDriver::GetRegionSelected(), V2_delete_line_nat(), V2_restore_line_nat(), V2_write_line_nat(), and Vect_build_nat().
int Vect_box_overlap | ( | BOUND_BOX * | A, |
BOUND_BOX * | B | ||
) |
Tests for overlap of two boxes.
A | boundary box A |
B | boundary box B |
Definition at line 53 of file Vlib/box.c.
Referenced by V1_read_next_line_nat(), V1_read_next_line_ogr(), and V2_read_next_line_nat().
Get boundary box of area.
Map | vector map | |
area | area id | |
[out] | Box | bounding box |
Definition at line 247 of file Vlib/box.c.
References NULL.
Referenced by wxdisplay.DisplayDriver::GetRegionSelected(), V2_delete_line_nat(), and Vect_isle_find_area().
Get boundary box of isle.
Map | vector map | |
isle | isle id | |
[out] | Box | bounding box |
Definition at line 286 of file Vlib/box.c.
References NULL.
Referenced by V2_delete_line_nat(), and Vect_isle_find_area().
Get boundary box of line.
Map | vector map | |
line | line id | |
[out] | Box | bounding box |
Definition at line 208 of file Vlib/box.c.
References NULL.
Referenced by wxdisplay.DisplayDriver::GetRegionSelected(), wxdigit.IVDigit::OpenBackgroundMap(), V2_read_next_line_nat(), and Vect_break_lines_list().
int Vect_get_map_box | ( | struct Map_info * | Map, |
BOUND_BOX * | Box | ||
) |
Get boundary box of map.
Map | vector map | |
[out] | Box | bouding box |
Definition at line 323 of file Vlib/box.c.
Referenced by wxdisplay.DisplayDriver::GetMapBoundingBox().
int Vect_point_in_box | ( | double | x, |
double | y, | ||
double | z, | ||
BOUND_BOX * | Box | ||
) |
Tests for point in box.
x,y,z | coordinates |
Box | boundary box |
Definition at line 33 of file Vlib/box.c.
References N.
int Vect_region_box | ( | struct Cell_head * | Window, |
BOUND_BOX * | Box | ||
) |
Copy region Window to Box.
Window | region structure (raster-based) | |
[out] | Box | boundary box (vector-based) |
Definition at line 348 of file Vlib/box.c.