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

◆ geography_valid_type()

void geography_valid_type ( uint8_t  type)

The geography type only support POINT, LINESTRING, POLYGON, MULTI* variants of same, and GEOMETRYCOLLECTION.

If the input type is not one of those, shut down the query.

Definition at line 69 of file geography_inout.c.

70{
71 if ( ! (
72 type == POINTTYPE ||
73 type == LINETYPE ||
74 type == POLYGONTYPE ||
75 type == MULTIPOINTTYPE ||
76 type == MULTILINETYPE ||
77 type == MULTIPOLYGONTYPE ||
78 type == COLLECTIONTYPE
79 ) )
80 {
81 ereport(ERROR, (
82 errcode(ERRCODE_INVALID_PARAMETER_VALUE),
83 errmsg("Geography type does not support %s", lwtype_name(type) )));
84
85 }
86}
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:122
#define MULTILINETYPE
Definition liblwgeom.h:120
#define LINETYPE
Definition liblwgeom.h:117
#define MULTIPOINTTYPE
Definition liblwgeom.h:119
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition liblwgeom.h:116
#define MULTIPOLYGONTYPE
Definition liblwgeom.h:121
#define POLYGONTYPE
Definition liblwgeom.h:118

References COLLECTIONTYPE, LINETYPE, lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, POINTTYPE, and POLYGONTYPE.

Referenced by geography_from_geometry(), and gserialized_geography_from_lwgeom().

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