lib/turf/helpers.rb
def line_string(coordinates, properties: {}, bbox: nil, id: nil)
    if coordinates.size < 2
      raise Error, "coordinates must be an array of two or more positions"
    end

    geom = {
      type: "LineString",
      coordinates: coordinates
    }
    feature(geom, properties: properties, bbox: bbox, id: id)
  end
# Creates a LineString Feature from an Array of Positions.
# @see https://turfjs.org/docs/#lineString
# @param coordinates [Array<Array<number>>] an array of Positions
# @param properties [Hash] an Hash of key-value pairs to add as properties
# @param bbox [Array<number>] Bounding Box Array [west, south, east, north] associated with the Feature
# @param id [string|number] Identifier associated with the Feature
# @return [Feature<LineString>] LineString Feature
Creates a LineString Feature from an Array of Positions.
Creates a LineString Feature from an Array of Positions .
def line_string(coordinates, properties: {}, bbox: nil, id: nil)
    if coordinates.size < 2
      raise Error, "coordinates must be an array of two or more positions"
    end
    geom = {
      type: "LineString",
      coordinates: coordinates
    }
    feature(geom, properties: properties, bbox: bbox, id: id)
  end
def line_string ( coordinates , properties : { } , bbox : nil , id : nil ) if coordinates . size < 2 raise Error , "coordinates must be an array of two or more positions" end geom = { type : "LineString" , coordinates : coordinates } feature ( geom , properties : properties , bbox : bbox , id : id ) end
Creates a LineString Feature from an Array of Positions.
Creates a LineString Feature from an Array of Positions .
None
Feature<LineString>
coordinates
an array of Positions
an array of Positions
properties
an Hash of key-value pairs to add as properties
an Hash of key - value pairs to add as properties
bbox
Bounding Box Array [west, south, east, north] associated with the Feature
Bounding Box Array [ west south east north ] associated with the Feature
id
Identifier associated with the Feature
Identifier associated with the Feature
see
None