PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ lwmpoly_free()

void lwmpoly_free ( LWMPOLY mpoly)

Definition at line 40 of file lwmpoly.c.

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

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

41 {
42  int i;
43  if ( ! mpoly ) return;
44  if ( mpoly->bbox )
45  lwfree(mpoly->bbox);
46 
47  for ( i = 0; i < mpoly->ngeoms; i++ )
48  if ( mpoly->geoms && mpoly->geoms[i] )
49  lwpoly_free(mpoly->geoms[i]);
50 
51  if ( mpoly->geoms )
52  lwfree(mpoly->geoms);
53 
54  lwfree(mpoly);
55 }
void lwfree(void *mem)
Definition: lwutil.c:214
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:79
LWPOLY ** geoms
Definition: liblwgeom.h:480
int ngeoms
Definition: liblwgeom.h:478
GBOX * bbox
Definition: liblwgeom.h:476
Here is the call graph for this function:
Here is the caller graph for this function: