View source: R/hexify_projection.R
| hexify_forward | R Documentation |
Projects geographic coordinates onto the icosahedron, returning face index and planar coordinates (tx, ty).
hexify_forward(lon, lat)
lon |
Longitude in degrees |
lat |
Latitude in degrees |
tx and ty are normalized coordinates within the triangular face, typically in range [0, 1].
Named numeric vector: c(face, tx, ty)
Other projection:
hexify_build_icosa(),
hexify_face_centers(),
hexify_forward_to_face(),
hexify_get_precision(),
hexify_inverse(),
hexify_projection_stats(),
hexify_set_precision(),
hexify_set_verbose(),
hexify_which_face()
result <- hexify_forward(16.37, 48.21)
# result["face"], result["icosa_triangle_x"], result["icosa_triangle_y"]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.