src/DataTypes/LineString.php
public static function fromArray(array $points)
    {
        $parsed_points = array_map(function($p){
            if( !is_array($p) or sizeof($p) != 2)
                throw new GeoSpatialException('Error: array of array containing lat, lon expected.');
            return new Point($p[0], $p[1]);
        }, $points);
        return new static($parsed_points);
    }
public static function fromArray(array $points)
    {
        $parsed_points = array_map(function($p){
            if( !is_array($p) or sizeof($p) != 2)
                throw new GeoSpatialException('Error: array of array containing lat, lon expected.');
            return new Point($p[0], $p[1]);
        }, $points);
        return new static($parsed_points);
    }
public static function fromArray ( array $ points ) { $ parsed_points = array_map ( function ( $ p ) { if ( ! is_array ( $ p ) or sizeof ( $ p ) != 2 ) throw new GeoSpatialException ( 'Error: array of array containing lat, lon expected.' ) ; return new Point ( $ p [ 0 ] , $ p [ 1 ] ) ; } , $ points ) ; return new static ( $ parsed_points ) ; }
A Linestring could be constructed with an array of points-array.

es. [[lat, lon], [lat, lon], [lat, lon], ..]
@param array $points
@return LineString
A Linestring could be constructed with an array of points - array .