protected function WktGenerator::buildLinestring in Geofield 8
Builds a Linestring format string from an array of point components.
Parameters
array $points: Array containing the linestring component's coordinates.
Return value
string The structured linestring coordinates.
2 calls to WktGenerator::buildLinestring()
- WktGenerator::generateMultilinestring in src/
WktGenerator.php - Generates a multilinestring coordinates.
- WktGenerator::wktBuildLinestring in src/
WktGenerator.php - Returns a WKT format linestring feature given an array of points.
File
- src/
WktGenerator.php, line 193
Class
- WktGenerator
- Helper class that generates WKT format geometries.
Namespace
Drupal\geofieldCode
protected function buildLinestring(array $points) {
$components = [];
foreach ($points as $point) {
$components[] = $this
->buildPoint($point);
}
return implode(", ", $components);
}