186 double distance_fraction = PG_GETARG_FLOAT8(1);
187 int repeat = PG_NARGS() > 2 && PG_GETARG_BOOL(2);
193 if ( distance_fraction < 0 || distance_fraction > 1 )
195 elog(ERROR,
"line_interpolate_point: 2nd arg isn't within [0,1]");
196 PG_FREE_IF_COPY(gser, 0);
202 elog(ERROR,
"line_interpolate_point: 1st arg isn't a line");
203 PG_FREE_IF_COPY(gser, 0);
211 PG_FREE_IF_COPY(gser, 0);
223 PG_RETURN_POINTER(result);
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.
uint32_t gserialized_get_type(const GSERIALIZED *g)
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(int32_t srid, GBOX *bbox, POINTARRAY *point)
LWMPOINT * lwmpoint_construct(int32_t srid, const POINTARRAY *pa)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)