1353 bool use_spheroid = PG_GETARG_BOOL(2);
1367 PG_FREE_IF_COPY(gs1, 0);
1368 PG_FREE_IF_COPY(gs2, 1);
1374 elog(ERROR,
"%s: 1st arg is not a line", __func__);
1379 elog(ERROR,
"%s: 2st arg is not a point", __func__);
1384 if ( ! use_spheroid ) {
1385 s.a =
s.b =
s.radius;
1400 PG_RETURN_FLOAT8(ret);
void gserialized_error_if_srid_mismatch(const GSERIALIZED *g1, const GSERIALIZED *g2, const char *funcname)
int32_t gserialized_get_srid(const GSERIALIZED *g)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
uint32_t gserialized_get_type(const GSERIALIZED *g)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
int lwpoint_getPoint4d_p(const LWPOINT *point, POINT4D *out)
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
double ptarray_locate_point_spheroid(const POINTARRAY *pa, const POINT4D *p4d, const SPHEROID *s, double tolerance, double *mindistout, POINT4D *proj4d)
Locate a point along the point array defining a geographic line.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define FP_TOLERANCE
Floating point comparators.
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)