Learn R Programming

h3r (version 0.1.2)

gridPathCells: Grid Path Cells

Description

Given two H3 indexes, return the line of indexes between them (inclusive).

Usage

gridPathCells(origin, destination)

Value

the line of indexes between the two H3 cells

Arguments

origin

vector of origin H3 cell indexes

destination

vector of destination H3 cell indexes

Details

This function may fail to find the line between two indexes, for example if they are very far apart. It may also fail when finding distances for indexes on opposite sides of a pentagon.

Examples

Run this code

gridPathCells(origin = c("85283473fffffff","85283473fffffff")
              , destination = c("85283471fffffff","85283477fffffff"))

Run the code above in your browser using DataLab