You are here

protected function WktGenerator::buildMultipolygon in Geofield 8

Builds a multipolygon coordinates.

Parameters

array $rings: The array of polygon arrays.

Return value

string The structured multipolygon coordinates.

1 call to WktGenerator::buildMultipolygon()
WktGenerator::wktBuildMultipolygon in src/WktGenerator.php
Returns a WKT format multipolygon feature given an array of polygon points.

File

src/WktGenerator.php, line 321

Class

WktGenerator
Helper class that generates WKT format geometries.

Namespace

Drupal\geofield

Code

protected function buildMultipolygon(array $rings) {
  $poly = [];
  foreach ($rings as $ring) {
    $poly[] = $this
      ->buildPolygon($ring);
  }
  return $this
    ->buildMultiCoordinates($poly);
}