PMA\libraries\gis\GISPolygon::scaleRow PHP Метод

scaleRow() публичный Метод

Scales each row.
public scaleRow ( string $spatial ) : array
$spatial string spatial data of a row
Результат array an array containing the min, max values for x and y coordinates
    public function scaleRow($spatial)
    {
        // Trim to remove leading 'POLYGON((' and trailing '))'
        $polygon = mb_substr($spatial, 9, mb_strlen($spatial) - 11);
        // If the polygon doesn't have an inner ring, use polygon itself
        if (mb_strpos($polygon, "),(") === false) {
            $ring = $polygon;
        } else {
            // Separate outer ring and use it to determine min-max
            $parts = explode("),(", $polygon);
            $ring = $parts[0];
        }
        return $this->setMinMax($ring, array());
    }