public function WktTrait::reduceWkt in farmOS 2.x
Reduce a WKT geometry.
Parameters
string $wkt: The geometry in WKT format.
Return value
string The reduced geometry in WKT format.
2 calls to WktTrait::reduceWkt()
- LocationAPITest::testApiAssetPostResponse in modules/
core/ location/ tests/ src/ Functional/ LocationAPITest.php - Test creating an asset via the API.
- LocationTest::setUp in modules/
core/ location/ tests/ src/ Kernel/ LocationTest.php
File
- modules/
core/ geo/ src/ Traits/ WktTrait.php, line 19
Class
- WktTrait
- Provides methods to work with WKT.
Namespace
Drupal\farm_geo\TraitsCode
public function reduceWkt(string $wkt) {
$geometry = \geoPHP::load($wkt, 'wkt');
$geometry = \geoPHP::geometryReduce($geometry);
return $geometry
->out('wkt');
}