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

◆ lwcircstring_construct()

LWCIRCSTRING * lwcircstring_construct ( int32_t  srid,
GBOX bbox,
POINTARRAY points 
)
extern

Definition at line 49 of file lwcircstring.c.

50{
52
53 /*
54 * The first arc requires three points. Each additional
55 * arc requires two more points. Thus the minimum point count
56 * is three, and the count must be odd.
57 */
58 if (points->npoints % 2 != 1 || points->npoints < 3)
59 {
60 lwnotice("lwcircstring_construct: invalid point count %d", points->npoints);
61 }
62
64
65 result->type = CIRCSTRINGTYPE;
66
67 result->flags = points->flags;
68 FLAGS_SET_BBOX(result->flags, bbox?1:0);
69
70 result->srid = srid;
71 result->points = points;
72 result->bbox = bbox;
73
74 return result;
75}
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition cu_print.c:267
#define FLAGS_SET_BBOX(flags, value)
Definition liblwgeom.h:174
void * lwalloc(size_t size)
Definition lwutil.c:227
#define CIRCSTRINGTYPE
Definition liblwgeom.h:109
void lwnotice(const char *fmt,...) __attribute__((format(printf
Write a notice out to the notice handler.
lwflags_t flags
Definition liblwgeom.h:431
uint32_t npoints
Definition liblwgeom.h:427

References CIRCSTRINGTYPE, POINTARRAY::flags, FLAGS_SET_BBOX, lwalloc(), lwnotice(), POINTARRAY::npoints, and result.

Referenced by circstring_from_pa(), lwcircstring_addpoint(), lwcircstring_from_lwmpoint(), lwcircstring_from_lwpointarray(), lwcircstring_from_wkb_state(), lwcircstring_removepoint(), LWGEOM_dumpsegments(), and wkt_parser_circularstring_new().

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