public function setZ(float $z): self {
        if (!$this->is3D()) {
            throw GeometryException::coordinateNotSupported('z');
        }
        $this->coordinates[self::Z] = $this->gf
                ->getPrecisionModel()
                ->makePrecise($z);
        return $this;
    }