about summary refs log tree commit diff stats
path: root/src/bounding_box.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bounding_box.h')
-rw-r--r--src/bounding_box.h88
1 files changed, 0 insertions, 88 deletions
diff --git a/src/bounding_box.h b/src/bounding_box.h deleted file mode 100644 index 25c7790..0000000 --- a/src/bounding_box.h +++ /dev/null
@@ -1,88 +0,0 @@
1#ifndef BOUNDING_BOX_H_75D2077D
2#define BOUNDING_BOX_H_75D2077D
3
4namespace twitter {
5
6 class coordinate {
7 public:
8
9 coordinate(int degrees, int minutes = 0, int seconds = 0) :
10 _degrees(degrees),
11 _minutes(minutes),
12 _seconds(seconds)
13 {
14 }
15
16 int getDegrees() const
17 {
18 return _degrees;
19 }
20
21 int getMinutes() const
22 {
23 return _minutes;
24 }
25
26 int getSeconds() const
27 {
28 return _seconds;
29 }
30
31 operator double() const
32 {
33 return (double)_degrees + ((double)_minutes / (double)60) + ((double)_seconds / (double)3600);
34 }
35
36 private:
37
38 int _degrees;
39 int _minutes;
40 int _seconds;
41 };
42
43 class bounding_box {
44 public:
45
46 bounding_box(
47 coordinate south_west_long,
48 coordinate south_west_lat,
49 coordinate north_east_long,
50 coordinate north_east_lat) :
51 _south_west_long(south_west_long),
52 _south_west_lat(south_west_lat),
53 _north_east_long(north_east_long),
54 _north_east_lat(north_east_lat)
55 {
56 }
57
58 const coordinate& getSouthWestLongitude() const
59 {
60 return _south_west_long;
61 }
62
63 const coordinate& getSouthWestLatitude() const
64 {
65 return _south_west_lat;
66 }
67
68 const coordinate& getNorthEastLongitude() const
69 {
70 return _north_east_long;
71 }
72
73 const coordinate& getNorthEastLatitude() const
74 {
75 return _north_east_lat;
76 }
77
78 private:
79
80 coordinate _south_west_long;
81 coordinate _south_west_lat;
82 coordinate _north_east_long;
83 coordinate _north_east_lat;
84 };
85
86}
87
88#endif /* end of include guard: BOUNDING_BOX_H_75D2077D */