while (features.hasNext())
{
Feature feature = features.next();
// Generate the intersections for this feature.
Geometry intersections = intersectionGenerator.generateIntersections( feature );
if (intersections != null)
{
int numOfIntersections = intersections.getNumGeometries();
for (int i=0; i<numOfIntersections; i++)
{