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
- create a table (in memory)
- add an mgrs field
- create a cursor on that table
- insert a row with the MGRS value
- run convert coordinate notation tool, outputting a featureclass
- create another cursor on that featureclass
- 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.