You are here

public function WktGenerator::wktGeneratePolygon in Geofield 8

Returns a WKT format polygon feature.

Parameters

array $start: The starting point. If not provided, will be randomly generated.

int $segments: Number of segments. If not provided, will be randomly generated.

Return value

string The WKT polygon feature.

Overrides WktGeneratorInterface::wktGeneratePolygon

File

src/WktGenerator.php, line 257

Class

WktGenerator
Helper class that generates WKT format geometries.

Namespace

Drupal\geofield

Code

public function wktGeneratePolygon(array $start = NULL, $segments = NULL) {
  return $this
    ->wktBuildPolygon($this
    ->generatePolygon($start, $segments));
}