- Notifications
You must be signed in to change notification settings - Fork33
A javascript library for converting LL, UTM, USNG, and MGRS
License
NotificationsYou must be signed in to change notification settings
codice/usng.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A version of usngs.js with bug fixes, enhancements, and extensive unit tests.
USNG (U.S. National Grid)MGRS (Military Grid Reference System)
- Convert Lat/Lon bounding box to closest USNG
- Convert Lat/Lon to UTM/UPS
- Convert Lat/Lon point to USNG
- Convert UTM/UPS to Lat/Lon
- Convert USNG to UTM
- Convert USNG to Lat/Lon
- Convert Lat/Lon to MGRS
Example usage of this file with Cesium and OpenLayers can be found withinhttps://github.com/codice/ddf
varusng=require('usng.js');varconverter=newusng.Converter();varusngCoord=converter.LLBboxtoUSNG(north,south,east,west);varutmCoord=converter.LLtoUTM(lat,lon,utmcoords,zone);varutmUpsCoord=converter.LLtoUTMUPS(lat,lon)varusngCoord=converter.LLtoUSNG(lat,lon,precision);varllCoord=converter.UTMtoLL(UTMNorthing,UTMEasting,UTMZoneNumber,accuracy);llCoord=converter.UTMUPStoLL("Z 2222222 2222222")llCoord=converter.UTMUPStoLL("10 1234567 6543210")llCoord=converter.UTMUPStoLL({northPole, zoneNumber, easting, northing})varutmCoord=converter.USNGtoUTM(zone,letter,sq1,sq2,east,north,ret);varllCoord=converter.USNGtoLL(usngStr_input,getCenter);varmgrsCoord=converter.LLtoMGRS(lat,lon,precision);
Note: This is not for production use
Run with:usng-cli [function] [params]
In development you will need to runnpm link
first.
Build with:npm run build
Format with:npm run format
About
A javascript library for converting LL, UTM, USNG, and MGRS
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.