class

GeoJSON::Point

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

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

This class corresponds to the GeoJSON Point.

Constructors

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.

Source
new(pull : JSON::PullParser)

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

This class corresponds to the GeoJSON Point.

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

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

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

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

Source

Instance methods

==(other : self)

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

altitude(*args, **options)

Gets this Point's altitude.

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

Source
altitude(*args, **options, &)

Gets this Point's altitude.

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

Source
bbox

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

Source
coordinates

Returns this Point's coordinates.

Source
hash(hasher)

See Object#hash(hasher)

latitude(*args, **options)

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

Source
latitude(*args, **options, &)

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

Source
longitude(*args, **options)

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

Source
longitude(*args, **options, &)

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

Source
type

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

Source