USNG: Difference between revisions
From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs) Created page with "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 no..." |
Brian Wilson (talk | contribs) mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
import { transform } from 'ol/proj' | import { transform } from 'ol/proj' | ||
import usng from 'usng/usng' | import usng from 'usng/usng' | ||
let coord = [-123, 45] | let coord = [-123, 45] | ||
let usngc = new usng.Converter(); | let usngc = new usng.Converter(); | ||
let coordFormatter = (coord) => { | let coordFormatter = (coord) => { | ||
return usngc.LLtoUSNG(coord[1], coord[0], 5); | return usngc.LLtoUSNG(coord[1], coord[0], 5); | ||
} | } | ||
[[Category: GIS]] |
Latest revision as of 20:54, 11 March 2019
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); }