<div dir="ltr"><div><div>libproj, the library behind proj, provides what you need, but you'll have to do some coding yourself. If you're using the new API in te brand new PROJ 5.0.0 release candidate, just announced, use the proj_factors(PJ, LP) function - the convergence is in the PJ_FACTORS.meridian_convergence element. In the old API, use pj_factors, and get what you need from the struct FACTORS.conv element.<br><br></div>For smaller amounts of data, you can use proj to provide what you need, as outlined in my previous reply (which actually used UTM as example).<br><br></div>/thomas<br><div><br><div> </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-04 13:08 GMT+01:00 Chen Barnoy <span dir="ltr"><<a href="mailto:jicrbuh1@gmail.com" target="_blank">jicrbuh1@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="rtl"><div dir="ltr">Thanks!</div><div dir="ltr"><br></div><div dir="ltr">And is there a similar library to convert between grid\UTM north to true north?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><div dir="ltr"><br><div class="gmail_quote">2018-01-30 23:59 GMT+02:00 Kurt Schwehr <span dir="ltr"><<a href="mailto:schwehr@gmail.com" target="_blank">schwehr@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Be aware that the magnetic field is time varying. It can change pretty quickly near the magnetic poles.<div><br></div><div>Yet another source... igrf.py</div><div><br></div><div><a href="https://earthref.org/PmagPy/cookbook/#x1-1190005.2.54" target="_blank">https://earthref.org/PmagPy/co<wbr>okbook/#x1-1190005.2.54</a><br></div></blockquote></div><div class="gmail_extra"><div><div class="m_-2189399980262259173h5"><br><div class="gmail_quote">On Tue, Jan 30, 2018 at 7:03 AM, Charles Karney <span dir="ltr"><<a href="mailto:charles.karney@sri.com" target="_blank">charles.karney@sri.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">GeographicLib <a href="https://geographiclib.sourceforge.io" rel="noreferrer" target="_blank">https://geographiclib.sourcefo<wbr>rge.io</a> provides access to<br>
several magnetic models via the MagneticField utility. E.g.,<br>
<br>
echo <a href="tel:42.363%20-71.006" value="+14236371006" target="_blank">42.363 -71.006</a> | MagneticField -t now<br>
<br>
=><br>
<br>
-14.67 67.08 20228.0 19569.1 -5121.1 47840.0 51940.7<br>
<br>
The first number is the current magnetic declination at Boston Logan<br>
Airport using the wmm2015 magnetic model.<br>
<br>
The magnetic models need to be downloaded separately from the<br>
GeographicLib library using<br>
<br>
geographiclib-get-magnetic<br>
<div class="m_-2189399980262259173m_4937636515122057016HOEnZb"><div class="m_-2189399980262259173m_4937636515122057016h5"><br>
On 01/30/18 06:42, Chen Barnoy wrote:<br>
> Hi,<br>
><br>
> Is there a way to convert between grid north, true north and magnetic<br>
> north in Proj4 or another library?<br>
><br>
> Cheers,<br>
> Chen<br>
><br>
><br>
</div></div><div class="m_-2189399980262259173m_4937636515122057016HOEnZb"><div class="m_-2189399980262259173m_4937636515122057016h5">> ______________________________<wbr>_________________<br>
> Proj mailing list<br>
> <a href="mailto:Proj@lists.maptools.org" target="_blank">Proj@lists.maptools.org</a><br>
> <a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/mail<wbr>man/listinfo/proj</a><br>
><br>
______________________________<wbr>_________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org" target="_blank">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/mail<wbr>man/listinfo/proj</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="m_-2189399980262259173HOEnZb"><font color="#888888">-- <br><div class="m_-2189399980262259173m_4937636515122057016gmail_signature" data-smartmail="gmail_signature">--<div><a href="http://schwehr.org" target="_blank">http://schwehr.org</a></div></div>
</font></span></div></div></div>
</div></div><br>______________________________<wbr>_________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a><br></blockquote></div><br></div>