PostGIS  2.1.10dev-r@@SVN_REVISION@@
POINTARRAY* wkt_parser_ptarray_new ( POINT  p)

Start a point array from the first coordinate.

Definition at line 276 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().

277 {
278  int ndims = FLAGS_NDIMS(p.flags);
279  POINTARRAY *pa = ptarray_construct_empty((ndims>2), (ndims>3), 4);
280  LWDEBUG(4,"entered");
281  if ( ! pa )
282  {
284  return NULL;
285  }
286  return wkt_parser_ptarray_add_coord(pa, p);
287 }
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
Definition: ptarray.c:57
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
POINTARRAY * wkt_parser_ptarray_add_coord(POINTARRAY *pa, POINT p)
Definition: lwin_wkt.c:238
#define SET_PARSER_ERROR(errno)
Definition: lwin_wkt.c:38
#define FLAGS_NDIMS(flags)
Definition: liblwgeom.h:118
uint8_t flags
Definition: lwin_wkt.h:9
Definition: liblwgeom.h:1738

Here is the call graph for this function:

Here is the caller graph for this function: