PostGIS  2.1.10dev-r@@SVN_REVISION@@
LWGEOM* wkt_parser_polygon_new ( POINTARRAY pa,
char  dimcheck 
)

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

434 {
435  LWPOLY *poly = NULL;
436  LWDEBUG(4,"entered");
437 
438  /* No pointarray is a problem */
439  if( ! pa )
440  {
442  return NULL;
443  }
444 
446 
447  /* Error out if we can't build this polygon. */
448  if( ! poly )
449  {
451  return NULL;
452  }
453 
454  wkt_parser_polygon_add_ring(lwpoly_as_lwgeom(poly), pa, dimcheck);
455  return lwpoly_as_lwgeom(poly);
456 }
LWGEOM * wkt_parser_polygon_add_ring(LWGEOM *poly, POINTARRAY *pa, char dimcheck)
Definition: lwin_wkt.c:458
#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:325
#define SRID_UNKNOWN
Unknown SRID value.
Definition: liblwgeom.h:154
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:106
#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:107
#define PARSER_ERROR_OTHER
Definition: liblwgeom.h:1738

Here is the call graph for this function:

Here is the caller graph for this function: