struct S2Cells::Cell

Defined in:

s2_cells/cell.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_face_pos_level(face : Int32, pos : UInt64, level : Int32) : Cell #

[View source]
def self.from_lat_lng(lat_lng : LatLng) : Cell #

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

[View source]
def self.new(face : Int32, level : Int32, orientation : Int32, cell_id : S2Cells::CellId, uv : Array(Array(Float64))) #

[View source]
def self.new(cell_id : CellId) #

[View source]

Instance Method Detail

def approx_area : Float64 #

[View source]
def average_area : Float64 #

[View source]
def contains(other : Cell | Point) : Bool #

[View source]
def exact_area : Float64 #

[View source]
def face : Int32 #

[View source]
def get_cap_bound : Cap #

[View source]
def get_center : Point #

[View source]
def get_center_raw : Point #

[View source]
def get_edge(k : Int32) : Point #

[View source]
def get_edge_raw(k : Int32) : Point #

[View source]
def get_latitude(i : Int32, j : Int32) : Float64 #

[View source]
def get_longitude(i : Int32, j : Int32) : Float64 #

[View source]
def get_rect_bound : LatLngRect #

[View source]
def get_u_axis(face : Int) #

[View source]
def get_u_norm(face : Int, u : Float64) #

Vector normal to the positive v-axis and the plane through the origin.

The vector is normal to the positive v-axis and a plane that contains the origin and the v-axis.


[View source]
def get_v_axis(face : Int) #

[View source]
def get_v_norm(face, v) #

Vector normal to the positive u-axis and the plane through the origin.

The vector is normal to the positive u-axis and a plane that contains the origin and the u-axis.


[View source]
def get_vertex(k : Int32) : Point #

[View source]
def get_vertex_raw(k : Int32) : Point #

[View source]
def id : CellId | Nil #

[View source]
def leaf? : Bool #

[View source]
def level : Int32 #

[View source]
def may_intersect(cell : Cell) : Bool #

[View source]
def orientation : Int32 #

[View source]
def subdivide(&) #

[View source]
def to_s : String #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]