Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Lat/Lon to MGRS

Does anyone know where I could find a library of code for converting Lat/Lon position to Military Grid Reference System (MGRS)? I'm looking for a C# implementation if possible.

like image 842
SwDevMan81 Avatar asked Jul 30 '10 18:07

SwDevMan81


2 Answers

Found on js if it's help...

https://github.com/codice/usng.js

usage-

var converter = new usngs.Converter();
alert(converter.LLtoMGRS(33.754032, -98.451233, 9));
like image 98
Zvi Redler Avatar answered Sep 19 '22 15:09

Zvi Redler


CoordinateSharp is available as a Nuget package and can do just that.

Coordinate c = new Coordinate(40.57682, -70.75678);
c.MGRS.ToString(); // Outputs 19T CE 51307 93264
like image 37
Tronald Avatar answered Sep 20 '22 15:09

Tronald