You are here

private function WKT::parseMultiPoint in geoPHP 7

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

File

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

Class

WKT
WKT (Well Known Text) Adapter

Code

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

  // If it's marked as empty, then return an empty MutiPoint
  if ($data_string == 'EMPTY') {
    return new MultiPoint();
  }
  $parts = explode(',', $data_string);
  $points = array();
  foreach ($parts as $part) {
    $points[] = $this
      ->parsePoint($part);
  }
  return new MultiPoint($points);
}