private void computeLabelsFromDepths(){
  for (Iterator it=edgeList.iterator(); it.hasNext(); ) {
    Edge e=(Edge)it.next();
    Label lbl=e.getLabel();
    Depth depth=e.getDepth();
    if (!depth.isNull()) {
      depth.normalize();
      for (int i=0; i < 2; i++) {
        if (!lbl.isNull(i) && lbl.isArea() && !depth.isNull(i)) {
          if (depth.getDelta(i) == 0) {
            lbl.toLine(i);
          }
 else {
            Assert.isTrue(!depth.isNull(i,Position.LEFT),"depth of LEFT side has not been initialized");
            lbl.setLocation(i,Position.LEFT,depth.getLocation(i,Position.LEFT));
            Assert.isTrue(!depth.isNull(i,Position.RIGHT),"depth of RIGHT side has not been initialized");
            lbl.setLocation(i,Position.RIGHT,depth.getLocation(i,Position.RIGHT));
          }
        }
      }
    }
  }
}

private void computeLabelsFromDepths ( ) { for ( Iterator it = edgeList . iterator ( ) ; it . hasNext ( ) ; ) { Edge e = ( Edge ) it . next ( ) ; Label lbl = e . getLabel ( ) ; Depth depth = e . getDepth ( ) ; if ( ! depth . isNull ( ) ) { depth . normalize ( ) ; for ( int i = 0 ; i < 2 ; i ++ ) { if ( ! lbl . isNull ( i ) && lbl . isArea ( ) && ! depth . isNull ( i ) ) { if ( depth . getDelta ( i ) == 0 ) { lbl . toLine ( i ) ; } else { Assert . isTrue ( ! depth . isNull ( i , Position . LEFT ) , "depth of LEFT side has not been initialized" ) ; lbl . setLocation ( i , Position . LEFT , depth . getLocation ( i , Position . LEFT ) ) ; Assert . isTrue ( ! depth . isNull ( i , Position . RIGHT ) , "depth of RIGHT side has not been initialized" ) ; lbl . setLocation ( i , Position . RIGHT , depth . getLocation ( i , Position . RIGHT ) ) ; } } } } } }
update the labels for edges according to their depths . for each edge , the depths are first normalized . then , if the depths for the edge are equal , this edge must have collapsed into a line edge . if the depths are not equal , update the label with the locations corresponding to the depths ( i . e . a depth of 0 corresponds to a location of exterior , a depth of 1 corresponds to interior )
