source: subversion/applications/lib/ccoord/test.cpp @ 18255

Last change on this file since 18255 was 2197, checked in by nick, 13 years ago

Support for generating grid square letters added

File size: 560 bytes
Line 
1#include "OSRef.h"
2#include "LatLng.h"
3#include <iostream>
4using namespace std;
5
6int main()
7{
8        OSRef ref (489600, 128500);
9        LatLng latLng = ref.toLatLng();
10        cout << "Ref as six figure string: " << ref.toSixFigureString() << endl;
11        cout << latLng.getLat() << " " << latLng.getLng() << endl;
12        latLng.toWGS84();
13        cout << latLng.getLat() << " " << latLng.getLng() << endl;
14        latLng.toOSGB36();
15        cout << latLng.getLat() << " " << latLng.getLng() << endl;
16        OSRef ref2 = latLng.toOSRef();
17        cout << ref2.getEasting() << " " << ref2.getNorthing() << endl;
18
19        return 0;
20}
Note: See TracBrowser for help on using the repository browser.