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

◆ wkt_parser_ptarray_new()

POINTARRAY * wkt_parser_ptarray_new ( POINT  p)

Start a point array from the first coordinate.

Definition at line 303 of file lwin_wkt.c.

304{
305 int ndims = FLAGS_NDIMS(p.flags);
306 POINTARRAY *pa = ptarray_construct_empty((ndims>2), (ndims>3), 4);
307 LWDEBUG(4,"entered");
308 if ( ! pa )
309 {
311 return NULL;
312 }
313 return wkt_parser_ptarray_add_coord(pa, p);
314}
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition ptarray.c:59
#define PARSER_ERROR_OTHER
Definition liblwgeom.h:2181
#define FLAGS_NDIMS(flags)
Definition liblwgeom.h:179
#define LWDEBUG(level, msg)
Definition lwgeom_log.h:101
POINTARRAY * wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p)
Definition lwin_wkt.c:265
#define SET_PARSER_ERROR(errno)
Definition lwin_wkt.c:52
lwflags_t flags
Definition lwin_wkt.h:34

References POINT::flags, FLAGS_NDIMS, LWDEBUG, PARSER_ERROR_OTHER, ptarray_construct_empty(), SET_PARSER_ERROR, and wkt_parser_ptarray_add_coord().

Here is the call graph for this function: