85 if (A->
E < B->
W || A->
W > B->
E || A->
N < B->
S || A->
S > B->
N ||
86 A->
T < B->
B || A->
B > B->
T) {
171 *y = *y + (
Box->W - *
x) / (*
c_x - *
x) * (*
c_y - *y);
177 *y = *y + (
Box->E - *
x) / (*
c_x - *
x) * (*
c_y - *y);
244 G_warning(
_(
"Attempt to access feature with invalid id (%d)"), line);
259 G_warning(
_(
"Unable to determine bbox for feature %d"), line);
307 G_warning(
_(
"Attempt to access area with invalid id (%d)"), area);
319 G_warning(
_(
"Unable to determine bbox for area %d"), area);
353 G_warning(
_(
"Attempt to access area with invalid id (%d)"),
isle);
425 "Registering primitives..."),
436 else if (type == -2) {
void G_free(void *)
Free allocated memory.
void G_warning(const char *,...) __attribute__((format(printf
void void G_verbose_message(const char *,...) __attribute__((format(printf
void Vect_destroy_line_struct(struct line_pnts *)
Frees all memory associated with a line_pnts structure, including the structure itself.
int Vect_level(struct Map_info *)
Returns level that Map is opened at.
int Vect_read_line(struct Map_info *, struct line_pnts *, struct line_cats *, int)
Read vector feature (topological level required)
const char * Vect_get_full_name(struct Map_info *)
Get fully qualified name of vector map.
int Vect_rewind(struct Map_info *)
Rewind vector map to cause reads to start at beginning.
int Vect_read_next_line(struct Map_info *, struct line_pnts *, struct line_cats *)
Read next vector feature.
struct line_pnts * Vect_new_line_struct(void)
Creates and initializes a line_pnts structure.
int Vect_is_3d(struct Map_info *)
Check if vector map is 3D.
#define PORT_DOUBLE_MAX
Limits for portable types.
int dig_find_area_box(struct Plus_head *, int, struct bound_box *)
Find bounding box for given area.
int dig_find_line_box(struct Plus_head *, int, struct bound_box *)
Find box for line.
int dig_find_isle_box(struct Plus_head *, int, struct bound_box *)
Find box for isle.
int dig_line_box(const struct line_pnts *, struct bound_box *)
float Box[8][3]
Vertices for box.
2D/3D raster map header (used also for region)
Basic topology-related info.
struct P_line ** Line
Array of vector geometries.
struct P_area ** Area
Array of areas.
struct P_isle ** Isle
Array of isles.
Feature geometry info - coordinates.
int Vect_get_map_box(struct Map_info *Map, struct bound_box *Box)
Get bounding box of map (all features in the map)
int Vect_point_in_box_2d(double x, double y, const struct bound_box *Box)
Tests if point is in 2D box.
int Vect_region_box(const struct Cell_head *Window, struct bound_box *Box)
Copy region window to bounding box.
int Vect_box_extend(struct bound_box *A, const struct bound_box *B)
Extend box A by box B.
int Vect_get_line_box(struct Map_info *Map, int line, struct bound_box *Box)
Get bounding box of given feature.
int Vect_box_overlap(const struct bound_box *A, const struct bound_box *B)
Tests for overlap of two boxes.
int Vect_box_clip(double *x, double *y, double *c_x, double *c_y, const struct bound_box *Box)
Clip coordinates to box, if necessary, lines extending outside of a box.
int Vect_point_in_box(double x, double y, double z, const struct bound_box *Box)
Tests if point is in 3D box.
int Vect_get_area_box(struct Map_info *Map, int area, struct bound_box *Box)
Get bounding box of area.
int Vect_get_map_box1(struct Map_info *Map, struct bound_box *Box)
Get bounding box of map on level 1 (all features in the map)
int Vect_box_copy(struct bound_box *A, const struct bound_box *B)
Copy box B to box A.
int Vect_get_isle_box(struct Map_info *Map, int isle, struct bound_box *Box)
Get bounding box of isle.