shapereader
Read ESRI shapefiles
|
Point. More...
#include <shp-point.h>
Public Member Functions | |
int | shp_point_in_bounding_box (const shp_point_t *point, double x_min, double y_min, double x_max, double y_max) |
Check whether a point is in a bounding box. More... | |
int | shp_point_in_polygon (const shp_point_t *point, const shp_polygon_t *polygon) |
Check whether a point is in a polygon. More... | |
Data Fields | |
double | x |
X coordinate. | |
double | y |
Y coordinate. | |
A location in a two-dimensional coordinate plane.
int shp_point_in_bounding_box | ( | const shp_point_t * | point, |
double | x_min, | ||
double | y_min, | ||
double | x_max, | ||
double | y_max | ||
) |
Determines whether a point is inside or outside a bounding box.
point | a point. |
x_min | X coordinate of the bottom left corner. |
y_min | Y coordinate of the bottom left corner. |
x_max | X coordinate of the top right corner. |
y_max | Y coordinate of the top right corner. |
1 | if the point is in the box. |
0 | if the point is not in the box. |
-1 | if the point is on the boundary. |
int shp_point_in_polygon | ( | const shp_point_t * | point, |
const shp_polygon_t * | polygon | ||
) |
Determines whether a point is inside or outside a polygon.
point | a point. |
polygon | a polygon. |
1 | if the point is in the polygon. |
0 | if the point is not in the polygon. |
-1 | if the point is on the polygon's edges. |