class

GeoJSON::LineString

Inherits GeoJSON::Object < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

A LineString is a Geometry representing two or more points in geographic space connected consecutively by lines.

This class corresponds to the GeoJSON LineString.

Constructors

new(pull : JSON::PullParser)

A LineString is a Geometry representing two or more points in geographic space connected consecutively by lines.

This class corresponds to the GeoJSON LineString.

Source
new(coordinates : Array(Coordinates), *, bbox = nil)

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

Source
new(coordinates : Array(Point), *, bbox = nil)

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

Source
new(coordinates : Array(Array(Float64)), *, bbox = nil)

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

Source

Instance methods

[](*args, **options)

Gets the LineString vertex at the given index.

Source
[](*args, **options, &)

Gets the LineString vertex at the given index.

Source
bbox

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

Source
coordinates

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

Source
type

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

Source