class GeoJSON::Point
- GeoJSON::Point
- GeoJSON::Object
- Reference
- Object
Overview
A Point is a Geometry representing a single Position in geographic
space.
This class corresponds to the GeoJSON Point.
Defined in:
geojson/point.crConstructors
-
.new(longitude, latitude, altitude = nil, bbox = nil)
Creates a new
Pointat the given longitude, latitude, and optional altitude, and with optional bounding box bbox. -
.new(pull : JSON::PullParser)
A
Pointis aGeometryrepresenting a singlePositionin geographic space. -
.new(coordinates : GeoJSON::Coordinates, *, bbox = nil)
Creates a new
Pointwith the given coordinates and optional bounding box bbox. -
.new(coordinates : Array(Float64), *, bbox = nil)
Creates a new
Pointwith the given coordinates and optional bounding box bbox.
Instance Method Summary
-
#==(other : self)
Returns
trueif this reference is the same as other. -
#altitude(*args, **options)
Gets this Point's altitude.
-
#altitude(*args, **options, &)
Gets this Point's altitude.
-
#bbox
Calculates the bounding box for any GeoJSON object, including
FeatureCollection. -
#coordinates : Coordinates
Returns this Point's coordinates.
-
#hash(hasher)
See
Object#hash(hasher) -
#latitude(*args, **options)
Gets this Point's latitude in decimal degrees according to WGS84.
-
#latitude(*args, **options, &)
Gets this Point's latitude in decimal degrees according to WGS84.
-
#longitude(*args, **options)
Gets this Point's longitude in decimal degrees according to WGS84.
-
#longitude(*args, **options, &)
Gets this Point's longitude in decimal degrees according to WGS84.
-
#type : String
Gets this Point's GeoJSON type ("Point")
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
Creates a new Point at the given longitude, latitude, and optional
altitude, and with optional bounding box bbox.
A Point is a Geometry representing a single Position in geographic
space.
This class corresponds to the GeoJSON Point.
Creates a new Point with the given coordinates and optional bounding
box bbox.
Creates a new Point with the given coordinates and optional bounding
box bbox.
Instance Method Detail
Returns true if this reference is the same as other. Invokes same?.
Gets this Point's altitude.
Technically, this positional value is meant to be the height in meters above the WGS84 ellipsoid.
Gets this Point's altitude.
Technically, this positional value is meant to be the height in meters above the WGS84 ellipsoid.
Calculates the bounding box for any GeoJSON object, including FeatureCollection.
Gets this Point's latitude in decimal degrees according to WGS84.
Gets this Point's longitude in decimal degrees according to WGS84.
Gets this Point's longitude in decimal degrees according to WGS84.