PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ wkt_parser_polygon_new()

LWGEOM* wkt_parser_polygon_new ( POINTARRAY pa,
char  dimcheck 
)

Definition at line 460 of file lwin_wkt.c.

References POINTARRAY::flags, FLAGS_GET_M, FLAGS_GET_Z, LWDEBUG, lwpoly_as_lwgeom(), lwpoly_construct_empty(), PARSER_ERROR_OTHER, SET_PARSER_ERROR, SRID_UNKNOWN, and wkt_parser_polygon_add_ring().

Referenced by yyparse().

461 {
462  LWPOLY *poly = NULL;
463  LWDEBUG(4,"entered");
464 
465  /* No pointarray is a problem */
466  if( ! pa )
467  {
469  return NULL;
470  }
471 
473 
474  /* Error out if we can't build this polygon. */
475  if( ! poly )
476  {
478  return NULL;
479  }
480 
481  wkt_parser_polygon_add_ring(lwpoly_as_lwgeom(poly), pa, dimcheck);
482  return lwpoly_as_lwgeom(poly);
483 }
LWGEOM * wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:485
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
Definition: lwgeom.c:288
uint8_t flags
Definition: liblwgeom.h:369
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:188
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:140
#define SET_PARSER_ERROR(errno)
Definition: lwin_wkt.c:52
LWPOLY * lwpoly_construct_empty(int srid, char hasz, char hasm)
Definition: lwpoly.c:161
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:141
#define PARSER_ERROR_OTHER
Definition: liblwgeom.h:2045
Here is the call graph for this function:
Here is the caller graph for this function: