<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
Jim,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,EmojiFont,'Apple Color Emoji','Segoe UI Emoji', NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size: 12pt;">
Thank you for a very <span>helpful feedback on MGRS and its oddity <span>😊</span></span></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,EmojiFont,'Apple Color Emoji','Segoe UI Emoji', NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size: 12pt;">
<span><br>
</span></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,EmojiFont,'Apple Color Emoji','Segoe UI Emoji', NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size: 12pt;">
<span>Will consider your binding solution.</span></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,EmojiFont,'Apple Color Emoji','Segoe UI Emoji', NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size: 12pt;">
<span><br>
</span></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,EmojiFont,'Apple Color Emoji','Segoe UI Emoji', NotoColorEmoji,'Segoe UI Symbol','Android Emoji',EmojiSymbols; font-size: 12pt;">
<span>Lars</span></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
</div>
<hr tabindex="-1" style="width: 98%; display: inline-block;">
<div id="divRplyFwdMsg" dir="ltr"><font color="#000000" face="Calibri, sans-serif" style="font-size: 11pt;"><b>Fra:</b> postgis-users <postgis-users-bounces@lists.osgeo.org> pÃ¥ vegne av Jim Klassen <klassen.js@gmail.com><br>
<b>Sendt:</b> onsdag 22. august 2018 19.03<br>
<b>Til:</b> postgis-users@lists.osgeo.org<br>
<b>Emne:</b> Re: [postgis-users] MGRS reference system</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div style="background-color: rgb(255, 255, 255);">
<p>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).<br>
</p>
<p>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.<br>
</p>
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].<br>
<br>
<br>
<p>[1] <a class="x_moz-txt-link-freetext" href="https://github.com/klassenjs/usng-tools-cxx">
https://github.com/klassenjs/usng-tools-cxx</a></p>
[2] <a class="x_moz-txt-link-freetext" href="https://github.com/klassenjs/usng-tools-js">
https://github.com/klassenjs/usng-tools-js</a><br>
<br>
[3] <a class="x_moz-txt-link-freetext" href="https://github.com/proj4js/mgrs">https://github.com/proj4js/mgrs</a><br>
<br>
<div class="x_moz-cite-prefix">On 08/22/2018 04:01 AM, Per-Olof Norén wrote:<br>
</div>
<blockquote type="cite">
<meta content="text/html; charset=utf-8">
<div>Hi,</div>
<div>Have a look at UTM.</div>
<div>MGRS is using UTM and UPS.</div>
<div><br>
</div>
<div>/p</div>
<div><br>
22 aug. 2018 kl. 10:18 skrev Lars <<a href="mailto:laasunde@hotmail.com">laasunde@hotmail.com</a>>:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div>Hello,</div>
<div><br>
</div>
<div>Does PostGIS support MGRS reference system? If no, are there any plans to add support for this reference system?</div>
<div><br>
</div>
<div>Viewing the spatial_ref_sys table there is no entry name MGRS or similar.</div>
<div><br>
</div>
<div>Using Windows 10, PostgreSQL 10.3 and PostGIS 2.4.4</div>
<div><br>
</div>
<div>Appreciate any response.</div>
<div><br>
</div>
<div>kind regards, Lars<br>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>postgis-users mailing list</span><br>
<span><a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a></span><br>
<span><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></span></div>
</blockquote>
<br>
<fieldset class="x_mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
postgis-users mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="x_moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<br>
</div>
</body>
</html>