692{
694 int where = PG_GETARG_INT32(1);
698
699
700 if( where < 1 )
701 {
705 if(count >0)
706 {
707
708
709 where = where +
count + 1;
710 }
711 if (where < 1)
712 PG_RETURN_NULL();
713 }
714
716 {
717
719 }
721 {
723 }
724
726 PG_FREE_IF_COPY(geom, 0);
727
728 if ( ! lwpoint )
729 PG_RETURN_NULL();
730
732}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
void lwgeom_free(LWGEOM *geom)
LWPOINT * lwline_get_lwpoint(const LWLINE *line, uint32_t where)
Returns freshly allocated LWPOINT that corresponds to the index where.
LWPOINT * lwcompound_get_lwpoint(const LWCOMPOUND *lwcmp, uint32_t where)
uint32_t lwgeom_count_vertices(const LWGEOM *geom)
Count the total number of vertices in any LWGEOM.