AnsweredAssumed Answered

What's the best way to convert MGRS to UTM XY (value to value)

Question asked by timmo1982 on Aug 22, 2017
Latest reply on Aug 23, 2017 by timmo1982

I'm updating my script which reads a spreadsheet of values including coordinates but the spreadsheet is not formatted as a table par se. Instead of projected X and Y coordinates, I'd like to move to the user inputting a single MGRS value for each coordinate/position required.

This requires conversion back into X and Y values for the actual processing (i.e. arcpy.point(x,y)).

Unfortunately, the arcpy.ConvertCoordinateNotation requies a input table and gives an output featureclass and I'm dealing with discreet values. In other words, I just want to give an MGRS (string) and get a UTM X (long) & Y (long) from arcpy....the tool isn't designed to work at that fundamental level which seems odd.

 

So, working through that, it seems as if, given a single MGRS value I need to

  1. create a table (in memory)
  2. add an mgrs field
  3. create a cursor on that table
  4. insert a row with the MGRS value
  5. run convert coordinate notation tool, outputting a featureclass
  6. create another cursor on that featureclass
  7. read the row to get the X and Y values.

 

....and that's for a single conversion.

So my question is: "Is that the best way"?! It seems very convoluted.

Outcomes