return new GeometryCollection(null, new GeometryFactory());
}
// collect but don't clone, unfortunately we're already stuck with a list, by cloning
// we'd just increase memory usage
GeometryCollector collector = new GeometryCollector();
collector.setFactory(null);
collector.setMaxCoordinates(maxCoordinates);
for (Iterator it = geometries.iterator(); it.hasNext();) {
Geometry geometry = (Geometry) it.next();
collector.add(geometry);
}
return collector.collect();
}