Convert longitude/latitude to Quad IJ coordinates
Source:R/hexify_conversions.R
hexify_lonlat_to_quad_ij.RdConverts geographic coordinates to the intermediate Quad IJ representation used internally by ISEA DGGS. Returns the quad number (0-11) and integer cell indices (i, j) within that quad.
Value
List with components:
- quad
Quad number (0-11)
- i
Integer cell index along first axis
- j
Integer cell index along second axis
- icosa_triangle_face
Source icosahedral face (0-19)
- icosa_triangle_x
X coordinate on triangle face
- icosa_triangle_y
Y coordinate on triangle face
Details
The 20 icosahedral triangle faces are grouped into 12 quads:
Quad 0: North polar region
Quads 1-5: Upper hemisphere rhombi
Quads 6-10: Lower hemisphere rhombi
Quad 11: South polar region
See also
Other coordinate conversion:
hexify_cell_id_to_quad_ij(),
hexify_cell_to_icosa_tri(),
hexify_cell_to_lonlat(),
hexify_cell_to_plane(),
hexify_cell_to_quad_ij(),
hexify_cell_to_quad_xy(),
hexify_grid_cell_to_lonlat(),
hexify_grid_to_cell(),
hexify_icosa_tri_to_plane(),
hexify_icosa_tri_to_quad_ij(),
hexify_icosa_tri_to_quad_xy(),
hexify_lonlat_to_cell(),
hexify_lonlat_to_plane(),
hexify_quad_ij_to_cell(),
hexify_quad_ij_to_icosa_tri(),
hexify_quad_ij_to_xy(),
hexify_quad_xy_to_cell(),
hexify_quad_xy_to_icosa_tri(),
hexify_roundtrip_test()
Examples
if (FALSE) { # \dontrun{
# Get Quad IJ coordinates for Paris
result <- hexify_lonlat_to_quad_ij(lon = 2.35, lat = 48.86,
resolution = 10, aperture = 3)
print(result)
} # }