1450 bool use_spheroid = PG_GETARG_BOOL(2);
1451 LWGEOM *line, *lwgeom1, *lwgeom2;
1463 PG_FREE_IF_COPY(g1, 0);
1464 PG_FREE_IF_COPY(g2, 1);
1472 if ( ! use_spheroid )
1473 s.a =
s.b =
s.radius;
1480 result = geography_serialize(line);
1483 PG_FREE_IF_COPY(g1, 0);
1484 PG_FREE_IF_COPY(g2, 1);
1485 PG_RETURN_POINTER(
result);
char result[OUT_DOUBLE_BUFFER_SIZE]
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.
void lwgeom_free(LWGEOM *geom)
#define FP_TOLERANCE
Floating point comparators.
LWGEOM * geography_tree_shortestline(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, double threshold, const SPHEROID *spheroid)
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)