You are here

private function GeoJSON::arrayToLineString in geoPHP 8

Same name and namespace in other branches
  1. 7 geoPHP/lib/adapters/GeoJSON.class.php \GeoJSON::arrayToLineString()
2 calls to GeoJSON::arrayToLineString()
GeoJSON::arrayToMultiLineString in geoPHP/lib/adapters/GeoJSON.class.php
GeoJSON::arrayToPolygon in geoPHP/lib/adapters/GeoJSON.class.php

File

geoPHP/lib/adapters/GeoJSON.class.php, line 61

Class

GeoJSON
GeoJSON class : a geojson reader/writer.

Code

private function arrayToLineString($array) {
  $points = array();
  foreach ($array as $comp_array) {
    $points[] = $this
      ->arrayToPoint($comp_array);
  }
  return new LineString($points);
}