lib/turf/helpers.rb
# Takes one or more Features and creates a FeatureCollection.
# @see https://turfjs.org/docs/#featureCollection
# @param features [Array<Feature>] input features
# @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 [FeatureCollection] FeatureCollection of Features
Takes one or more Features and creates a FeatureCollection.
Takes one or more Features and creates a FeatureCollection .
def feature_collection(features, bbox: nil, id: nil)
    fc = { type: "FeatureCollection" }
    fc[:id] = options[:id] if id
    fc[:bbox] = options[:bbox] if bbox
    fc[:features] = features
    fc
  end
def feature_collection ( features , bbox : nil , id : nil ) fc = { type : "FeatureCollection" } fc [ :id ] = options [ :id ] if id fc [ :bbox ] = options [ :bbox ] if bbox fc [ :features ] = features fc end
Takes one or more Features and creates a FeatureCollection.
Takes one or more Features and creates a FeatureCollection .
FeatureCollection of Features
FeatureCollection of Features
FeatureCollection
features
None
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