PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ 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.

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

Referenced by yyparse().

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:70
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
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
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:151
uint8_t flags
Definition: lwin_wkt.h:34
Definition: liblwgeom.h:2036
Here is the call graph for this function:
Here is the caller graph for this function: