isSimpleGeometryCollection method

bool isSimpleGeometryCollection(
  1. Geometry geom
)

Semantics for GeometryCollection is simple iff all components are simple.

@param geom @return true if the geometry is simple

Implementation

bool isSimpleGeometryCollection(Geometry geom) {
  for (int i = 0; i < geom.getNumGeometries(); i++) {
    Geometry comp = geom.getGeometryN(i);
    if (!computeSimple(comp)) return false;
  }
  return true;
}