28 #include "utils/elog.h"
29 #include "utils/array.h"
30 #include "utils/geo_decls.h"
32 #include "../postgis_config.h"
34 #include "lwgeom_pg.h"
57 PG_FREE_IF_COPY(gs0, 0);
58 PG_FREE_IF_COPY(gs1, 1);
59 if ( m < 0 ) PG_RETURN_NULL();
96 PG_FREE_IF_COPY(gs0, 0);
97 PG_FREE_IF_COPY(gs1, 1);
98 if ( m < 0 ) PG_RETURN_NULL();
99 PG_RETURN_FLOAT8(mindist);
112 double maxdist = PG_GETARG_FLOAT8(2);
119 PG_FREE_IF_COPY(gs0, 0);
120 PG_FREE_IF_COPY(gs1, 1);
121 PG_RETURN_BOOL( ret ==
LW_TRUE );
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
int lwgeom_is_trajectory(const LWGEOM *geom)
Return LW_TRUE or LW_FALSE depending on whether or not a geometry is a linestring with measure value ...
double lwgeom_tcpa(const LWGEOM *g1, const LWGEOM *g2, double *mindist)
Find the time of closest point of approach.
#define LW_TRUE
Return types for functions with status returns.
int lwgeom_cpa_within(const LWGEOM *g1, const LWGEOM *g2, double maxdist)
Is the closest point of approach within a distance ?
This library is the generic geometry handling section of PostGIS.
Datum ST_ClosestPointOfApproach(PG_FUNCTION_ARGS)
Datum ST_DistanceCPA(PG_FUNCTION_ARGS)
PG_FUNCTION_INFO_V1(ST_ClosestPointOfApproach)
Datum ST_IsValidTrajectory(PG_FUNCTION_ARGS)
Datum ST_CPAWithin(PG_FUNCTION_ARGS)