1292 double distance_fraction = PG_GETARG_FLOAT8(1);
1294 bool use_spheroid = PG_GETARG_BOOL(2);
1296 bool repeat = (PG_NARGS() > 3) && PG_GETARG_BOOL(3);
1305 PG_FREE_IF_COPY(gs, 0);
1309 if ( distance_fraction < 0 || distance_fraction > 1 )
1311 elog(ERROR,
"%s: second arg is not within [0,1]", __func__);
1312 PG_FREE_IF_COPY(gs, 0);
1319 elog(ERROR,
"%s: first arg is not a line", __func__);
1320 PG_FREE_IF_COPY(gs, 0);
1328 if ( ! use_spheroid )
1329 s.a =
s.b =
s.radius;
1334 PG_FREE_IF_COPY(gs, 0);
1337 result = geography_serialize(lwresult);
1340 PG_RETURN_POINTER(
result);
char result[OUT_DOUBLE_BUFFER_SIZE]
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.
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
void lwgeom_set_geodetic(LWGEOM *geom, int value)
Set the FLAGS geodetic bit on geometry an all sub-geometries and pointlists.
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
LWGEOM * geography_interpolate_points(const LWLINE *line, double length_fraction, const SPHEROID *s, char repeat)
Interpolate a point along a geographic line.
void lwgeom_free(LWGEOM *geom)