class GeoJSON::Feature
- GeoJSON::Feature
- GeoJSON::Base
- Reference
- Object
Overview
A Feature
represents a GeoJSON Feature object
with a geometry and properties.
Included Modules
- JSON::Serializable
Defined in:
geojson/feature.crConstructors
- .new(pull : JSON::PullParser)
-
.new(geometry : Base | Nil, properties : Nil | Hash(String, Array(JSON::Any) | Bool | Float64 | Hash(String, JSON::Any) | Int64 | String | Nil) = nil, *, id : Int32 | String | Nil = nil)
Creates a new
Feature
with the given geometry, properties, and id.
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#geometry : PseudoGeometry | Nil
Gets this Feature's geometry.
-
#hash(hasher)
See
Object#hash(hasher)
-
#id : String | Int32 | Nil
Gets this Feature's id.
-
#properties : Hash(String, JSON::Any::Type) | Nil
Gets this Feature's properties.
-
#type : String
Gets this Feature's GeoJSON type ("Feature")
Instance methods inherited from class GeoJSON::Base
type : String
type
Constructor Detail
def self.new(geometry : Base | Nil, properties : Nil | Hash(String, Array(JSON::Any) | Bool | Float64 | Hash(String, JSON::Any) | Int64 | String | Nil) = nil, *, id : Int32 | String | Nil = nil)
#
Creates a new Feature
with the given geometry, properties, and id.
Instance Method Detail
def ==(other : self)
#
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.