/**
  * 
  * 
  * 
  * 
  *
  */
 public function getBbox()
 {
     if (!is_array($this->featureArray) || count($this->featureArray) === 0) {
         return null;
     }
     $bBoxArray = array();
     for ($i = 0; $i < count($this->featureArray); $i++) {
         $currentBbox = $this->featureArray[$i]->getBbox();
         if (!is_null($currentBbox)) {
             $bBoxArray[] = $currentBbox;
         }
     }
     return Mapbender_bbox::union($bBoxArray);
 }
 public function getBbox()
 {
     $bboxArray = array();
     for ($i = 0; $i < count($pointArray); $i++) {
         $p = new Mapbender_point($this->pointArray[$i]["x"], $this->pointArray[$i]["y"], $this->srs);
         $bboxArray[] = new Mapbender_bbox($p, $p, $this->srs);
     }
     return Mapbender_bbox::union($bboxArray);
 }
 /**
  * Computes a new bounding box, bbox1 UNION bbox2
  */
 static function union($bboxArray)
 {
     if (count($bboxArray) == 1) {
         return array_pop($bboxArray);
     } elseif (count($bboxArray) >= 2) {
         $bbox1 = array_pop($bboxArray);
         $bbox2 = Mapbender_bbox::union($bboxArray);
         if (!($bbox1 != null && $bbox1->isValid()) && !($bbox2 != null && $bbox2->isValid())) {
             $e = new mb_exception("Mapbender_bbox: union: both parameters invalid!");
             return null;
         } elseif (!($bbox1 != null && $bbox1->isValid()) && ($bbox2 != null && $bbox2->isValid())) {
             $e = new mb_exception("Mapbender_bbox: union: first parameter invalid!");
             return $bbox2;
         } elseif ($bbox1 != null && $bbox1->isValid() && !($bbox2 != null && $bbox2->isValid())) {
             $e = new mb_exception("Mapbender_bbox: union: second parameter invalid!");
             return $bbox1;
         } else {
             if ($bbox1->epsg == $bbox2->epsg) {
                 $e = new mb_notice("Mapbender_bbox: union: bbox1 is: " . $bbox1);
                 $e = new mb_notice("Mapbender_bbox: union: bbox2 is: " . $bbox2);
                 $e = new mb_notice("Mapbender_bbox: union: merging bbox1 and bbox2...");
                 return new Mapbender_bbox(Mapbender_point::min($bbox1->min, $bbox2->min), Mapbender_point::max($bbox1->max, $bbox2->max), $bbox1->epsg);
             } else {
                 $e = new mb_exception("Mapbender_bbox: cannot process union with different EPSG codes");
             }
         }
     } else {
         $e = new mb_exception("Mapbender_bbox: Invalid parameter (Not an array)!");
     }
     return null;
 }