[postgis-users] MGRS reference system
Jim Klassen
klassen.js at gmail.com
Wed Aug 22 10:03:57 PDT 2018
I have done a lot of work with the US National Grid (USNG) which is very similar to the MGRS. It is a bit of an odd coordinate system because it uses one string rather than two numbers for the coordinate, as such it doesn't really fit into a geometry type directly (and that is ignoring that it technically defines areas not points).
To deal with this, I store the coordinates in a "normal" coordinate system in PostGIS and wrote a PostgreSQL binding to my C++ library to convert to/from the string form only for input/output [1]. I have developed and tested this in so far as what I have needed personally. I'm sure there is further work needed (PRs welcome). Also, note I've done all this on Linux and have no idea if it works under Windows.
Another (potentially more Windows friendly) option could be to use PL/v8 and adapt my JavaScript USNG implementation [2] or the Proj4JS MGRS implementation [3].
[1] https://github.com/klassenjs/usng-tools-cxx
[2] https://github.com/klassenjs/usng-tools-js
[3] https://github.com/proj4js/mgrs
On 08/22/2018 04:01 AM, Per-Olof Norén wrote:
> Hi,
> Have a look at UTM.
> MGRS is using UTM and UPS.
>
> /p
>
> 22 aug. 2018 kl. 10:18 skrev Lars <laasunde at hotmail.com <mailto:laasunde at hotmail.com>>:
>
>> Hello,
>>
>> Does PostGIS support MGRS reference system? If no, are there any plans to add support for this reference system?
>>
>> Viewing the spatial_ref_sys table there is no entry name MGRS or similar.
>>
>> Using Windows 10, PostgreSQL 10.3 and PostGIS 2.4.4
>>
>> Appreciate any response.
>>
>> kind regards, Lars
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org>
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20180822/0a8c37cf/attachment.html>
More information about the postgis-users
mailing list