if (areaMainCollection != null && areaHelperCollection != null) {
String geomName = areaHelperCollection.getSchema()
.getGeometryDescriptor().getName().toString();
Polygonizer polygonizer = new Polygonizer();
int inputEdgeCount = areaHelperCollection.size();
Collection lines = getLines(areaHelperCollection);
Collection nodedLines = lines;
nodedLines = nodeLines((List) lines);
for (Iterator it = nodedLines.iterator(); it.hasNext();) {
Geometry g = (Geometry) it.next();
polygonizer.add(g);
}
ArrayList polys = (ArrayList) polygonizer.getPolygons();
final SpatialIndex idx = new STRtree();
FeatureIterator mt = areaMainCollection.features();
try {
while (mt.hasNext()) {