Skip to contents

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

Usage

hexify_lonlat_to_plane(lon, lat)

Arguments

lon

Longitude in degrees (-180 to 180)

lat

Latitude in degrees (-90 to 90)

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's dgGEO_to_PLANE().

Examples

if (FALSE) { # \dontrun{
# 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)
} # }