Calculate covers predicate for two lwgeoms on the sphere.
Currently only handles point-in-polygon.
2422 type1 = lwgeom1->
type;
2423 type2 = lwgeom2->
type;
2430 LWDEBUG(4,
"dimension of geom2 is bigger than geom1");
2435 if ( lwgeom1->
bbox )
2436 gbox1 = *(lwgeom1->
bbox);
2441 if ( lwgeom2->
bbox )
2442 gbox2 = *(lwgeom2->
bbox);
2481 for ( i = 0; i < col->
ngeoms; i++ )
2497 for ( i = 0; i < col->
ngeoms; i++ )
2508 lwerror(
"lwgeom_covers_lwgeom_sphere: reached end of function without resolution");
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
int lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define LW_TRUE
Return types for functions with status returns.
char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2)
int lwpoly_covers_point2d(const LWPOLY *poly, const POINT2D *pt_to_test)
Given a polygon (lon/lat decimal degrees) and point (lon/lat decimal degrees) and a guaranteed outsid...
int lwline_covers_lwpoint(const LWLINE *lwline, const LWPOINT *lwpoint)
return LW_TRUE if any of the line segments covers the point
int lwpoly_covers_lwpoly(const LWPOLY *poly1, const LWPOLY *poly2)
Given a polygon1 check if all points of polygon2 are inside polygon1 and no intersections of the poly...
int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox)
Calculate the geodetic bounding box for an LWGEOM.
int lwpoly_covers_lwline(const LWPOLY *poly, const LWLINE *line)
int lwgeom_covers_lwgeom_sphere(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2)
Calculate covers predicate for two lwgeoms on the sphere.
int lwline_covers_lwline(const LWLINE *lwline1, const LWLINE *lwline2)
Check if first and last point of line2 are covered by line1 and then each point in between has to be ...
#define LWDEBUG(level, msg)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.