class GeoJSON::Point

Overview

A Point is a Geometry representing a single Position in geographic space.

This class corresponds to the GeoJSON Point.

Defined in:

geojson/point.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(longitude, latitude, altitude = nil, bbox = nil) #

Creates a new Point at the given longitude, latitude, and optional altitude, and with optional bounding box bbox.


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

A Point is a Geometry representing a single Position in geographic space.

This class corresponds to the GeoJSON Point.


def self.new(coordinates : GeoJSON::Coordinates, *, bbox = nil) #

Creates a new Point with the given coordinates and optional bounding box bbox.


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

Creates a new Point with the given coordinates and optional bounding box bbox.


Instance Method Detail

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

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


def altitude(*args, **options) #

Gets this Point's altitude.

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


def altitude(*args, **options, &) #

Gets this Point's altitude.

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


def bbox #
Description copied from class GeoJSON::Object

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


def coordinates : Coordinates #

Returns this Point's coordinates.


def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def latitude(*args, **options) #

Gets this Point's latitude in decimal degrees according to WGS84.


def latitude(*args, **options, &) #

Gets this Point's latitude in decimal degrees according to WGS84.


def longitude(*args, **options) #

Gets this Point's longitude in decimal degrees according to WGS84.


def longitude(*args, **options, &) #

Gets this Point's longitude in decimal degrees according to WGS84.


def type : String #

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