class EWKT in geoPHP 7
Same name and namespace in other branches
EWKT (Extended Well Known Text) Adapter
Hierarchy
- class \GeoAdapter
Expanded class hierarchy of EWKT
1 string reference to 'EWKT'
- geoPHP::getAdapterMap in geoPHP/
geoPHP.inc
File
- geoPHP/
lib/ adapters/ EWKT.class.php, line 5
View source
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');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EWKT:: |
public | function |
Serialize geometries into an EWKT string. Overrides WKT:: |
|
WKT:: |
protected | function | ||
WKT:: |
protected | function | ||
WKT:: |
public | function | Extract geometry to a WKT string | |
WKT:: |
protected | function | ||
WKT:: |
private | function | ||
WKT:: |
private | function | ||
WKT:: |
private | function | ||
WKT:: |
private | function | ||
WKT:: |
private | function | ||
WKT:: |
private | function | ||
WKT:: |
private | function | ||
WKT:: |
public | function |
Read WKT string into geometry objects Overrides GeoAdapter:: |
|
WKT:: |
protected | function | Trim the parenthesis and spaces |