PostGIS  2.2.8dev-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 289 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().

290 {
291  int ndims = FLAGS_NDIMS(p.flags);
292  POINTARRAY *pa = ptarray_construct_empty((ndims>2), (ndims>3), 4);
293  LWDEBUG(4,"entered");
294  if ( ! pa )
295  {
297  return NULL;
298  }
299  return wkt_parser_ptarray_add_coord(pa, p);
300 }
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:50
POINTARRAY * wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p)
Definition: lwin_wkt.c:251
#define SET_PARSER_ERROR(errno)
Definition: lwin_wkt.c:38
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:136
uint8_t flags
Definition: lwin_wkt.h:9
#define PARSER_ERROR_OTHER
Definition: liblwgeom.h:1901
Here is the call graph for this function:
Here is the caller graph for this function: