Definition at line 2144 of file lwgeom.c.
2145{
2146 if (!geom) return;
2148 switch ( geom->
type )
2149 {
2151 {
2154 return;
2155 }
2159 {
2162
2165 return;
2166 }
2168 {
2170 if (!ply->
rings)
return;
2171
2172
2173 uint32_t i = 0;
2177 {
2178
2179 for (i = 0; i < ply->
nrings; i++)
2180 {
2182 }
2184 return;
2185 }
2186
2187
2188 uint32_t j = 1;
2189 for (i = 1; i < ply->
nrings; i++)
2190 {
2193
2194
2196 {
2197 ply->
rings[j++] = pa;
2198 }
2199 else
2200 {
2202 }
2203 }
2204
2206 return;
2207 }
2214 {
2216 uint32_t i, j = 0;
2217 if (!col->
geoms)
return;
2218 for (i = 0; i < col->
ngeoms; i++)
2219 {
2222
2223
2225 {
2227 continue;
2228 }
2229 col->
geoms[j++] = g;
2230 }
2232 return;
2233 }
2234 default:
2235 {
2236 lwerror(
"%s: Unsupported geometry type: %s", __func__,
2238 return;
2239 }
2240 }
2241}
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
void ptarray_free(POINTARRAY *pa)
void ptarray_grid_in_place(POINTARRAY *pa, const gridspec *grid)
Snap to grid.
void lwgeom_free(LWGEOM *lwgeom)
void lwgeom_grid_in_place(LWGEOM *geom, const gridspec *grid)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
References CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, LWCOLLECTION::geoms, LINETYPE, lwerror(), lwgeom_free(), lwgeom_grid_in_place(), lwgeom_is_empty(), lwtype_name(), MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, LWCOLLECTION::ngeoms, POINTARRAY::npoints, LWPOLY::nrings, LWPOINT::point, LWLINE::points, POINTTYPE, POLYGONTYPE, ptarray_free(), ptarray_grid_in_place(), LWPOLY::rings, TINTYPE, TRIANGLETYPE, and LWGEOM::type.
Referenced by do_grid_test(), lwgeom_grid(), lwgeom_grid_in_place(), mvt_geom(), and mvt_grid_and_validate_geos().