class S2Cells::CellId

Included Modules

Defined in:

s2_cells/cell_id.cr

Constructors

Class Method Summary

Instance Method Summary

Class methods inherited from module S2Cells::CellBase

lookup_bits(i, j, orig_orientation, pos, orientation) lookup_bits, lookup_cells(level, i, j, orig_orientation, pos, orientation) lookup_cells

Constructor Detail

def self.new(id : UInt64) #

[View source]

Class Method Detail

def self.face_uv_to_xyz(face : UInt64, u : Float64, v : Float64) #

[View source]
def self.from_face_ij(face : UInt64, i : UInt64, j : UInt64) #

[View source]
def self.from_lat_lon(lat : Float64, lon : Float64) #

[View source]
def self.from_point(p : Point) #

[View source]
def self.from_token(token : String) #

returns a cell given a hex-encoded string of its uint64 ID


[View source]
def self.st_to_ij(s : Float64) : UInt64 #

[View source]
def self.uv_to_st(u : Float64) #

[View source]
def self.valid_face_xyz_to_uv(face : UInt64, p : Point) #

[View source]
def self.xyz_to_face_uv(p : Point) : Tuple(UInt64, Float64, Float64) #

[View source]

Instance Method Detail

def id : UInt64 #

[View source]
def level #

[View source]
def next #

[View source]
def parent(level) #

[View source]
def prev #

[View source]
def to_token : String #

ToToken returns a hex-encoded string of the uint64 cell id, with leading zeros included but trailing zeros stripped.


[View source]