1. mgrs
Utility for converting between WGS84 lat/lng and MGRS coordinates
mgrs
Package: mgrs
Created by: proj4js
Last modified: Sat, 18 Mar 2023 23:07:50 GMT
Version: 2.0.0
License: MIT
Downloads: 833,038
Repository: https://github.com/proj4js/mgrs

Install

npm install mgrs
yarn add mgrs

mgrs

Utility for converting between WGS84 lat/lng and MGRS coordinates, spunoff from proj4js

has 3 methods

  • forward, takes an array of [lon,lat] and optional accuracy and returns an mgrs string
  • inverse, takes an mgrs string and returns a bbox.
  • toPoint, takes an mgrs string, returns an array of '[lon,lat]'

install dev dependencies with

 npm install

test with

 npm test

build with

 npm run build

Licensed under the MIT license except:

Portions of this software are based on a port of components from the OpenMap
com.bbn.openmap.proj.coords Java package. An initial port was initially created
by Patrice G. Cappelaere and included in Community Mapbuilder
(http://svn.codehaus.org/mapbuilder/), which is licensed under the LGPL license
as per http://www.gnu.org/copyleft/lesser.html. OpenMap is licensed under the
this license agreement

references:

  • Wikipedia: https://en.wikipedia.org/wiki/Military_Grid_Reference_System
  • GEOTRANS: https://earth-info.nga.mil/#geotrans

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code