public void filter(Geometry g){
  if (g instanceof Polygon) {
    Polygon poly=(Polygon)g;
    linework.add(poly.getExteriorRing());
    for (int i=0; i < poly.getNumInteriorRing(); i++) {
      linework.add(poly.getInteriorRingN(i));
    }
  }
}

public void filter ( Geometry g ) { if ( g instanceof Polygon ) { Polygon poly = ( Polygon ) g ; linework . add ( poly . getExteriorRing ( ) ) ; for ( int i = 0 ; i < poly . getNumInteriorRing ( ) ; i ++ ) { linework . add ( poly . getInteriorRingN ( i ) ) ; } } }
filters out all linework for polygonal elements
