public function close()
    {
        if($this->numberOfPoints <= 2)
        {
            throw new LogicException('Boundary must have at last three points.');
        }

        $this->points[$this->numberOfPoints] = $this->getFirstPoint();
        $this->numberOfPoints++;

        $this->closed = true;
    }