private void buildSubgraphs(List subgraphList,PolygonBuilder polyBuilder){
  List processedGraphs=new ArrayList();
  for (Iterator i=subgraphList.iterator(); i.hasNext(); ) {
    BufferSubgraph subgraph=(BufferSubgraph)i.next();
    Coordinate p=subgraph.getRightmostCoordinate();
    SubgraphDepthLocater locater=new SubgraphDepthLocater(processedGraphs);
    int outsideDepth=locater.getDepth(p);
    subgraph.computeDepth(outsideDepth);
    subgraph.findResultEdges();
    processedGraphs.add(subgraph);
    polyBuilder.add(subgraph.getDirectedEdges(),subgraph.getNodes());
  }
}

private void buildSubgraphs ( List subgraphList , PolygonBuilder polyBuilder ) { List processedGraphs = new ArrayList ( ) ; for ( Iterator i = subgraphList . iterator ( ) ; i . hasNext ( ) ; ) { BufferSubgraph subgraph = ( BufferSubgraph ) i . next ( ) ; Coordinate p = subgraph . getRightmostCoordinate ( ) ; SubgraphDepthLocater locater = new SubgraphDepthLocater ( processedGraphs ) ; int outsideDepth = locater . getDepth ( p ) ; subgraph . computeDepth ( outsideDepth ) ; subgraph . findResultEdges ( ) ; processedGraphs . add ( subgraph ) ; polyBuilder . add ( subgraph . getDirectedEdges ( ) , subgraph . getNodes ( ) ) ; } }
completes the building of the input subgraphs by depth - labelling them , and adds them to the polygonbuilder . the subgraph list must be sorted in rightmost - coordinate order .
