}
} else if (geom instanceof MultiPrimitiveImpl) {
positions = new HashSet<PointImpl>();
Iterator<? extends Primitive> iterator = ((MultiPrimitiveImpl)geom).getElements().iterator();
while (iterator.hasNext()) {
PrimitiveImpl prim = ((PrimitiveImpl)iterator.next());
// if this is a point, it has no boundary so just add the point
if (prim instanceof PointImpl) {
positions.add(prim);
}
else {
// this is not a point, so get its convexhull and add those
// points to this hull
Geometry hull = prim.getConvexHull();
if (hull instanceof CurveImpl) {
CurveImpl curve = (CurveImpl) prim.getConvexHull();
positions.addAll( ((CurveImpl)curve).asDirectPositions() );
}
else if (hull instanceof SurfaceImpl) {
SurfaceImpl surface = (SurfaceImpl) prim.getConvexHull();
positions.addAll( ((RingImplUnsafe)((SurfaceImpl)surface).getBoundary().getExterior()).asDirectPositions() );
}
/*
// this is not a point, so get its boundary and add its