PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwcircstring_get_lwpoint()

LWPOINT * lwcircstring_get_lwpoint ( const LWCIRCSTRING circ,
uint32_t  where 
)
extern

Definition at line 280 of file lwcircstring.c.

280 {
281 POINT4D pt;
282 LWPOINT *lwpoint;
283 POINTARRAY *pa;
284
285 if ( lwcircstring_is_empty(circ) || where >= circ->points->npoints )
286 return NULL;
287
289 pt = getPoint4d(circ->points, where);
291 lwpoint = lwpoint_construct(circ->srid, NULL, pa);
292 return lwpoint;
293}
POINT4D getPoint4d(const POINTARRAY *pa, uint32_t n)
Definition lwgeom_api.c:107
LWPOINT * lwpoint_construct(int32_t srid, GBOX *bbox, POINTARRAY *point)
Definition lwpoint.c:129
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition ptarray.c:59
#define FLAGS_GET_Z(flags)
Definition liblwgeom.h:165
#define FLAGS_GET_M(flags)
Definition liblwgeom.h:166
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE,...
Definition ptarray.c:147
#define LW_TRUE
Return types for functions with status returns.
Definition liblwgeom.h:93
int lwcircstring_is_empty(const LWCIRCSTRING *circ)
int32_t srid
Definition liblwgeom.h:508
lwflags_t flags
Definition liblwgeom.h:509
POINTARRAY * points
Definition liblwgeom.h:507
uint32_t npoints
Definition liblwgeom.h:427

References LWCIRCSTRING::flags, FLAGS_GET_M, FLAGS_GET_Z, getPoint4d(), LW_TRUE, lwcircstring_is_empty(), lwpoint_construct(), POINTARRAY::npoints, LWCIRCSTRING::points, ptarray_append_point(), ptarray_construct_empty(), and LWCIRCSTRING::srid.

Referenced by LWGEOM_dumppoints().

Here is the call graph for this function:
Here is the caller graph for this function: