Converting Lat/Lon to MGRS in pure Python?

6969
5
10-02-2012 08:45 AM
NickJacob
New Contributor II
Hello All,

Anyone out there ever tried converting lat/long coordinates to MGRS purely in Python (without referencing anything compiled)? Attempting to find a solution for converting coordinates at ArcGIS for Desktop 9.3 in an easily sharable script and/or toolbox.

Thanks in advance to anyone that can help with this!
-Nick
Tags (2)
0 Kudos
5 Replies
MathewCoyle
Frequent Contributor
I'm sure it is possible, just not sure how feasible. You could try starting here to get ideas. Java and Python have a strong enough relationship that it should be fairly easy to cross over.

http://www.ibm.com/developerworks/java/library/j-coordconvert/
0 Kudos
ThaiTruong
Occasional Contributor II
Here is a library for Python:
http://pypi.python.org/pypi/mgrs#downloads
0 Kudos
MathewCoyle
Frequent Contributor
Here is a library for Python:
http://pypi.python.org/pypi/mgrs#downloads


Well there you go. Python really can do anything. Just remember to get the right version for your python install. (2.5 for ArcGIS 9.3)
0 Kudos
NickJacob
New Contributor II
No no...

That's just a wrapper for a dll file.  I'm limited to pure Python or an out of the box ESRI solution at 9.3 excluding Military Analyst.

Is there a way to do it through a transformation or projection maybe?
0 Kudos
ThaiTruong
Occasional Contributor II
No no...

That's just a wrapper for a dll file.  I'm limited to pure Python or an out of the box ESRI solution at 9.3 excluding Military Analyst.

Is there a way to do it through a transformation or projection maybe?


You need to have Convert Coordinates in File Tool from Military Analyst, Nick!
0 Kudos