Returns the WKB representation of this geometry.

@noproxy

@return string
969
public function asBinary() : string
    {
        static $wkbWriter;

        if ($wkbWriter === null) {
            $wkbWriter = new WKBWriter();
        }

        return $wkbWriter->write($this);
    }
952233
public function toString() : string
    {
        $coordinates = $this->getCoordinatesArray();
        $string = "outerloop\n";
        foreach ($coordinates as $coordinate) {
            $string .= "    vertex " . implode(" ", $coordinate) . "\n";
        }
        $string .= "endloop";

        return $string;
    }
1172822
public function getImageDimensions()
    {
        $dimension = $this->getData()->chained->getComponent()->_getSetting('dimension');
        if ($this->getData()->chained->getComponent()->getRow()->use_crop) {
            $parentDimensions = $this->_getImageEnlargeComponent()->getImageDimensions();
            $dimension['crop'] = $parentDimensions['crop'];
        }
        $data = $this->getImageData();
        return Kwf_Media_Image::calculateScaleDimensions($data['file'], $dimension);
    }
601079
public function toOntology() {
	    $inResources = array();
	    $outResources = is_null($this->outParameter)
	       ? array()
	       : $this->outParameter->toOntology();
	    foreach ($this->inParameters as $param) {
	        $inResources[] = $param->toOntology();
	    }
	    $serviceCallClass = $this->getClass( WfEngineOntology::CLASS_URI_CALL_OF_SERVICES);
	    $resource = $serviceCallClass->createInstanceWithProperties(array(
            OntologyRdfs::RDFS_LABEL => 'serviceCall',
			WfEngineOntology::PROPERTY_CALL_OF_SERVICES_SERVICE_DEFINITION    => $this->serviceDefinitionId,
			WfEngineOntology::PROPERTY_CALL_OF_SERVICES_ACTUAL_PARAMETER_IN    => $inResources,
			WfEngineOntology::PROPERTY_CALL_OF_SERVICES_ACTUAL_PARAMETER_OUT   => $outResources,
			WfEngineOntology::PROPERTY_CALL_OF_SERVICES_WIDTH                => '100',
			WfEngineOntology::PROPERTY_CALL_OF_SERVICES_HEIGHT               => '100'
        ));
	         
	    return $resource; 
	}
946858
public function getHomeLink()
    {
        if (($sValue = $this->getViewConfigParam('homeLink')) === null) {
            $sValue = null;

            $blAddStartCl = $this->isStartClassRequired();
            if ($blAddStartCl) {
                $baseLanguage = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
                $sValue = \OxidEsales\Eshop\Core\Registry::getSeoEncoder()->getStaticUrl($this->getSelfLink() . 'cl=start', $baseLanguage);
                $sValue = \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->appendUrl(
                    $sValue,
                    \OxidEsales\Eshop\Core\Registry::getUtilsUrl()->getBaseAddUrlParams()
                );
                $sValue = getStr()->preg_replace('/(\?|&(amp;)?)$/', '', $sValue);
            }

            if (!$sValue) {
                $sValue = getStr()->preg_replace('#index.php\??$#', '', $this->getSelfLink());
            }

            $this->setViewConfigParam('homeLink', $sValue);
        }

        return $sValue;
    }
341262
public function getAsManualSqlColumn()
    {
        if ($this->strTableName) {
            return $this->strTableName . '.' . $this->strName;
        } else {
            if (($this->objParentNode) && ($this->objParentNode->strTableName)) {
                return $this->objParentNode->strTableName . '.' . $this->strName;
            } else {
                return $this->strName;
            }
        }
    }
1271161
public function getMsgAlternativeBody()
    {
        if (
            !empty($this->_parts)
            && (
                $this->getHeaders()->getMessageContentType() == Content::CT_MULTIPART_ALTERNATIVE
                || $this->getHeaders()->getMessageContentType() == Content::CT_MULTIPART_MIXED
            )
        ) {
            foreach ($this->_parts as $part) {
                if ($part->contentType == Content::CT_TEXT_PLAIN) {
                    return $part->getContentDecode();
                }
            }
        }

        return null;
    }
578088
private function readGeometry()
    {
        $this->srid      = null;

        try {
            $this->byteOrder = $this->readByteOrder();
            $this->type      = $this->readType();

            if ($this->hasFlag($this->type, self::WKB_FLAG_SRID)) {
                $this->srid = $this->readSrid();
            }

            $this->dimensions = $this->getDimensions($this->type);
            $this->pointSize  = 2 + strlen($this->getDimensionType($this->dimensions));

            $typeName = $this->getTypeName($this->type);

            return array(
                'type'      => $typeName,
                'srid'      => $this->srid,
                'value'     => $this->$typeName(),
                'dimension' => $this->getDimensionType($this->dimensions)
            );
        } catch (ExceptionInterface $e) {
            throw new $e($e->getMessage() . ' at byte ' . $this->reader->getLastPosition(), $e->getCode(), $e->getPrevious());
        }
    }
