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"
59 PG_FREE_IF_COPY(gs0, 0);
60 PG_FREE_IF_COPY(gs1, 1);
61 if ( m < 0 ) PG_RETURN_NULL();
98 PG_FREE_IF_COPY(gs0, 0);
99 PG_FREE_IF_COPY(gs1, 1);
100 if ( m < 0 ) PG_RETURN_NULL();
101 PG_RETURN_FLOAT8(mindist);
114 double maxdist = PG_GETARG_FLOAT8(2);
121 PG_FREE_IF_COPY(gs0, 0);
122 PG_FREE_IF_COPY(gs1, 1);
123 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)