View source: R/coords_to_mesh.R
coords_to_mesh | R Documentation |
From coordinate to mesh codes.
coords_to_mesh(longitude, latitude, to_mesh_size = 1, geometry = NULL, ...)
longitude |
longitude that approximately to .120.0 to 154.0 ( |
latitude |
latitude that approximately to 20.0 to 46.0 ( |
to_mesh_size |
target mesh size. That is, 1 for 1km, and 0.5 for 500m. From 80km to 0.100km. |
geometry |
XY sfg object |
... |
other parameters |
mesh code (default 3rd meshcode aka 1km mesh)
Akio Takenaka: http://takenaka-akio.org/etc/j_map/index.html # nolint
mesh_to_coords()
for convert from meshcode to coordinates
coords_to_mesh(141.3468, 43.06462, to_mesh_size = 1) coords_to_mesh(139.6917, 35.68949, to_mesh_size = 0.250) coords_to_mesh(139.71475, 35.70078) coords_to_mesh(139.71475, 35.70078, to_mesh_size = 0.1) coords_to_mesh(c(141.3468, 139.71475), c(43.06462, 35.70078), mesh_size = c(1, 10)) # Using sf (point as sfg object) library(sf) coords_to_mesh(geometry = st_point(c(139.71475, 35.70078))) coords_to_mesh(geometry = st_point(c(130.4412895, 30.2984335)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.