Working with USNG and MGRS in Survey123 for ArcGIS

5354
9
07-08-2018 02:38 PM
IsmaelChivite
Esri Notable Contributor
2 9 5,354

Survey123 provides great support for working with USNG and MGRS coordinates. Since this is quite important to a number of you I thought I would write a specific blog post detailing the basics, but also some more advanced techniques.

About USNG and MGRS

USNG and MGRS are two commonly used grid-based reference systems used to unambiguously express geographic locations. They provide definitive advantages over using latitude/longitude coordinate notations, and addresses, so they have become the standard among different communities. MGRS for example is the NATO standard for referencing locations on the earth and it is often used by Emergency Response teams across the world.  USNG, which practically uses the same notation as MGRS, is widely used by Seach and Rescue and Emergency Response teams in the United States.  In fact, through  Directive 092-5, FEMA sets the United States National Grid (USNG) as its standard geographic reference system for land based operations and encourages the use of USNG among community partners

Unlike the different notations used to express coordinates through a latitude and longitude pair (DMS, DDM, DD...), USNG and MGRS provide a unequivocal and more user friendly way to denote a location.  The following table illustrates differences between a few common notations:

Map coordinate notationExample
Degrees, minutes and seconds (DMS)41°24'12.2"N 2°10'26.5"E
Degrees and decimal minutes (DDM)41 24.2028, 2 10.4418
Decimal degrees (DD)40.446° N 79.982° W
MGRS11SMT818846858
USNG11S MT 8188 6858

The fundamental issue with DMS, DDM and DD notations is that they are more difficult to read and people can transcribe the coordinates in slightly different ways which ultimate can lead to confusion. It may not be obvious to untrained field staff what the difference is between Decimal degrees and Degrees and decimal minutes. People may swap the order of the latitude and longitude values etc  In that sense, while MGRS and USNG may be just as cryptic at first to the untrained eye, they reduce the chances of getting the location wrong. It really does not matter where you put the spaces in USNG or MGRS, and there is no chance to flip latitudes and longitudes around... if you transcribe all the characters in order, you get the intended location right.

For the reasons above and more, organizations are choosing MGRS and USNG as a common location language  and want applications like Survey123 to work naturally with them.

Lets explore first how field users of the Survey123 field app can get the coordinates of a particular location. This is achieved through geopoint questions in the form, which support MGRS/USNG coordinate readouts in both the map preview and detailed modes.

Reading and configuring coordinate formats in geopoint map previews

Geopoint questions in your form will always display the coordinates of the selected location as well as a map in preview mode.

In the survey shown on the side, for example, the current location of the device is shown in USNG notation, along with the estimated horizontal accuracy.

The coordinate format to be shown in the map preview is configurable by the author of the survey as follows:

  1. Open your survey in Survey123 Connect for ArcGIS
  2. Once you are previewing your survey, go into the Settings tab
  3. Select the Map section
  4. Choose the coordinate format for the Preview
  5. Publish your survey and download into the Survey123 field app to test

The available coordinate formats are:

  • DMS: Degrees Minutes Seconds
  • DDM: Degrees Decimal Minutes
  • DD: Decimal Degrees
  • MGRS
  • USNG
  • UTM/UPS

Once the coordinate format has been selected in Survey123 Connect, it will apply to all geopoint questions present in that survey. End users cannot overwrite the coordinate format chosen by the author of the survey.

Being able to quickly read a geopoint location in USNG or MGRS coordinates from the map preview in your survey can be very useful. For example, a Search and Rescue team that needs to communicate its own location or the location of an event over the radio can read the coordinates directly from the map preview.

Reading and configuring map coordinates in the map detail modeDynamic coordinate readout in Survey123 map detail view

The map preview as described above is intended to give the field user quick access to visualize a selected location and its coordinates.  By tapping on the map preview, Survey123 will bring the map into full screen, or detailed mode, and switch into interactive mode.

When the Survey123 map is expanded to full screen, the map coordinate display is at the bottom. Note that the coordinates change as the map is panned around. For example, you can use the geosearch to find an address and immediately get the MGRS coordinates.  Or you can refresh your location using the device's GPS and get the coordinates again.

If you would like to copy the coordinate readout into your clipboard, you can tap the bottom panel and that will switch the geosearch control at the top to map coordinate entry. Note again that in this mode, as you pan the map the coordinates will change dynamically in the geosearch control, from which you can easily copy them into your clipboard.

The coordinate format for the detailed map is also controlled from Survey123 Connect as described in the previous section.

Entering coordinates through geosearch using USNG and MGRS notation

A second workflow when using the Survey123 app is that where the field user needs to define the location of an event, asset or observation, by entering its coordinates.This is done through the geosearch input in the detailed map view (map at full screen) of a geopoint question.  The geosearch input automatically accepts map coordinates in a number of formats: DMS, DDM, USNG, MGRS. Simply type in or paste the map coordinates and the map location will be set. 

Persisting USNG and MGRS coordinates as GIS attributes

Through the use of calculations, a survey author can configure a form to automatically persist geopoint questions in different map coordinate formats.  This is achieved through the XLSForm calculation column, which can take a geopoint object and extract its coordinates in USNG and MGRS for example.  This is what the syntax of the calculation will look like:

typenamelabelcalculation
geopointlocationLocation
textusngUSNGpulldata("@geopoint",${location},"USNG")
hiddenmgrsMGRSpulldata("@geopoint",${location},"MGRS")

