class GeoJSON::Coordinates

Overview

A Coordinates is a position in longitude, latitude, and (optionally) altitude.

This class corresponds to the GeoJSON Position.

Defined in:

geojson/coordinates.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(longitude : Float64, latitude : Float64, altitude : Float64 | Nil = nil) #

Creates a new Coordinates with the given longitude, latitude and altitude.


[View source]
def self.new(coordinates : Array(Float64)) #

Creates a new Coordinates with the given coordinates array.


[View source]
def self.new(parser : JSON::PullParser) #

Deserializes a Coordinates from the given JSON parser.


[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


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

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

[View source]
def altitude #

Gets this Coordinates' altitude.

Technically, this positional value is meant to be the height in meters above the WGS84 ellipsoid.


[View source]
def coordinates : Array(Float64) #

[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def latitude #

Gets this Coordinates' latitude in decimal degrees according to WGS84.


[View source]
def longitude #

Gets this Coordinates' longitude in decimal degrees according to WGS84.


[View source]
def to_json(*args, **options) #

[View source]
def to_json(*args, **options, &) #

[View source]