mirror of
https://0xacab.org/radar/radar-wp.git
synced 2025-04-21 07:16:29 +02:00
Initial import.
This commit is contained in:
commit
86383280c9
428 changed files with 68738 additions and 0 deletions
27
vendor/phayes/geophp/lib/adapters/EWKT.class.php
vendored
Normal file
27
vendor/phayes/geophp/lib/adapters/EWKT.class.php
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* EWKT (Extended Well Known Text) Adapter
|
||||
*/
|
||||
class EWKT extends WKT
|
||||
{
|
||||
|
||||
/**
|
||||
* Serialize geometries into an EWKT string.
|
||||
*
|
||||
* @param Geometry $geometry
|
||||
*
|
||||
* @return string The Extended-WKT string representation of the input geometries
|
||||
*/
|
||||
public function write(Geometry $geometry) {
|
||||
$srid = $geometry->SRID();
|
||||
$wkt = '';
|
||||
if ($srid) {
|
||||
$wkt = 'SRID=' . $srid . ';';
|
||||
$wkt .= $geometry->out('wkt');
|
||||
return $wkt;
|
||||
}
|
||||
else {
|
||||
return $geometry->out('wkt');
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue