You are here

private function WKT::parsePoint in geoPHP 7

Same name and namespace in other branches
  1. 8 geoPHP/lib/adapters/WKT.class.php \WKT::parsePoint()
2 calls to WKT::parsePoint()
WKT::parseLineString in geoPHP/lib/adapters/WKT.class.php
WKT::parseMultiPoint in geoPHP/lib/adapters/WKT.class.php

File

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

Class

WKT
WKT (Well Known Text) Adapter

Code

private function parsePoint($data_string) {
  $data_string = $this
    ->trimParens($data_string);

  // If it's marked as empty, then return an empty point
  if ($data_string == 'EMPTY') {
    return new Point();
  }
  $parts = explode(' ', $data_string);
  return new Point($parts[0], $parts[1]);
}