[QGIS-Developer] USNG Coordinate System
b.rowlingson at lancaster.ac.uk
Mon Jun 12 01:13:55 PDT 2017
On Thu, Jun 8, 2017 at 12:12 AM, Joshua Quesenberry <engnfrc at gmail.com> wrote:
> Good Evening Everyone,
> I haven’t seen any replies to my post over the weekend. Can someone take a
And still no replies! I've had a look. You might know all this already
but I'll include it for completeness, and you can correct anything
I've got wrong!
> Is there some way to plot USNG coordinates in QGIS? And if not, when will
> support for that be added?
You could possibly have explained a bit more about what kind of
support you might need! Looking up stuff about USNG on the internet,
it seems to be a re-encoding of UTM zones but with the zones chopped
into squares, and each square getting an alphanumeric code.
https://www.ngs.noaa.gov/TOOLS/usng.shtml tells me:
18SUJ20 - Locates a point with a precision of 10 km
18SUJ2306 - Locates a point with a precision of 1 km
so 18SU is the south west corner of a 6x8 degree grid square, and the
point is at (20, 00) km from the origin for the first case, and (23,6)
km in the second case. Extra digits produce more precision, down to:
" 18SUJ2348306479 - Locates a point with a precision of 1 meter"
which is a point (23483, 6497) metres from the origin.
So, what might we do with these in QGIS? Because they are text, you
won't get shapefiles with USNG coordinate systems. You might get text
files (CSVs, HTML etc) with USNG coordinates in a column, and want to
read these in to QGIS and convert to a fully numeric coordinate
system. This should be a case of identifying the correct UTM zone and
latitude offset from the first four characters, then extracting the
numerics, and creating some UTM coordinates, then converting to
lat-long. If the data ends up in only one UTM zone it could be left at
that, otherwise a conversion to lat-long (like epsg: 4326) would be
Would that be useful to you? It could be implemented as a Qgis python
function - its some string parsing and numeric manipulation.
The inverse is another possible use-case - converting coordinates in a
layer to USNG and adding the USNG text format as a new column in a
vector layer. Again that conversion is doable in Python.
Another use-case might be a Qgis function which could, for example, be
used to label points in maps with USNG coordinates by converting from
coordinates to USNG text format.
There's online converters and a fortran program (which I've just
compiled) that could be used to test any implementation. I had a quick
search in the QGIS plugin repository and didn't find anything.
If I get stuck on a train for a few hours I might play with this, but
it shouldn't be too much for someone with a bit of python competency
and some familiarity with the QGIS API.
More information about the QGIS-Developer