You are here

protected function WKT::getDataString in geoPHP 7

Same name and namespace in other branches
  1. 8 geoPHP/lib/adapters/WKT.class.php \WKT::getDataString()
1 call to WKT::getDataString()
WKT::read in geoPHP/lib/adapters/WKT.class.php
Read WKT string into geometry objects

File

geoPHP/lib/adapters/WKT.class.php, line 169

Class

WKT
WKT (Well Known Text) Adapter

Code

protected function getDataString($wkt) {
  $first_paren = strpos($wkt, '(');
  if ($first_paren !== FALSE) {
    return substr($wkt, $first_paren);
  }
  elseif (strstr($wkt, 'EMPTY')) {
    return 'EMPTY';
  }
  else {
    return FALSE;
  }
}