private void computeSplitValues(){
  float latMid=(bb.getLatMin() + bb.getLatMax()) / 2f;
  double width=(bb.getLonMax() - bb.getLonMin()) * Math.cos(latMid * Math.PI / 180.0);
  double height=bb.getLatMax() - bb.getLatMin();
  if (height > width) {
    splitAtLat=true;
    splitValue=latMid;
  }
 else {
    splitAtLat=false;
    splitValue=(bb.getLonMin() + bb.getLonMax()) / 2;
  }
}

private void computeSplitValues ( ) { float latMid = ( bb . getLatMin ( ) + bb . getLatMax ( ) ) / 2f ; double width = ( bb . getLonMax ( ) - bb . getLonMin ( ) ) * Math . cos ( latMid * Math . PI / 180.0 ) ; double height = bb . getLatMax ( ) - bb . getLatMin ( ) ; if ( height > width ) { splitAtLat = true ; splitValue = latMid ; } else { splitAtLat = false ; splitValue = ( bb . getLonMin ( ) + bb . getLonMax ( ) ) / 2 ; } }
splits the bounding box , so that the new boxes have equal size and look square - like as much as possible .
