abstract class GeoJSON::Geometry
- GeoJSON::Geometry
- GeoJSON::Base
- Reference
- Object
Overview
A Geometry
represents a figure in geographic space.
Direct Known Subclasses
- GeoJSON::LineString
- GeoJSON::MultiLineString
- GeoJSON::MultiPoint
- GeoJSON::MultiPolygon
- GeoJSON::Point
- GeoJSON::Polygon
Defined in:
geojson/geometry/geometry.crConstructors
-
.new(parser : JSON::PullParser)
Creates a new
Geometry
from the given parser.
Class Method Summary
-
.from_json(geometry_json)
Creates a
Geometry
from the given GeoJSON string.
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#[](*args, **options)
Gets the coordinate at the given index.
-
#[](*args, **options, &)
Gets the coordinate at the given index.
-
#coordinates
Returns this Geometry's coordinates.
-
#hash(hasher)
See
Object#hash(hasher)
Instance methods inherited from class GeoJSON::Base
type : String
type
Constructor Detail
def self.new(parser : JSON::PullParser)
#
Creates a new Geometry
from the given parser.
This static class method automatically chooses the correct Geometry class to create.
Class Method Detail
Instance Method Detail
def ==(other : self)
#
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.