Skip to main content
2 of 2
deleted 348 characters in body
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Converting MGRS to Lat/Lon or UTM helped. I adapted the answer by Sasa Ivetic and the solution is somewhat obscure.

In order to convert coordinates from USNG/ MGRS to lon/lat, when there are far too many coordinates and you need to have it outomated:

1/ Get the GeographicLib package and use the GeoConvert utility.

2/ The general idea is to repeatedly call this utility from whatever tool you use (R, Python...), and supply user input and capture output.

3/ Specifically, and as an example, in Python 3.7, using the subprocess module, here are a couple of lines which can be looped:

from subprocess import Popen, PIPE
p = Popen('C:\\pkg-vc12-x64\\GeographicLib-1.49\\bin\\GeoConvert.exe', stdin=PIPE, stdout=PIPE)
p.communicate(b'48QYD307682')[0]