source: subversion/applications/lib/libosm/llgr.cpp @ 34562

Last change on this file since 34562 was 11677, checked in by nienhueser, 11 years ago

Include cstring for GCC 4.3
Change include paths to fit with debian's way of packaging shp
Include headers from ccoord using their directory for easier deployment

File size: 425 bytes
Line 
1#include "llgr.h"
2#include "ccoord/OSRef.h"
3#include "ccoord/LatLng.h"
4
5namespace OSM
6{
7
8EarthPoint wgs84_ll_to_gr(const EarthPoint& p)
9{
10        LatLng ll (p.y, p.x);
11        ll.toOSGB36();
12        OSRef gr = ll.toOSRef();
13        return EarthPoint(gr.getEasting(), gr.getNorthing());
14}
15
16EarthPoint gr_to_wgs84_ll(const EarthPoint& p)
17{
18        OSRef gr (p.x, p.y);
19        LatLng ll = gr.toLatLng();
20        ll.toWGS84();
21        return EarthPoint(ll.getLng(),ll.getLat());
22}
23
24}
Note: See TracBrowser for help on using the repository browser.