R/RcppExports.R

Defines functions rcpp_get_destination_h3_index_from_unidirectional_edge rcpp_get_origin_h3_index_from_unidirectional_edge rcpp_get_h3_unidirectional_edges_from_hexagon rcpp_get_h3_unidirectional_edge_boundary h3_unidirectional_edge_is_valid get_h3_unidirectional_edge h3_indexes_are_neighbors rcpp_k_ring_distances h3_distance rcpp_k_ring rcpp_polyfill edge_length hex_area num_hexagons rcpp_h3_line h3_is_res_class_iii h3_is_pentagon h3_get_base_cell h3_is_valid h3_get_resolution rcpp_h3_to_geo_boundary rcpp_h3_to_geo rcpp_geo_to_h3 rcpp_compact rcpp_h3_to_children rcpp_h3_to_parent rcpp_hex_ring

Documented in edge_length get_h3_unidirectional_edge h3_distance h3_get_base_cell h3_get_resolution h3_indexes_are_neighbors h3_is_pentagon h3_is_res_class_iii h3_is_valid h3_unidirectional_edge_is_valid hex_area num_hexagons

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

rcpp_hex_ring <- function(h3s, radius) {
    .Call(`_h3_rcpp_hex_ring`, h3s, radius)
}

rcpp_h3_to_parent <- function(h3s, res) {
    .Call(`_h3_rcpp_h3_to_parent`, h3s, res)
}

rcpp_h3_to_children <- function(h3s, res) {
    .Call(`_h3_rcpp_h3_to_children`, h3s, res)
}

rcpp_compact <- function(h3Str) {
    .Call(`_h3_rcpp_compact`, h3Str)
}

rcpp_geo_to_h3 <- function(latlng, res) {
    .Call(`_h3_rcpp_geo_to_h3`, latlng, res)
}

rcpp_h3_to_geo <- function(h3s) {
    .Call(`_h3_rcpp_h3_to_geo`, h3s)
}

rcpp_h3_to_geo_boundary <- function(h3s) {
    .Call(`_h3_rcpp_h3_to_geo_boundary`, h3s)
}

#' Get the resolution of the given H3 indexes.
#' @param h3Str character vector of H3 indexes
#' @return numeric vector
#' @export
h3_get_resolution <- function(h3Str) {
    .Call(`_h3_h3_get_resolution`, h3Str)
}

#' Check whether the given H3 indexes are valid.
#' @param h3Str character vector of H3 indexes
#' @return logical vector
#' @export
h3_is_valid <- function(h3Str) {
    .Call(`_h3_h3_is_valid`, h3Str)
}

#' Get the base cells of the given H3 indexes.
#' @param h3Str character vector of H3 indexes
#' @return numeric vector; base cell numbers between 0 and 121
#' @export
h3_get_base_cell <- function(h3Str) {
    .Call(`_h3_h3_get_base_cell`, h3Str)
}

#' Check whether the given H3 indexes are pentagons.
#' @param h3Str character vector of H3 indexes
#' @return logical vector
#' @export
h3_is_pentagon <- function(h3Str) {
    .Call(`_h3_h3_is_pentagon`, h3Str)
}

#' Check whether the given H3 indexes have a resolution
#' with Class III orientation.
#' @param h3Str character vector of H3 indexes
#' @return logical vector
#' @export
h3_is_res_class_iii <- function(h3Str) {
    .Call(`_h3_h3_is_res_class_iii`, h3Str)
}

rcpp_h3_line <- function(startStr, endStr) {
    .Call(`_h3_rcpp_h3_line`, startStr, endStr)
}

#' Number of unique H3 indexes at the given resolution.
#' @param res numeric vector; resolution between 0 and 15
#' @return numeric vector
#' @export
num_hexagons <- function(res) {
    .Call(`_h3_num_hexagons`, res)
}

#' Average hexagon area in square meters or kilometers at the given resolution.
#' @param res resolution between 0 and 15
#' @param unit either \code{m2} or \code{km2}
#' @return numeric vector
#' @export
hex_area <- function(res, unit) {
    .Call(`_h3_hex_area`, res, unit)
}

#' Average hexagon edge length in meters or kilometers at the given resolution.
#' @param res resolution between 0 and 15
#' @param unit either \code{m} or \code{km}
#' @return numeric vector
#' @export
edge_length <- function(res, unit) {
    .Call(`_h3_edge_length`, res, unit)
}

rcpp_polyfill <- function(coords, res) {
    .Call(`_h3_rcpp_polyfill`, coords, res)
}

rcpp_k_ring <- function(h3s, radius) {
    .Call(`_h3_rcpp_k_ring`, h3s, radius)
}

#' Get the grid distance between H3 addresses.
#' @param origin character; origin H3 index
#' @param destinations character vector of H3 destination indexes
#' @return numeric vector
#' @export
h3_distance <- function(origin, destinations) {
    .Call(`_h3_h3_distance`, origin, destinations)
}

rcpp_k_ring_distances <- function(h3s, radius) {
    .Call(`_h3_rcpp_k_ring_distances`, h3s, radius)
}

#' Check whether the given hexagons are neighbors.
#' @param origin character scalar; origin H3 index
#' @param destinations character vector of destination H3 indexes
#' @export
h3_indexes_are_neighbors <- function(origin, destinations) {
    .Call(`_h3_h3_indexes_are_neighbors`, origin, destinations)
}

#' Get the H3 edge index based on the given origin and destination hexagons.
#' @param origin character scalar; origin H3 index
#' @param destination character scalar; destination H3 index
#' @export
get_h3_unidirectional_edge <- function(origin, destination) {
    .Call(`_h3_get_h3_unidirectional_edge`, origin, destination)
}

#' Check whether the given indexes are valid H3 edge indexes.
#' @param h3_edge_indexes character vector of H3 edge indexes
#' @export
h3_unidirectional_edge_is_valid <- function(h3_edge_indexes) {
    .Call(`_h3_h3_unidirectional_edge_is_valid`, h3_edge_indexes)
}

rcpp_get_h3_unidirectional_edge_boundary <- function(h3EdgeStr) {
    .Call(`_h3_rcpp_get_h3_unidirectional_edge_boundary`, h3EdgeStr)
}

rcpp_get_h3_unidirectional_edges_from_hexagon <- function(originStr) {
    .Call(`_h3_rcpp_get_h3_unidirectional_edges_from_hexagon`, originStr)
}

rcpp_get_origin_h3_index_from_unidirectional_edge <- function(h3EdgeStr) {
    .Call(`_h3_rcpp_get_origin_h3_index_from_unidirectional_edge`, h3EdgeStr)
}

rcpp_get_destination_h3_index_from_unidirectional_edge <- function(h3EdgeStr) {
    .Call(`_h3_rcpp_get_destination_h3_index_from_unidirectional_edge`, h3EdgeStr)
}
crazycapivara/h3-r documentation built on Aug. 10, 2022, 1:17 p.m.