PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ wkt_parser_polygon_new()

LWGEOM* wkt_parser_polygon_new ( POINTARRAY pa,
char  dimcheck 
)

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

447 {
448  LWPOLY *poly = NULL;
449  LWDEBUG(4,"entered");
450 
451  /* No pointarray is a problem */
452  if( ! pa )
453  {
455  return NULL;
456  }
457 
459 
460  /* Error out if we can't build this polygon. */
461  if( ! poly )
462  {
464  return NULL;
465  }
466 
467  wkt_parser_polygon_add_ring(lwpoly_as_lwgeom(poly), pa, dimcheck);
468  return lwpoly_as_lwgeom(poly);
469 }
LWGEOM * wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:471
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
Definition: lwgeom.c:239
uint8_t flags
Definition: liblwgeom.h:353
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:172
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:124
#define SET_PARSER_ERROR(errno)
Definition: lwin_wkt.c:38
LWPOLY * lwpoly_construct_empty(int srid, char hasz, char hasm)
Definition: lwpoly.c:66
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:125
#define PARSER_ERROR_OTHER
Definition: liblwgeom.h:1901
Here is the call graph for this function:
Here is the caller graph for this function: