[Proj] Converting between true north, grid north, and magnetic north

Thomas Knudsen knudsen.thomas at gmail.com
Sun Feb 4 05:44:54 PST 2018


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.

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).

/thomas



2018-02-04 13:08 GMT+01:00 Chen Barnoy <jicrbuh1 at gmail.com>:

> Thanks!
>
> And is there a similar library to convert between grid\UTM north to true
> north?
>
> 2018-01-30 23:59 GMT+02:00 Kurt Schwehr <schwehr at gmail.com>:
>
>> Be aware that the magnetic field is time varying.  It can change pretty
>> quickly near the magnetic poles.
>>
>> Yet another source... igrf.py
>>
>> https://earthref.org/PmagPy/cookbook/#x1-1190005.2.54
>>
>
> On Tue, Jan 30, 2018 at 7:03 AM, Charles Karney <charles.karney at sri.com>
> wrote:
>
>> GeographicLib https://geographiclib.sourceforge.io provides access to
>> several magnetic models via the MagneticField utility.  E.g.,
>>
>>    echo 42.363 -71.006 | MagneticField -t now
>>
>> =>
>>
>>    -14.67 67.08 20228.0 19569.1 -5121.1 47840.0 51940.7
>>
>> The first number is the current magnetic declination at Boston Logan
>> Airport using the wmm2015 magnetic model.
>>
>> The magnetic models need to be downloaded separately from the
>> GeographicLib library using
>>
>>    geographiclib-get-magnetic
>>
>> On 01/30/18 06:42, Chen Barnoy wrote:
>> > Hi,
>> >
>> > Is there a way to convert between grid north, true north and magnetic
>> > north in Proj4 or another library?
>> >
>> > Cheers,
>> > Chen
>> >
>> >
>> > _______________________________________________
>> > Proj mailing list
>> > Proj at lists.maptools.org
>> > http://lists.maptools.org/mailman/listinfo/proj
>> >
>> _______________________________________________
>> Proj mailing list
>> Proj at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/proj
>>
>
>
>
> --
> --
> http://schwehr.org
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20180204/69ad3bde/attachment.html>


More information about the Proj mailing list