private Geometry readFeatureCollection(String s) throws ParseException {
  Pattern p=Pattern.compile("\\{[^\\{\\}]+?\\}");
  Matcher m=p.matcher(s);
  List geoms=new ArrayList();
  while (true) {
    boolean isFound=m.find();
    if (!isFound)     break;
    String substr=m.group();
    if (isGeometry(substr)) {
      geoms.add(readGeometry(substr));
    }
  }
  return geomFact.createGeometryCollection(GeometryFactory.toGeometryArray(geoms));
}

private Geometry readFeatureCollection ( String s ) throws ParseException { Pattern p = Pattern . compile ( "\\{[^\\{\\}]+?\\}" ) ; Matcher m = p . matcher ( s ) ; List geoms = new ArrayList ( ) ; while ( true ) { boolean isFound = m . find ( ) ; if ( ! isFound ) break ; String substr = m . group ( ) ; if ( isGeometry ( substr ) ) { geoms . add ( readGeometry ( substr ) ) ; } } return geomFact . createGeometryCollection ( GeometryFactory . toGeometryArray ( geoms ) ) ; }
extracts all geometry object substrings and reads them
