2312 uint32_t uwhere = 0;
2314 POSTGIS_DEBUGF(2,
"%s called.", __func__);
2316 pglwg1 = PG_GETARG_GSERIALIZED_P(0);
2317 pglwg2 = PG_GETARG_GSERIALIZED_P(1);
2321 elog(ERROR,
"First argument must be a LINESTRING");
2327 elog(ERROR,
"Second argument must be a POINT");
2333 if (PG_NARGS() <= 2)
2339 int32 where = PG_GETARG_INT32(2);
2346 elog(ERROR,
"%s: Invalid offset", __func__);
2361 elog(ERROR,
"Point insert failed");
2368 PG_FREE_IF_COPY(pglwg1, 0);
2369 PG_FREE_IF_COPY(pglwg2, 1);
2372 PG_RETURN_POINTER(
result);
char result[OUT_DOUBLE_BUFFER_SIZE]
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 lwpoint_free(LWPOINT *pt)
LWGEOM * lwgeom_clone_deep(const LWGEOM *lwgeom)
Deep clone an LWGEOM, everything is copied.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
void lwline_free(LWLINE *line)
int lwline_add_lwpoint(LWLINE *line, LWPOINT *point, uint32_t where)
Add a LWPOINT to an LWLINE.
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)