PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ lwmpoly_free()

void lwmpoly_free ( LWMPOLY mpoly)

Definition at line 53 of file lwmpoly.c.

References LWMPOLY::bbox, LWMPOLY::geoms, lwfree(), lwpoly_free(), and LWMPOLY::ngeoms.

Referenced by geography_centroid(), lwgeom_free(), RASTER_getPolygon(), rt_raster_geos_spatial_relationship(), and test_raster_surface().

54 {
55  uint32_t i;
56  if ( ! mpoly ) return;
57  if ( mpoly->bbox )
58  lwfree(mpoly->bbox);
59 
60  for ( i = 0; i < mpoly->ngeoms; i++ )
61  if ( mpoly->geoms && mpoly->geoms[i] )
62  lwpoly_free(mpoly->geoms[i]);
63 
64  if ( mpoly->geoms )
65  lwfree(mpoly->geoms);
66 
67  lwfree(mpoly);
68 }
void lwfree(void *mem)
Definition: lwutil.c:244
uint32_t ngeoms
Definition: liblwgeom.h:496
unsigned int uint32_t
Definition: uthash.h:78
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:175
LWPOLY ** geoms
Definition: liblwgeom.h:498
GBOX * bbox
Definition: liblwgeom.h:494
Here is the call graph for this function:
Here is the caller graph for this function: