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.

I'm looking for a function/formula/library that basically takes a MGRS square identifier such as 4QFJ16 and returns me the coordinates of the 4 corners of this polygon in some simple form such as EPSG:4326 lat/lon pair.

The idea behind is that I regularly have data to display where we only know in which square it was taken (no northing/easting information). So I'd simply like to be able to display this specific polygon on a map.

What I can find easily is large graticules as shapefiles, or information to convert a specific point in this square to lat/lon coordinates.

But some "as simple as possible" formula would be better, since I could easily make browser calculations instead of embedding a huge amount of data (the complete graticule). Also, a formula would have the advantage to be language-agnostic, so I can use it for different use cases (realtime JS conversion JS, filling a PostGIS database, ...).

I don't need a huge precision, I work with 10 or 1km MGRS squares.

Hope my question is clear. Many thanks in advance.

share|improve this question
    
Not language-agnostic as requested, but possible duplicate: gis.stackexchange.com/questions/48340/… –  mkennedy May 29 '13 at 16:47
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.