| mgrs_precision {mgrs} | R Documentation |
MGRS coordinates represent a "square" with a certain level of precision. See Details for more info.
mgrs_precision(x)
x |
character vector of MGRS grid references |
An MGRS grid reference is a point reference system. When the term 'grid square' is used, it can refer to a square with a side length of 10 km (6 mi), 1 km, 100 m (328 ft), 10 m or 1 m, depending on the precision of the coordinates provided. (In some cases, squares adjacent to a Grid Zone Junction (GZJ) are clipped, so polygon is a better descriptor of these areas.) The number of digits in the numerical location must be even: 0, 2, 4, 6, 8 or 10, depending on the desired precision. When changing precision levels, it is important to truncate rather than round the easting and northing values to ensure the more precise polygon will remain within the boundaries of the less precise polygon. Related to this is the primacy of the southwest corner of the polygon being the labeling point for an entire polygon. In instances where the polygon is not a square and has been clipped by a grid zone junction, the polygon keeps the label of the southwest corner as if it had not been clipped.
For example (spaces used for clarity):
precision level 6x8 degrees (in most cases) - function returns NA for this
precision level 100 km
precision level 10 km
precision level 1 km
precision level 100 m
precision level 10 m
precision level 1 m
data frame with grid_ref and precision columns. precision is in meters.
https://en.wikipedia.org/wiki/Military_Grid_Reference_System#Grid_zone_designation
grefs <- c("4Q", "4QFJ", "4QFJ16", "4QFJ1267", "4QFJ123678",
"4QFJ12346789", "4QFJ1234567890")
mgrs_precision(grefs)