188 double distance_fraction = PG_GETARG_FLOAT8(1);
189 int repeat = PG_NARGS() > 2 && PG_GETARG_BOOL(2);
195 if ( distance_fraction < 0 || distance_fraction > 1 )
197 elog(ERROR,
"line_interpolate_point: 2nd arg isn't within [0,1]");
198 PG_FREE_IF_COPY(gser, 0);
204 elog(ERROR,
"line_interpolate_point: 1st arg isn't a line");
205 PG_FREE_IF_COPY(gser, 0);
213 PG_FREE_IF_COPY(gser, 0);
225 PG_RETURN_POINTER(result);
int32_t gserialized_get_srid(const GSERIALIZED *s)
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.
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwmpoint_as_lwgeom(const LWMPOINT *obj)
POINTARRAY * lwline_interpolate_points(const LWLINE *line, double length_fraction, char repeat)
Interpolate one or more points along a line.
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
LWPOINT * lwpoint_construct(int srid, GBOX *bbox, POINTARRAY *point)
LWMPOINT * lwmpoint_construct(int srid, const POINTARRAY *pa)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)