2428 POSTGIS_DEBUG(2,
"LWGEOM_setpoint_linestring called.");
2431 pglwg1 = PG_GETARG_GSERIALIZED_P_COPY(0);
2433 which = PG_GETARG_INT32(1);
2434 pglwg2 = PG_GETARG_GSERIALIZED_P(2);
2441 elog(ERROR,
"Third argument must be a POINT");
2446 PG_FREE_IF_COPY(pglwg2, 2);
2453 elog(ERROR,
"First argument must be a LINESTRING");
2458 elog(ERROR,
"Line has no points");
2464 elog(ERROR,
"Geometry contains invalid coordinate");
2475 elog(ERROR,
"abs(Point index) out of range (-)(%u..%u)", 0, line->
points->
npoints - 1);
2489 PG_RETURN_POINTER(
result);
char result[OUT_DOUBLE_BUFFER_SIZE]
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWLINE * lwgeom_as_lwline(const LWGEOM *lwgeom)
void lwpoint_free(LWPOINT *pt)
int lwgeom_isfinite(const LWGEOM *lwgeom)
Check if a LWGEOM has any non-finite (NaN or Inf) coordinates.
int getPoint4d_p(const POINTARRAY *pa, uint32_t n, POINT4D *point)
void lwline_setPoint4d(LWLINE *line, uint32_t which, POINT4D *newpoint)
void lwline_free(LWLINE *line)
static LWPOINT * lwgeom_as_lwpoint(const LWGEOM *lwgeom)