class GeoJSON::Feature

Overview

A Feature represents a GeoJSON Feature object with a geometry and properties.

Included Modules

Defined in:

geojson/feature.cr

Constructors

Instance Method Summary

Instance methods inherited from class GeoJSON::Base

type : String type

Constructor Detail

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

[View source]
def self.new(geometry, properties = nil, *, id = nil) #

Creates a new Feature with the given geometry, properties, and id.


[View source]

Instance Method Detail

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

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


def geometry : PseudoGeometry? #

Gets this Feature's geometry.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def id : String | Int32 | Nil #

Gets this Feature's id.


[View source]
def properties : Hash(String, JSON::Any::Type)? #

Gets this Feature's properties.


[View source]
def type : String #

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


[View source]