You are here

protected function WktGenerator::buildWkt in Geofield 8

Generates a WKT string given a feature type and some coordinates.

Parameters

string $type: The Geo feature type.

string $value: The coordinates to include.

Return value

string The WKT value.

7 calls to WktGenerator::buildWkt()
WktGenerator::wktBuildLinestring in src/WktGenerator.php
Returns a WKT format linestring feature given an array of points.
WktGenerator::wktBuildMultipolygon in src/WktGenerator.php
Returns a WKT format multipolygon feature given an array of polygon points.
WktGenerator::wktBuildPoint in src/WktGenerator.php
Returns a WKT format point feature given a point.
WktGenerator::wktBuildPolygon in src/WktGenerator.php
Returns a WKT format polygon feature given an array of points.
WktGenerator::wktGenerateMultilinestring in src/WktGenerator.php
Returns a WKT format multilinestring feature.

... See full list

File

src/WktGenerator.php, line 81

Class

WktGenerator
Helper class that generates WKT format geometries.

Namespace

Drupal\geofield

Code

protected function buildWkt($type, $value) {
  return strtoupper($type) . ' (' . $value . ')';
}