Skip to contents

Converts geographic coordinates directly to PLANE coordinates (the unfolded solid). Combines forward 'Snyder' projection with the PLANE transformation.

Usage

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

Arguments

lon

Longitude in degrees (-180 to 180)

lat

Latitude in degrees (-90 to 90)

polyhedron

The solid whose faces are unfolded: "icosahedron" (default), "octahedron" or "tetrahedron", in its standard orientation

Value

Data frame with columns:

plane_x

X coordinate in PLANE space (range ~0 to 5.5)

plane_y

Y coordinate in PLANE space (range ~0 to 1.73)

Details

Equivalent to 'dggridR' dgGEO_to_PLANE() on the icosahedron.

Examples

# Plot world cities in PLANE coordinates
cities <- data.frame(
  lon = c(2.35, -74.00, 139.69, 151.21),
  lat = c(48.86, 40.71, 35.69, -33.87)
)
plane <- hexify_lonlat_to_plane(cities$lon, cities$lat)
plot(plane$plane_x, plane$plane_y)