}
private static Geometry readGeometriesFromShapefile(String filename, GeometryFactory geomFact)
throws Exception
{
Shapefile shpfile = new Shapefile(new FileInputStream(filename));
shpfile.readStream(geomFact);
List geomList = new ArrayList();
do {
Geometry geom = shpfile.next();
if (geom == null)
break;
geomList.add(geom);
} while (true);