Skip to contents

Returns the index of the face of the solid containing the given coordinates (0-19 on the icosahedron).

Usage

hexify_which_face(
  lon,
  lat,
  polyhedron = c("icosahedron", "octahedron", "tetrahedron")
)

Arguments

lon

Longitude in degrees

lat

Latitude in degrees

polyhedron

The solid: "icosahedron" (default), "octahedron" or "tetrahedron", in its default orientation

Value

Integer face index

Examples

face <- hexify_which_face(16.37, 48.21)
hexify_which_face(16.37, 48.21, polyhedron = "tetrahedron")