/** * {@inheritdoc} */ public function z() { if ($this->proxyGeometry === null) { $this->load(); } return $this->proxyGeometry->z(); }
/** * @param Point $point * @param boolean $is3D * @param boolean $isMeasured * @param integer $srid */ private function assertPointEmptyFactoryMethod(Point $point, $is3D, $isMeasured, $srid) { $this->assertTrue($point->isEmpty()); $this->assertNull($point->x()); $this->assertNull($point->y()); $this->assertNull($point->z()); $this->assertNull($point->m()); $this->assertSame($is3D, $point->is3D()); $this->assertSame($isMeasured, $point->isMeasured()); $this->assertSame($srid, $point->SRID()); }
/** * @param Point $point * * @return string */ private function writePoint(Point $point) { $result = $point->x() . ' ' . $point->y(); if (null !== ($z = $point->z())) { $result .= ' ' . $z; } if (null !== ($m = $point->m())) { $result .= ' ' . $m; } return $result; }
/** * @param Point $point * * @return string * * @throws GeometryIOException */ private function packPoint(Point $point) { if ($point->isEmpty()) { throw new GeometryIOException('Empty points have no WKB representation.'); } $binary = $this->packDouble($point->x()) . $this->packDouble($point->y()); if (null !== ($z = $point->z())) { $binary .= $this->packDouble($z); } if (null !== ($m = $point->m())) { $binary .= $this->packDouble($m); } return $binary; }