89{
91
92
94
95
97
98
101 {
102 ereport(NOTICE, (
103 errmsg_internal("Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY" ))
104 );
105 }
106
107
108 if ( (
int)lwgeom->
srid <= 0 )
110
111
112
113
114
115 g_ser = geography_serialize(lwgeom);
116
117
118 if ( geog_typmod >= 0 )
119 {
121 POSTGIS_DEBUG(3, "typmod and geometry were consistent");
122 }
123 else
124 {
125 POSTGIS_DEBUG(3, "typmod was -1");
126 }
127
128 return g_ser;
129}
GSERIALIZED * postgis_valid_typmod(GSERIALIZED *gser, int32_t typmod)
Check the consistency of the metadata we want to enforce in the typmod: srid, type and dimensionality...
void geography_valid_type(uint8_t type)
The geography type only support POINT, LINESTRING, POLYGON, MULTI* variants of same,...
void lwgeom_set_geodetic(LWGEOM *geom, int value)
Set the FLAGS geodetic bit on geometry an all sub-geometries and pointlists.
int lwgeom_force_geodetic(LWGEOM *geom)
Force coordinates of LWGEOM into geodetic range (-180, -90, 180, 90)
int lwgeom_nudge_geodetic(LWGEOM *geom)
Gently move coordinates of LWGEOM if they are close enough into geodetic range.
#define LW_TRUE
Return types for functions with status returns.