PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwgeom_contains_point()

int lwgeom_contains_point ( const LWGEOM geom,
const POINT2D pt 
)

Definition at line 129 of file lwcompound.c.

130{
131 switch( geom->type )
132 {
133 case LINETYPE:
134 return ptarray_contains_point(((LWLINE*)geom)->points, pt);
135 case CIRCSTRINGTYPE:
136 return ptarrayarc_contains_point(((LWCIRCSTRING*)geom)->points, pt);
137 case COMPOUNDTYPE:
138 return lwcompound_contains_point((LWCOMPOUND*)geom, pt);
139 }
140 lwerror("lwgeom_contains_point failed");
141 return LW_FAILURE;
142}
#define COMPOUNDTYPE
Definition liblwgeom.h:124
#define LW_FAILURE
Definition liblwgeom.h:110
#define LINETYPE
Definition liblwgeom.h:117
#define CIRCSTRINGTYPE
Definition liblwgeom.h:123
int ptarrayarc_contains_point(const POINTARRAY *pa, const POINT2D *pt)
For POINTARRAYs representing CIRCULARSTRINGS.
Definition ptarray.c:839
int ptarray_contains_point(const POINTARRAY *pa, const POINT2D *pt)
Return 1 if the point is inside the POINTARRAY, -1 if it is outside, and 0 if it is on the boundary.
Definition ptarray.c:740
int lwcompound_contains_point(const LWCOMPOUND *comp, const POINT2D *pt)
Definition lwcompound.c:145
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition lwutil.c:190
uint8_t type
Definition liblwgeom.h:448

References CIRCSTRINGTYPE, COMPOUNDTYPE, LINETYPE, LW_FAILURE, lwcompound_contains_point(), lwerror(), ptarray_contains_point(), ptarrayarc_contains_point(), and LWGEOM::type.

Referenced by lw_dist2d_curvepoly_curvepoly(), lw_dist2d_line_curvepoly(), lw_dist2d_point_curvepoly(), and lw_dist2d_tri_curvepoly().

Here is the call graph for this function:
Here is the caller graph for this function: