Calculate covers predicate for two lwgeoms on the sphere.
Currently only handles point-in-polygon.
2414 type1 = lwgeom1->
type;
2415 type2 = lwgeom2->
type;
2422 LWDEBUG(4,
"dimension of geom2 is bigger than geom1");
2427 if ( lwgeom1->
bbox )
2428 gbox1 = *(lwgeom1->
bbox);
2433 if ( lwgeom2->
bbox )
2434 gbox2 = *(lwgeom2->
bbox);
2473 for ( i = 0; i < col->
ngeoms; i++ )
2489 for ( i = 0; i < col->
ngeoms; i++ )
2500 lwerror(
"lwgeom_covers_lwgeom_sphere: reached end of function without resolution");
char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2)
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_covers_lwgeom_sphere(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2)
Calculate covers predicate for two lwgeoms on the sphere.
#define LWDEBUG(level, msg)
#define LW_TRUE
Return types for functions with status returns.
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 lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
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 ...
int getPoint2d_p(const POINTARRAY *pa, int n, POINT2D *point)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
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
void lwerror(const char *fmt,...)
Write a notice out to the error handler.