PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ lwgeom_construct_empty()

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

Definition at line 2219 of file lwgeom.c.

2220{
2221 switch(type)
2222 {
2223 case POINTTYPE:
2224 return lwpoint_as_lwgeom(lwpoint_construct_empty(srid, hasz, hasm));
2225 case LINETYPE:
2226 return lwline_as_lwgeom(lwline_construct_empty(srid, hasz, hasm));
2227 case POLYGONTYPE:
2228 return lwpoly_as_lwgeom(lwpoly_construct_empty(srid, hasz, hasm));
2229 case CURVEPOLYTYPE:
2230 return lwcurvepoly_as_lwgeom(lwcurvepoly_construct_empty(srid, hasz, hasm));
2231 case CIRCSTRINGTYPE:
2232 return lwcircstring_as_lwgeom(lwcircstring_construct_empty(srid, hasz, hasm));
2233 case TRIANGLETYPE:
2234 return lwtriangle_as_lwgeom(lwtriangle_construct_empty(srid, hasz, hasm));
2235 case COMPOUNDTYPE:
2236 case MULTIPOINTTYPE:
2237 case MULTILINETYPE:
2238 case MULTIPOLYGONTYPE:
2239 case COLLECTIONTYPE:
2240 return lwcollection_as_lwgeom(lwcollection_construct_empty(type, srid, hasz, hasm));
2241 default:
2242 lwerror("lwgeom_construct_empty: unsupported geometry type: %s",
2243 lwtype_name(type));
2244 return NULL;
2245 }
2246}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition lwutil.c:216
#define COLLECTIONTYPE
Definition liblwgeom.h:108
#define COMPOUNDTYPE
Definition liblwgeom.h:110
#define CURVEPOLYTYPE
Definition liblwgeom.h:111
LWCURVEPOLY * lwcurvepoly_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwcurvepoly.c:35
#define MULTILINETYPE
Definition liblwgeom.h:106
#define LINETYPE
Definition liblwgeom.h:103
#define MULTIPOINTTYPE
Definition liblwgeom.h:105
LWTRIANGLE * lwtriangle_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwtriangle.c:58
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition liblwgeom.h:102
#define MULTIPOLYGONTYPE
Definition liblwgeom.h:107
#define POLYGONTYPE
Definition liblwgeom.h:104
#define CIRCSTRINGTYPE
Definition liblwgeom.h:109
LWPOINT * lwpoint_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwpoint.c:151
LWCOLLECTION * lwcollection_construct_empty(uint8_t type, int32_t srid, char hasz, char hasm)
#define TRIANGLETYPE
Definition liblwgeom.h:115
LWCIRCSTRING * lwcircstring_construct_empty(int32_t srid, char hasz, char hasm)
LWPOLY * lwpoly_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwpoly.c:161
LWLINE * lwline_construct_empty(int32_t srid, char hasz, char hasm)
Definition lwline.c:55
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
Definition lwgeom.c:372
LWGEOM * lwcurvepoly_as_lwgeom(const LWCURVEPOLY *obj)
Definition lwgeom.c:347
LWGEOM * lwtriangle_as_lwgeom(const LWTRIANGLE *obj)
Definition lwgeom.c:362
LWGEOM * lwline_as_lwgeom(const LWLINE *obj)
Definition lwgeom.c:367
LWGEOM * lwcircstring_as_lwgeom(const LWCIRCSTRING *obj)
Definition lwgeom.c:342
LWGEOM * lwpoly_as_lwgeom(const LWPOLY *obj)
Definition lwgeom.c:357
LWGEOM * lwcollection_as_lwgeom(const LWCOLLECTION *obj)
Definition lwgeom.c:337
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.

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, and TRIANGLETYPE.

Referenced by gserialized_list_union(), lwgeom_boundary(), 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: