383{
386
387
390
393
394
397 else
398 {
400
403
405 {
408
409
412
413
415
416 for (uint32_t i = 0; i < c->
ngeoms; i++)
417 {
419 {
420
422
424 is_inside = !is_inside;
426 {
428 break;
429 }
430 }
432 {
433
436
438 is_inside = !is_inside;
440 {
442 break;
443 }
444 }
445 }
446
450
451 if (is_boundary)
452 {
453
456 AFFINE aff = {1, 0, cx, 0, 1, cy, 0, 0, 1, 0, 0, 0};
457
460
463
464 continue;
465 }
466 return is_inside;
467 }
468 }
469}
int lwgeom_startpoint(const LWGEOM *lwgeom, POINT4D *pt)
void lwgeom_free(LWGEOM *geom)
LWCOLLECTION * lwgeom_clip_to_ordinate_range(const LWGEOM *lwin, char ordinate, double from, double to, double offset)
Given a geometry clip based on the from/to range of one of its ordinates (x, y, z,...
void lwgeom_affine(LWGEOM *geom, const AFFINE *affine)
void lwcollection_free(LWCOLLECTION *col)
#define FLAGS_GET_SOLID(flags)
#define LW_TRUE
Return types for functions with status returns.
const GBOX * lwgeom_get_bbox(const LWGEOM *lwgeom)
Get a non-empty geometry bounding box, computing and caching it if not already there.
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep clone an LWGEOM, everything is copied.
#define LW_INSIDE
Constants for point-in-polygon return values.
int ptarray_contains_point(const POINTARRAY *pa, const POINT2D *pt)
The following is based on the "Fast Winding Number Inclusion of a Point in a Polygon" algorithm by Da...
int lwpoly_contains_point(const LWPOLY *poly, const POINT2D *pt)
double lwrandom_uniform(void)
static int gbox_contains_3d(const GBOX *g1, const GBOX *g2)