View source: R/hexify_conversions.R
| hexify_lonlat_to_quad_ij | R Documentation |
Converts 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.
hexify_lonlat_to_quad_ij(lon, lat, resolution, aperture = 3L)
lon |
Longitude in degrees (-180 to 180) |
lat |
Latitude in degrees (-90 to 90) |
resolution |
Grid resolution level (0-30) |
aperture |
Grid aperture: 3, 4, or 7 |
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
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 |
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()
# Get Quad IJ coordinates for Paris
result <- hexify_lonlat_to_quad_ij(lon = 2.35, lat = 48.86,
resolution = 10, aperture = 3)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.