PostGIS  2.1.10dev-r@@SVN_REVISION@@
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(), 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:190
void lwpoly_free(LWPOLY *poly)
Definition: lwpoly.c:79
LWPOLY ** geoms
Definition: liblwgeom.h:452
int ngeoms
Definition: liblwgeom.h:450
GBOX * bbox
Definition: liblwgeom.h:448

Here is the call graph for this function:

Here is the caller graph for this function: