class GeoJSON::Coordinates::CoordinateTree::Leaf

Overview

A CoordinateTree::Leaf is a terminal node in a CoordinateTree structure. It has a parent and a leaf value but no children.

Defined in:

geojson/coordinates/coordinate_tree.cr

Constructors

Instance Method Summary

Instance methods inherited from class GeoJSON::Coordinates::CoordinateTree

leaf_value : Float64 leaf_value

Constructor methods inherited from class GeoJSON::Coordinates::CoordinateTree

new(parser : JSON::PullParser) new

Constructor Detail

def self.new(parent : CoordinateTree, leaf_value : Number) #

Creates a new Leaf with the given parent and leaf_value and adds the new Branch as a child of parent.


[View source]
def self.new(parent : CoordinateTree, parser : JSON::PullParser) #

Creates a new Leaf as a child of parent based on parser. This constructor assumes that the parser is positioned at the beginning of a position array in a GeoJSON coordinate string.


[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 each(&block : CoordinateTree -> _) #

Raises an exception because a Leaf has no children to enumerate upon.


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

See Object#hash(hasher)


def leaf_value : Float64 #

The Float64 value at this Leaf


[View source]
def leaf_value=(leaf_value : Float64) #

The Float64 value at this Leaf


[View source]