bool
AbstractPreparedPolygonContains::isSingleShell( const geom::Geometry & geom)
{
    // handles single-element MultiPolygons, as well as Polygons
    if ( geom.getNumGeometries() != 1)
        return false;

    const geom::Polygon * poly = (Polygon *)geom.getGeometryN( 0);

    int numHoles = poly->getNumInteriorRing();
    return (numHoles == 0);
}
bool 
AbstractPreparedPolygonContains::isSingleShell(const geom::Geometry& geom)
{
	// handles single-element MultiPolygons, as well as Polygons
	if (geom.getNumGeometries() != 1)
    {
		return false;
    }
	
    const geom::Geometry* g = geom.getGeometryN(0);
	const geom::Polygon* poly = static_cast<const Polygon*>(g);

    std::size_t numHoles = poly->getNumInteriorRing();
	return (0 == numHoles);
}