USNG

From Wildsong
Jump to navigationJump to search

2019-03-11 I was shocked and dismayed when I realized today that I have never written a page with US National Grid information in it.

I think USNG is very elegant and does not get used because of the inertia of the inferior system of lat/lon and/or lon/lat coordinates.

JavaScript

import { transform } from 'ol/proj'
import usng from 'usng/usng'

let coord = [-123, 45]

let usngc = new usng.Converter();
let coordFormatter = (coord) => {
    return usngc.LLtoUSNG(coord[1], coord[0], 5);
}