In the example above, the pulldata"@geopoint") function is used in the calculation column. Note that we first pass the question holding the geopoint object, which in our case is location,and then we indicate the property from the geopoint that we want to extract: USNG or MGRS.

The expression in the calculation column is evaluated every time the location changes. So for example, if the user is in map preview mode and hits the GPS button, then the location is recalculated and with it its coordinates in the usng and mgrs questions.  The location could also change when the user manually sets a new location through the map detailed view, either by passing an address, a coordinate pair or simply panning the map.

Note that in the example below I used a text type of question for the USNG coordinates.This means that the USNG coordinates will be displayed in the form to the end user. If you use a text type of question, you may want to flag the question as read-only, so users do not overwrite the coordinates.  In the case of MGRS, I choose hidden as the type, because I wanted to keep the calculation hidden from the end user of the survey, but still have this information be submitted as a GIS attribute to the ArcGIS feature layer.

When using the pulldata("@geopoint") function you can control the precision of the coordinates you will get back. In the example I provide above, no precision parameter is passed. When no precision is set, the default precision for MGRS is 1 meter, and for USNG is 10 meters.

For clarity, this is what USNG coordinates at different precisions will look like:

11SGZD and 100 km Grid Square ID, precision level 100 km
11S MS 8 1precision level 10 km
11S MS 85 18precision level 1 km
11S MS 851 184precision level 100 m
11S MS 8513 1846precision level 10 m
11S MS 85138 18466precision level 1m

When working on WGS84 and NAD83, MGRS and USNG are the same, although the notation for USNG typically  includes spaces in between the Grid designator, 100K meter grid and Northing and Easting.

In the following example, I am passing a precision parameter with a value of 100, to get a 100 meter MGRS grid. I could have passed a value of 1, to get a 1 meter MGRS grid, or 0.1 to get a 10 cm grid.

pulldata("@geopoint",${location},"MGRS",100)

The pulldata("@geopoint") function supports many other properties as described in our Geopoints—Survey123 for ArcGIS | ArcGIS help topic.

More on MGRS and USNG in ArcGIS

There are a number of additional utilities within ArcGIS that will help you work with MGRS and USNG.

9 Comments
BrentKinal1
Occasional Contributor III

Thanks for the post Ismael!

This was very timely with a form I've been working on. However Survey123 doesn't seem to be reporting the correct USNG cell for my location. Please see accompanying images for the same location in Survey123 and in an AGOL web map. Not sure if I am doing something wrong or there is a bug.

Survey123 screen shot

AGOL web map

IsmaelChivite
Esri Notable Contributor

Hi Brent. The USNG coordinates you see are different because the precision is different. In the webmap, you are looking at a USNG grid of 1000 meters (1KM). In the Survey123 app, you are looking at a USNG grid of 10 meters.  If you zoom your webmap into a USNG grid of 10 meters you will see that the coordinates match.

The last 4 numbers in your web map screenshot represent the Easting and Northing. That is 02 and 22.  In the phone, you are getting two extra levels of precision for both the Easting and Northing. That is: 0271 and 2264.

You are getting the coordinates right. They simply have two different levels of precision.

How to Read a United States National Grid (USNG) Spatial Address — Federal Geographic Data Committee 

BrentKinal1
Occasional Contributor III

Ahh...I was definitely reading them wrong.  Thanks for the clarification!

S_-_EvanRaskin__GISS_
Occasional Contributor

Ismael Chivite‌, this information about precision is very helpful. I'd like to record UTM easting & northing to 2 decimal places, and have set up two questions with the following calculation: pulldata("@geopoint", ${Waypoint}, "UTM.easting",0.01) & pulldata("@geopoint", ${Waypoint}, "UTM.northing",0.01). I have the fieldType set to esriFieldTypeDouble. While I do now get 2 decimal places in my feature service for these fields, they are always zeros. What do I need to change? Can Survey123 not calculate UTM values more precisely than 1m? Thanks.

IsmaelChivite
Esri Notable Contributor

Hi! The UTM.easting and UTM.northing parameters always return meters. The implementation does not return anything more precise than a meter for UTM.  The extra parameter you added (0.01) is being ignored.

S_-_EvanRaskin__GISS_
Occasional Contributor

Okay, thanks, I figured it was something like that. Is there a way to get UTM coordinates with higher precision returned from the survey, or will I need to convert from the latitude & longitude values to get higher precision UTM coordinates?

BrunoGomes_de_Souza
Esri Contributor

Hey Ismael,

Do you have some tip about Datum and how implement it inside survey 123?

I have some coordinates in South American Datum 69, and wish to do a pull data of these coordinates, but it will convert properly?

JudithLandry
New Contributor II

Hi @IsmaelChivite,

We’ve been working with Survey123 for fieldwork for a year now and we do samplings that need very accurate coordinates. We use UTM given that it's easier to compile short distances. Since Survey123 doesn’t use UTM coordinates directly, I wanted to know which NAD83 conversion system is used to convert lat/long to UTM in the app? Depending on the UTM system chosen, we obtain slight variations.

We eventually have to reconvert UTM to lat/long in order to adjust geometry in Arcgis and we’d like to use the appropriate system.

JackFanZhang
Occasional Contributor

As of Feb 2024. According to Geopoints—ArcGIS Survey123 | Documentation

"These individual values can be extracted using additional parameters. For example, pulldata("@geopoint", ${location}, "UTM.easting", 0.01) returns only the easting value with a precision of 1 centimeter."

However, my survye123 (v3.17) for some reason only give me one decimal number even with the above expression.