599
protected function readGeometry(WKBBuffer $buffer, int $srid) : Geometry
    {
        $buffer->readByteOrder();

        $this->readGeometryHeader($buffer, $geometryType, $hasZ, $hasM, $srid);

        $cs = new CoordinateSystem($hasZ, $hasM, $srid);

        switch ($geometryType) {
            case Geometry::POINT:
                return $this->readPoint($buffer, $cs);

            case Geometry::LINESTRING:
                return $this->readLineString($buffer, $cs);

            case Geometry::CIRCULARSTRING:
                return $this->readCircularString($buffer, $cs);

            case Geometry::COMPOUNDCURVE:
                return $this->readCompoundCurve($buffer, $cs);

            case Geometry::POLYGON:
                return $this->readPolygon($buffer, $cs);

            case Geometry::CURVEPOLYGON:
                return $this->readCurvePolygon($buffer, $cs);

            case Geometry::MULTIPOINT:
                return $this->readMultiPoint($buffer, $cs);

            case Geometry::MULTILINESTRING:
                return $this->readMultiLineString($buffer, $cs);

            case Geometry::MULTIPOLYGON:
                return $this->readMultiPolygon($buffer, $cs);

            case Geometry::GEOMETRYCOLLECTION:
                return $this->readGeometryCollection($buffer, $cs);

            case Geometry::POLYHEDRALSURFACE:
                return $this->readPolyhedralSurface($buffer, $cs);

            case Geometry::TIN:
                return $this->readTIN($buffer, $cs);

            case Geometry::TRIANGLE:
                return $this->readTriangle($buffer, $cs);
        }

        throw GeometryIOException::unsupportedWKBType($geometryType);
    }
1332036
public function getSqlSegment()
    {
        if (!empty($this->sqlSegment)) {
            return $this->sqlSegment;
        }

        if ($this->dbTableName && $this->columnName) {
            return $this->dbTableName . '.' . $this->columnName;
        }
    }
215591
public static function getOuterShapes()
    {
        if (self::$outerShapes === null) {
            self::$outerShapes = self::createOuterShapes();
        }
        return self::$outerShapes;
    }
1193367
private function getBaseFormat()
    {
        if ($this->parentCommand) {
            return $this->parentCommand->getArgsFormat();
        }

        if ($this->application) {
            return $this->application->getGlobalArgsFormat();
        }

        return null;
    }
820725
public function getLocalForeignMapping()
    {
        $h = array();
        for ($i = 0, $size = count($this->localColumns); $i < $size; $i++) {
            $h[$this->localColumns[$i]] = $this->foreignColumns[$i];
        }

        return $h;
    }
350790
protected function encode(): string
    {
        $bitmap = null;
        $lastRow = null;

        for ($y = 0; $y < $this->height; $y++) {
            $bits = null;

            for ($x = 0; $x < $this->width; $x++) {
                $bits .= $this->decoder->getBitAt($x, $y);
            }

            $bytes = str_split($bits, 8);
            $bytes[] = str_pad(array_pop($bytes), 8, '0');

            $row = null;

            foreach ($bytes as $byte) {
                $row .= sprintf('%02X', bindec($byte));
            }

            $bitmap .= $this->compress($row, $lastRow);
            $lastRow = $row;
        }

        return $bitmap;
    }
809439
public function svg()
    {
        $str_g = '';

        $bg = new Primitive\Square();
        $bg->point(0, 0)->size(self::SIZE);
        $bg->color($this->bg());

        $str_g .= $bg->svg();

        foreach ($this->arr_primitives as $p) {
            $str_g .= $p->svg();
        }

        return $str_g;
    }
555392
public function jsonSerialize()
    {
        $bounds = $this->getBounds();

        // No rectangle support of geojson, so create a polygon
        return array(
            'type'        => 'Polygon',
            'coordinates' => array(
                array(
                    $bounds->getNorthEast()->toGeoJson(),
                    $bounds->getNorthWest()->toGeoJson(),
                    $bounds->getSouthWest()->toGeoJson(),
                    $bounds->getSouthEast()->toGeoJson()
                )
            )
        );
    }
1019933
public function getRootNamespace ()
	{
		
		$arr		= explode ('\\', $this->get ('namespace'));
		$table		= explode ('_', $this->get ('table'));
		$ns			= [];
		
		foreach ($arr as $nsSegment)
		{
			$tableSegment	= array_shift ($table);
			if (strtolower ($nsSegment) != strtolower ($tableSegment))
			{
				$ns[]	= $nsSegment;
				array_unshift ($table, $tableSegment);
			}
		}
		
		$namespace	= join ('\\', $ns) . '\\';
		
		return $namespace;
	}