Module: H3::Inspection
Overview
Index inspection functions.
Instance Method Summary collapse
-
#h3_base_cell(h3_index) ⇒ Integer
Derives the base cell number of the given H3 index.
-
#h3_pentagon?(h3_index) ⇒ Boolean
Determine whether the given H3 index is a pentagon.
-
#h3_res_class_3?(h3_index) ⇒ Boolean
Determine whether the given H3 index has a resolution with Class III orientation.
-
#h3_resolution(h3_index) ⇒ Integer
Derive the resolution of a given H3 index.
-
#h3_to_string(h3_index) ⇒ String
Derives the hexadecimal string representation for a given H3 index.
-
#h3_valid?(h3_index) ⇒ Boolean
Determine whether the given H3 index is valid.
-
#string_to_h3(h3_string) ⇒ Integer
Derives the H3 index for a given hexadecimal string representation.
Methods included from Bindings::Base
Instance Method Details
#h3_base_cell(h3_index) ⇒ Integer
Derives the base cell number of the given H3 index
35 |
# File 'lib/h3/inspection.rb', line 35 attach_function :h3_base_cell, :h3GetBaseCell, [ :h3_index ], :int |
#h3_pentagon?(h3_index) ⇒ Boolean
Determine whether the given H3 index is a pentagon.
61 |
# File 'lib/h3/inspection.rb', line 61 attach_function :h3_pentagon, :h3IsPentagon, [ :h3_index ], :bool |
#h3_res_class_3?(h3_index) ⇒ Boolean
Determine whether the given H3 index has a resolution with Class III orientation.
75 |
# File 'lib/h3/inspection.rb', line 75 attach_function :h3_res_class_3, :h3IsResClassIII, [ :h3_index ], :bool |
#h3_resolution(h3_index) ⇒ Integer
Derive the resolution of a given H3 index
22 |
# File 'lib/h3/inspection.rb', line 22 attach_function :h3_resolution, :h3GetResolution, [ :h3_index ], :int |
#h3_to_string(h3_index) ⇒ String
Derives the hexadecimal string representation for a given H3 index.
99 100 101 102 103 |
# File 'lib/h3/inspection.rb', line 99 def h3_to_string(h3_index) h3_str = FFI::MemoryPointer.new(:char, H3_TO_STR_BUF_SIZE) Bindings::Private.h3_to_string(h3_index, h3_str, H3_TO_STR_BUF_SIZE) h3_str.read_string end |
#h3_valid?(h3_index) ⇒ Boolean
Determine whether the given H3 index is valid.
88 |
# File 'lib/h3/inspection.rb', line 88 attach_function :h3_valid, :h3IsValid, [ :h3_index ], :bool |
#string_to_h3(h3_string) ⇒ Integer
Derives the H3 index for a given hexadecimal string representation.
48 |
# File 'lib/h3/inspection.rb', line 48 attach_function :string_to_h3, :stringToH3, [ :string ], :h3_index |