2164 POSTGIS_DEBUGF(2,
"%s called.", __func__);
2166 pglwg1 = PG_GETARG_GSERIALIZED_P(0);
2167 pglwg2 = PG_GETARG_GSERIALIZED_P(1);
2169 if ( PG_NARGS() > 2 )
2171 where = PG_GETARG_INT32(2);
2176 elog(ERROR,
"First argument must be a LINESTRING");
2182 elog(ERROR,
"Second argument must be a POINT");
2191 elog(ERROR,
"Invalid offset");
2201 elog(ERROR,
"Point insert failed");
2208 PG_FREE_IF_COPY(pglwg1, 0);
2209 PG_FREE_IF_COPY(pglwg2, 1);
2212 PG_RETURN_POINTER(result);
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area...
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwpoint_free(LWPOINT *pt)
void lwline_free(LWLINE *line)
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep clone an LWGEOM, everything is copied.
LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
int lwline_add_lwpoint(LWLINE *line, LWPOINT *point, int where)
Add a LWPOINT to an LWLINE.