class GeoJSON::FeatureCollection

Overview

A FeatureCollection represents a GeoJSON FeatureCollection object and contains one or more Features.

Defined in:

geojson/feature_collection.cr

Constructors

Instance Method Summary

Instance methods inherited from class GeoJSON::Object

bbox bbox, type : String type

Constructor methods inherited from class GeoJSON::Object

new(pull : JSON::PullParser) new

Constructor Detail

def self.new(pull : JSON::PullParser) #

A FeatureCollection represents a GeoJSON FeatureCollection object and contains one or more Features.


def self.new(features : Array(Feature), *, bbox = nil) #

Creates a new FeatureCollection with the given features.


Instance Method Detail

def bbox #
Description copied from class GeoJSON::Object

Calculates the bounding box for any GeoJSON object, including FeatureCollection.


def features : Array(Feature) #

Returns this FeatureCollections array of features.


def type : String #

Gets this FeatureCollection's GeoJSON type ("FeatureCollection")