class GeoJSON::MultiLineString

Overview

A MultiLineString is a Geometry representing several LineStrings.

This class corresponds to the GeoJSON MultiLineString.

Defined in:

geojson/multi_line_string.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 MultiLineString is a Geometry representing several LineStrings.

This class corresponds to the GeoJSON MultiLineString.


def self.new(coordinates : Array(LineString), *, bbox = nil) #

Create a new MultiLineString with the given coordinates and optional bounding box bbox.


def self.new(coordinates : Array(Array(Array(Float64))), *, bbox = nil) #

Create a new MultiLineString with the given coordinates and optional bounding box bbox.


Instance Method Detail

def <<(line_string : Array(LineString)) #

Adds the given line_string to this MultiLineString.


def <<(coordinate : Array(Array(Float64))) #

Adds the given coordinate to this MultiLineString.


def [](*args, **options) #

Gets the LineString at the given index.


def [](*args, **options, &) #

Gets the LineString at the given index.


def bbox #
Description copied from class GeoJSON::Object

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


def coordinates : Array(Array(GeoJSON::Coordinates)) #

Returns an array of this MultiLineString's coordinates.


def type : String #

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