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

◆ ST_CPAWithin()

Datum ST_CPAWithin ( PG_FUNCTION_ARGS  )

Definition at line 108 of file lwgeom_functions_temporal.c.

109{
110 GSERIALIZED *gs0 = PG_GETARG_GSERIALIZED_P(0);
111 GSERIALIZED *gs1 = PG_GETARG_GSERIALIZED_P(1);
112 double maxdist = PG_GETARG_FLOAT8(2);
113 /* All checks already performed by liblwgeom, not worth checking again */
116 int ret = lwgeom_cpa_within(g0, g1, maxdist);
117 lwgeom_free(g0);
118 lwgeom_free(g1);
119 PG_FREE_IF_COPY(gs0, 0);
120 PG_FREE_IF_COPY(gs1, 1);
121 PG_RETURN_BOOL( ret == LW_TRUE );
122}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246
#define LW_TRUE
Return types for functions with status returns.
Definition liblwgeom.h:93
int lwgeom_cpa_within(const LWGEOM *g1, const LWGEOM *g2, double maxdist)
Is the closest point of approach within a distance ?

References LW_TRUE, lwgeom_cpa_within(), lwgeom_free(), and lwgeom_from_gserialized().

Here is the call graph for this function: