Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Does anyone know of any packages out there that implement a pure python method to convert lat/long coordinates to MGRS coordinates?

PyPi has a package, but it requires some c-extensions from another source, and I didn't want to use that. I figured before I go an recreate a complicated process, I'm hoping the community can make my life a tad easier.

Thanks everyone!

share|improve this question
    
Is this the pypi package you are referring to? –  Chad Cooper Feb 10 '12 at 15:24
    
Yep, this is the pypi package I am talking about. –  Josh Feb 10 '12 at 16:18
    
The GeoTrans C extensions come bundled in the package and are free to use. Is usage the issue? –  Chad Cooper Feb 10 '12 at 16:25

1 Answer 1

I'm the developer of the PyPI package. You could simply port the GeoTRANS code that lives in this package to Python if you want a pure-Python extension. Do you want to use this on AppEngine or something? Otherwise, a ctypes wrapper to a C extension that you don't have to worry about at all with pre-compiled versions for Windows is as good as it'll get...

share|improve this answer
    
Howard, Can you post a link to the c-code? Thanks Josh –  user5915 Feb 13 '12 at 12:00
    
Josh, if you pull the .tar.gz file of the PyPI package, the C files are in there to just do the MGRS. Note that there's a lot of trig and other messy math :) –  Howard Butler Feb 15 '12 at 2:57
    
Thanks Howard. I'll let you know how I do. I can't post a comment I noticed once some person determined this question was answered. –  josh1234 Feb 15 '12 at 11:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.