/**
  * Constructor
  *
  * @param array $positions The Point array
  */
 public function __construct(array $positions)
 {
     if (count($positions) > 1) {
         parent::__construct($positions);
     } else {
         throw new Exception("Linestring with less than two points");
     }
 }
 public function __construct($components)
 {
     $first = $components[0];
     $last = end($components);
     if (!$first->equals($last)) {
         throw new InvalidFeature(__CLASS__, "LinearRing must be closed");
     }
     parent::__construct($components);
 }
Exemple #3
0
 public function __construct($components = array())
 {
     $this->componentTypes = "point";
     parent::__construct($components);
 }