You are here

protected function GeoField::toWtk in Geofield 8

Convert geometric data to WTK format.

Parameters

string $geom: The geometric data.

Return value

string The geo data in WKT format.

1 call to GeoField::toWtk()
GeoField::transform in src/Plugin/migrate/process/GeoField.php
Performs the associated process.

File

src/Plugin/migrate/process/GeoField.php, line 74

Class

GeoField
Maps D7 geofield values to new the geofield values.

Namespace

Drupal\geofield\Plugin\migrate\process

Code

protected function toWtk($geom) {
  $geometry = $this->geoPhpWrapper
    ->load($geom);
  if ($geometry instanceof \Geometry) {
    return $geometry
      ->out('wkt');
  }
  return '';
}