[Proj] MGRS/USNG support?

Frank Warmerdam warmerdam at pobox.com
Thu May 4 15:26:42 EDT 2006


Eric Miller wrote:
> How difficult would it be to support the Military Grid Reference System
> (and U.S. National Grid)?  They're basically UTM but as a single
> alphanumeric string.  It seems it'd be a bit tricky since most of library
> and console programs act on coordinate pairs.  Basically, support would
> have to preprocess inputs and postprocess outputs somehow.  I'd imagine
> there would need to be a flag controlling desired output precision. (unless
> an existing flag can serve that purpose -w/n/ ?)
> 
> Are people:
> 
> 1) Opposed 2) Supportive 3) Ambivalent 4) Don't care

Eric,

I'm ... not supportive but opposed would be a bit strong.

I looked over this problem a while ago, and came to the conclusion that
MGRS just doesn't fit into the scheme of the PROJ.4 API with x/y (and
sometimes z) coordinates and an associated coordinate system.

So I think if we offered MGRS support in PROJ.4 it would be a special
"layered service", and not built into pj_inv(), pj_fwd() and pj_transform().

For this reason, when I needed MGRS handling in GDAL I just hacked to
together local handling for it.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the Proj mailing list