Using the USNG - ArcMap

First let’s describe what “Using the USNG” means. What do our applications need to be able to do to support USNG? Here’s a pretty good list:

  • Locate and zoom to a USNG location (user input).

  • Display USNG location on mouse click and/or movement.

  • Allow users to graphically display a USNG grid overlay on their screen.

The first two items on that list are simply tedious. The last one is a bit tricky depending on how you want to do it. If you make a grid layer(s) with the grid size(s) you want to see, that’s just another layer for your application. If you want to draw grid graphics on your map on the fly, that could make for some time consuming (and possibly slow) code. It will really depend on your implementation how the last item is handled.

Now let’s see how we can accomplish those tasks with ESRI’s ArcMap.

When I first thought about this post I planned on using the US National Grid Tools for ArcGIS. Unfortunately, it was written for ArcGIS 9.1 and will not install on 9.2. As 9.3 is being furiously worked on, that project is probably dead. ESRI has built in some USNG tools directly into ArcGIS, however, and given an additional extension we can pretty much satisfy all of our requirements.

First, download this ArcScript (kudos to Jim Sibbald for creating it). Unzip the file and put the DLL wherever you like to put DLL’s. Open up ArcMap, go to Tools->Customize, and click on Add From File. Pick your DLL, and OK your way back out of there. Click on View->Toolbars, and turn on the USNG Location Tools. If it is grayed out, your dataframe doesn’t have a projection associated with it, which either means you haven’t loaded any data or you loaded data with no projection information associated with it.* Remedy the situation if necessary and then continue.

This toolbar does a couple of things for us. First, we can put in a USNG location and find it on the map. That isn’t a huge deal, as you can actually do that with the XY tool out of the box. What it can do for you, however, is let you view the USNG address as you move your mouse or click on the map, which is the other thing we wanted to accomplish. Our first two requirements are done.

For our last requirement - viewing the grid - you’ll need to go to the layout view. Click on View->Data Frame Properties. Go to the Grid tab and hit New Grid. Leave it on the default (Graticule), hit Next a number of times, and then hit Finish. Now hit Style, scroll to the bottom and select US National Grid, and hit OK. Hit Apply and you’ll have the grid over your map. You can go back and customize the grid settings to meet your particular requirements.

It’s really just useful for printing, but you have USNG grid lines and nobody can take that away from you.

One note - ArcMap does this with your data in its native projection. Some USNG purists may frown at not seeing the map itself in a standard UTM projection (USNG is useful only as a common means of communication, and the other kids may all be looking at their maps in UTM), but some people could like that if they generally always use, say State Plane. Your mileage may vary.

Next month we’ll look at implementing USNG in a web application.

Edit: One very knowledgeable reader wrote in to let me know about a problem with using the grid in layout view as described above. As it turns out, if the area you are interested in lies along a zone boundary, ArcMap really botches the job - where the two zone boundaries meet there will be an overlap. FEMA apparently found this out the hard way during Katrina. I’d only use the above solution if your area of interest is no where near a zone boundary. Otherwise, you probably want to stick with pre-built grid layers.

*If it’s the latter, hit yourself in the head with a tack hammer for having data with no projection information associated with it, and then fix the problem.