PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwgeom_construct_empty()

LWGEOM* lwgeom_construct_empty ( uint8_t  type,
int  srid,
char  hasz,
char  hasm 
)

Definition at line 2092 of file lwgeom.c.

2093 {
2094  switch(type)
2095  {
2096  case POINTTYPE:
2097  return lwpoint_as_lwgeom(lwpoint_construct_empty(srid, hasz, hasm));
2098  case LINETYPE:
2099  return lwline_as_lwgeom(lwline_construct_empty(srid, hasz, hasm));
2100  case POLYGONTYPE:
2101  return lwpoly_as_lwgeom(lwpoly_construct_empty(srid, hasz, hasm));
2102  case CURVEPOLYTYPE:
2103  return lwcurvepoly_as_lwgeom(lwcurvepoly_construct_empty(srid, hasz, hasm));
2104  case CIRCSTRINGTYPE:
2105  return lwcircstring_as_lwgeom(lwcircstring_construct_empty(srid, hasz, hasm));
2106  case TRIANGLETYPE:
2107  return lwtriangle_as_lwgeom(lwtriangle_construct_empty(srid, hasz, hasm));
2108  case COMPOUNDTYPE:
2109  case MULTIPOINTTYPE:
2110  case MULTILINETYPE:
2111  case MULTIPOLYGONTYPE:
2112  case COLLECTIONTYPE:
2113  return lwcollection_as_lwgeom(lwcollection_construct_empty(type, srid, hasz, hasm));
2114  default:
2115  lwerror("lwgeom_construct_empty: unsupported geometry type: %s",
2116  lwtype_name(type));
2117  return NULL;
2118  }
2119 }
#define COLLECTIONTYPE
Definition: liblwgeom.h:91
#define COMPOUNDTYPE
Definition: liblwgeom.h:93
LWCIRCSTRING * lwcircstring_construct_empty(int srid, char hasz, char hasm)
Definition: lwcircstring.c:79
LWCURVEPOLY * lwcurvepoly_construct_empty(int srid, char hasz, char hasm)
Definition: lwcurvepoly.c:36
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int srid, char hasz, char hasm)
Definition: lwcollection.c:94
#define CURVEPOLYTYPE
Definition: liblwgeom.h:94
#define MULTILINETYPE
Definition: liblwgeom.h:89
#define LINETYPE
Definition: liblwgeom.h:86
#define MULTIPOINTTYPE
Definition: liblwgeom.h:88
LWLINE * lwline_construct_empty(int srid, char hasz, char hasm)
Definition: lwline.c:64
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:85
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:90
#define POLYGONTYPE
Definition: liblwgeom.h:87
#define CIRCSTRINGTYPE
Definition: liblwgeom.h:92
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:218
#define TRIANGLETYPE
Definition: liblwgeom.h:98
LWPOINT * lwpoint_construct_empty(int srid, char hasz, char hasm)
Definition: lwpoint.c:151
LWPOLY * lwpoly_construct_empty(int srid, char hasz, char hasm)
Definition: lwpoly.c:161
LWTRIANGLE * lwtriangle_construct_empty(int srid, char hasz, char hasm)
Definition: lwtriangle.c:58
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
Definition: lwgeom.c:330
LWGEOM * lwcollection_as_lwgeom(const LWCOLLECTION *obj)
Definition: lwgeom.c:300
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
Definition: lwgeom.c:320
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
Definition: lwgeom.c:335
LWGEOM * lwcurvepoly_as_lwgeom(const LWCURVEPOLY *obj)
Definition: lwgeom.c:310
LWGEOM * lwcircstring_as_lwgeom(const LWCIRCSTRING *obj)
Definition: lwgeom.c:305
LWGEOM * lwtriangle_as_lwgeom(const LWTRIANGLE *obj)
Definition: lwgeom.c:325
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
type
Definition: ovdump.py:41

References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LINETYPE, lwcircstring_as_lwgeom(), lwcircstring_construct_empty(), lwcollection_as_lwgeom(), lwcollection_construct_empty(), lwcurvepoly_as_lwgeom(), lwcurvepoly_construct_empty(), lwerror(), lwline_as_lwgeom(), lwline_construct_empty(), lwpoint_as_lwgeom(), lwpoint_construct_empty(), lwpoly_as_lwgeom(), lwpoly_construct_empty(), lwtriangle_as_lwgeom(), lwtriangle_construct_empty(), lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, POLYGONTYPE, TRIANGLETYPE, and ovdump::type.

Referenced by pgis_union_geometry_array(), ST_BoundingDiagonal(), ST_ClipByBox2d(), and ST_CollectionExtract().

Here is the call graph for this function:
Here is the caller graph for this function: