Skip to content

Commit ba3fbc8

Browse files
committed
Merge pull request #1 from valhalla/kk_midgard
rename geo to midgard to keep with the theme
2 parents b765dd0 + 9044dc7 commit ba3fbc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+257
-240
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ libtool
3131
include/proto
3232
src/proto
3333
pbfgraphbuilder
34+
pathtest
3435
*.o
3536
.deps/
3637
.dirstamp

Makefile.am

+28-28
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ include_HEADERS = \
5656
include/baldr/nodeinfo.h \
5757
include/baldr/location.h \
5858
include/baldr/pathlocation.h \
59-
include/geo/linesegment2.h \
60-
include/geo/tiles.h \
61-
include/geo/aabbll.h \
62-
include/geo/polyline2.h \
63-
include/geo/obb2.h \
64-
include/geo/pointll.h \
65-
include/geo/vector2.h \
66-
include/geo/clipper2.h \
67-
include/geo/aabb2.h \
68-
include/geo/point2.h \
69-
include/geo/util.h \
70-
include/geo/distanceapproximator.h \
71-
include/geo/ellipse.h \
72-
include/geo/tilehierarchy.h \
59+
include/midgard/linesegment2.h \
60+
include/midgard/tiles.h \
61+
include/midgard/aabbll.h \
62+
include/midgard/polyline2.h \
63+
include/midgard/obb2.h \
64+
include/midgard/pointll.h \
65+
include/midgard/vector2.h \
66+
include/midgard/clipper2.h \
67+
include/midgard/aabb2.h \
68+
include/midgard/point2.h \
69+
include/midgard/util.h \
70+
include/midgard/distanceapproximator.h \
71+
include/midgard/ellipse.h \
72+
include/midgard/tilehierarchy.h \
7373
include/thor/adjacencylist.h \
7474
include/thor/astarheuristic.h \
7575
include/thor/edgecost.h \
@@ -93,20 +93,20 @@ libvalhalla_la_SOURCES = \
9393
src/baldr/nodeinfo.cc \
9494
src/baldr/location.cc \
9595
src/baldr/pathlocation.cc \
96-
src/geo/linesegment2.cc \
97-
src/geo/tiles.cc \
98-
src/geo/aabbll.cc \
99-
src/geo/polyline2.cc \
100-
src/geo/obb2.cc \
101-
src/geo/pointll.cc \
102-
src/geo/vector2.cc \
103-
src/geo/clipper2.cc \
104-
src/geo/aabb2.cc \
105-
src/geo/point2.cc \
106-
src/geo/util.cc \
107-
src/geo/distanceapproximator.cc \
108-
src/geo/ellipse.cc \
109-
src/geo/tilehierarchy.cc \
96+
src/midgard/linesegment2.cc \
97+
src/midgard/tiles.cc \
98+
src/midgard/aabbll.cc \
99+
src/midgard/polyline2.cc \
100+
src/midgard/obb2.cc \
101+
src/midgard/pointll.cc \
102+
src/midgard/vector2.cc \
103+
src/midgard/clipper2.cc \
104+
src/midgard/aabb2.cc \
105+
src/midgard/point2.cc \
106+
src/midgard/util.cc \
107+
src/midgard/distanceapproximator.cc \
108+
src/midgard/ellipse.cc \
109+
src/midgard/tilehierarchy.cc \
110110
src/thor/adjacencylist.cc \
111111
src/thor/astarheuristic.cc \
112112
src/thor/edgecost.cc \

include/baldr/directededge.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef VALHALLA_BALDR_DIRECTEDEDGE_H_
22
#define VALHALLA_BALDR_DIRECTEDEDGE_H_
33

4-
#include "geo/util.h"
4+
#include "midgard/util.h"
55
#include "graphid.h"
66

77
namespace valhalla {

include/baldr/edgeinfo.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
#include <vector>
55
#include <string>
66

7-
#include "geo/util.h"
8-
#include "geo/pointll.h"
7+
#include "midgard/pointll.h"
8+
#include "midgard/util.h"
99
#include "graphid.h"
1010

11-
using namespace valhalla::geo;
11+
using namespace valhalla::midgard;
1212

1313
namespace valhalla {
1414
namespace baldr {

include/baldr/location.h

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
#include <string>
55
#include <cstdint>
6-
#include "geo/pointll.h"
6+
7+
#include "midgard/pointll.h"
78

89
namespace valhalla{
910
namespace baldr{
@@ -27,7 +28,7 @@ struct Location {
2728
* Constructor.
2829
* @param latlng the polar coordinates of the location
2930
*/
30-
Location(const geo::PointLL& latlng, const StopType& stoptype = StopType::BREAK);
31+
Location(const midgard::PointLL& latlng, const StopType& stoptype = StopType::BREAK);
3132

3233
/**
3334
* Constructor.
@@ -36,14 +37,14 @@ struct Location {
3637
Location(const std::string geojson);
3738

3839
//coordinates of the location as used for routing
39-
geo::PointLL latlng_;
40+
midgard::PointLL latlng_;
4041
//type of location for routing
4142
StopType stoptype_;
4243

4344
//TODO: fill these out in constructors and add getters and setters
4445
/*
4546
//the spot where the feature is on the map
46-
geo::PointLL display_latlng_;
47+
midgard::PointLL display_latlng_;
4748
//name of the location (useful for POIs)
4849
std::string name_;
4950
//address of the location, probably should be its own more broken up structure

include/baldr/nodeinfo.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#ifndef VALHALLA_BALDR_NODEINFO_H_
22
#define VALHALLA_BALDR_NODEINFO_H_
33

4-
#include "geo/util.h"
5-
#include "geo/pointll.h"
4+
#include "midgard/pointll.h"
5+
#include "midgard/util.h"
66
#include "graphid.h"
77

8-
using namespace valhalla::geo;
8+
using namespace valhalla::midgard;
99

1010
namespace valhalla {
1111
namespace baldr {

include/geo/aabb2.h include/midgard/aabb2.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
#ifndef VALHALLA_GEO_AABB2_H_
2-
#define VALHALLA_GEO_AABB2_H_
1+
#ifndef VALHALLA_MIDGARD_AABB2_H_
2+
#define VALHALLA_MIDGARD_AABB2_H_
33

44
#include <vector>
5-
#include "point2.h"
5+
6+
#include "midgard/point2.h"
67

78
namespace valhalla{
8-
namespace geo{
9+
namespace midgard{
910

1011
/**
1112
* Axis Aligned Bounding Box (2 dimensional)
@@ -163,4 +164,4 @@ class AABB2 {
163164
}
164165
}
165166

166-
#endif // VALHALLA_GEO_AABB2_H_
167+
#endif // VALHALLA_MIDGARD_AABB2_H_

include/geo/aabbll.h include/midgard/aabbll.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#ifndef VALHALLA_GEO_AABBLL_H_
2-
#define VALHALLA_GEO_AABBLL_H_
1+
#ifndef VALHALLA_MIDGARD_AABBLL_H_
2+
#define VALHALLA_MIDGARD_AABBLL_H_
33

4-
#include "aabb2.h"
5-
#include "pointll.h"
4+
#include "midgard/aabb2.h"
5+
#include "midgard/pointll.h"
66

77
namespace valhalla{
8-
namespace geo{
8+
namespace midgard{
99

1010
/**
1111
* Rectangular latitude, longitude region defined by its bounding box.
@@ -95,5 +95,5 @@ TODO - figure this out (how to use base class?
9595
}
9696
}
9797

98-
#endif // VALHALLA_GEO_AABBLL_H_
98+
#endif // VALHALLA_MIDGARD_AABBLL_H_
9999

include/geo/clipper2.h include/midgard/clipper2.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
#ifndef VALHALLA_GEO_CLIPPER2_H_
2-
#define VALHALLA_GEO_CLIPPER2_H_
1+
#ifndef VALHALLA_MIDGARD_CLIPPER2_H_
2+
#define VALHALLA_MIDGARD_CLIPPER2_H_
33

44
#include <vector>
55

6-
#include "aabb2.h"
7-
#include "point2.h"
6+
#include "midgard/aabb2.h"
7+
#include "midgard/point2.h"
88

99
namespace valhalla{
10-
namespace geo{
10+
namespace midgard{
1111

1212
/**
1313
* Clipping support. Clips a polygon or polyline to a rectangular
@@ -76,5 +76,5 @@ class Clipper2 {
7676
}
7777
}
7878

79-
#endif // VALHALLA_GEO_CLIPPER2_H_
79+
#endif // VALHALLA_MIDGARD_CLIPPER2_H_
8080

include/geo/constants.h include/midgard/constants.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#ifndef VALHALLA_GEO_CONSTANTS_H_
2-
#define VALHALLA_GEO_CONSTANTS_H_
1+
#ifndef VALHALLA_MIDGARD_CONSTANTS_H_
2+
#define VALHALLA_MIDGARD_CONSTANTS_H_
33

44
#include <math.h>
55

66
namespace valhalla{
7-
namespace geo{
7+
namespace midgard{
88

99
// Time constants
1010
constexpr float kSecPerHour = 3600.0f;
@@ -26,5 +26,5 @@ constexpr float kEpsilon = 0.000001f;
2626

2727
}
2828
}
29-
#endif // VALHALLA_GEO_CONSTANTS_H_
29+
#endif // VALHALLA_MIDGARD_CONSTANTS_H_
3030

include/geo/distanceapproximator.h include/midgard/distanceapproximator.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11

2-
#ifndef VALHALLA_GEO_DISTANCEAPPROXIMATOR_H_
3-
#define VALHALLA_GEO_DISTANCEAPPROXIMATOR_H_
2+
#ifndef VALHALLA_MIDGARD_DISTANCEAPPROXIMATOR_H_
3+
#define VALHALLA_MIDGARD_DISTANCEAPPROXIMATOR_H_
44

55
#include <math.h>
66

7-
#include "pointll.h"
7+
#include "midgard/pointll.h"
88

99
namespace valhalla{
10-
namespace geo{
10+
namespace midgard{
1111

1212
/**
1313
* Provides distance approximation in latitude, longitude space. Approximates
@@ -83,5 +83,5 @@ class DistanceApproximator
8383
}
8484
}
8585

86-
#endif // VALHALLA_GEO_DISTANCEAPPROXIMATOR_H_
86+
#endif // VALHALLA_MIDGARD_DISTANCEAPPROXIMATOR_H_
8787

include/geo/ellipse.h include/midgard/ellipse.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
#ifndef VALHALLA_GEO_ELLIPSE_H_
2-
#define VALHALLA_GEO_ELLIPSE_H_
1+
#ifndef VALHALLA_MIDGARD_ELLIPSE_H_
2+
#define VALHALLA_MIDGARD_ELLIPSE_H_
33

44
#include <math.h>
55

6-
#include "point2.h"
7-
#include "util.h"
8-
#include "linesegment2.h"
9-
#include "aabb2.h"
6+
#include "midgard/aabb2.h"
7+
#include "midgard/linesegment2.h"
8+
#include "midgard/point2.h"
9+
#include "midgard/util.h"
1010

1111
namespace valhalla{
12-
namespace geo{
12+
namespace midgard{
1313

1414
/**
1515
* Ellipse
@@ -73,6 +73,6 @@ class Ellipse {
7373
}
7474
}
7575

76-
#endif // VALHALLA_GEO_ELLIPSE_H_
76+
#endif // VALHALLA_MIDGARD_ELLIPSE_H_
7777

7878

include/geo/linesegment2.h include/midgard/linesegment2.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#ifndef VALHALLA_GEO_LINESEGMENT2_H_
2-
#define VALHALLA_GEO_LINESEGMENT2_H_
1+
#ifndef VALHALLA_MIDGARD_LINESEGMENT2_H_
2+
#define VALHALLA_MIDGARD_LINESEGMENT2_H_
33

44
#include <math.h>
55
#include <vector>
66

7-
#include "point2.h"
8-
#include "vector2.h"
7+
#include "midgard/point2.h"
8+
#include "midgard/vector2.h"
99

1010
namespace valhalla{
11-
namespace geo{
11+
namespace midgard{
1212

1313
/**
1414
* Line segment in 2D
@@ -87,4 +87,4 @@ class LineSegment2 {
8787
}
8888
}
8989

90-
#endif // VALHALLA_GEO_LINESEGMENT2_H_
90+
#endif // VALHALLA_MIDGARD_LINESEGMENT2_H_

include/geo/obb2.h include/midgard/obb2.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#ifndef VALHALLA_GEO_OBB2_H_
2-
#define VALHALLA_GEO_OBB2_H_
1+
#ifndef VALHALLA_MIDGARD_OBB2_H_
2+
#define VALHALLA_MIDGARD_OBB2_H_
33

44
#include <stdarg.h>
55
#include <math.h>
66

7-
#include "point2.h"
8-
#include "vector2.h"
7+
#include "midgard/point2.h"
8+
#include "midgard/vector2.h"
99

1010
namespace valhalla{
11-
namespace geo{
11+
namespace midgard{
1212

1313
/**
1414
* Oriented bounding box (2-D).
@@ -40,4 +40,4 @@ class OBB2 {
4040
}
4141
}
4242

43-
#endif // VALHALLA_GEO_OBB2_H_
43+
#endif // VALHALLA_MIDGARD_OBB2_H_

include/geo/point2.h include/midgard/point2.h

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#ifndef VALHALLA_GEO_POINT2_H_
2-
#define VALHALLA_GEO_POINT2_H_
1+
#ifndef VALHALLA_MIDGARD_POINT2_H_
2+
#define VALHALLA_MIDGARD_POINT2_H_
33

44
#include <math.h>
55
#include <vector>
66

77
namespace valhalla{
8-
namespace geo{
8+
namespace midgard{
99

1010
// Forward references
1111
class Vector2;
@@ -122,8 +122,6 @@ class Point2 {
122122
*/
123123
Point2 MidPoint(const Point2& p1) const;
124124

125-
// The following methods are defined in geo.h
126-
127125
/**
128126
* Add a vector to the current point.
129127
* @param v Vector to add to the current point.
@@ -170,4 +168,4 @@ class Point2 {
170168
}
171169
}
172170

173-
#endif // VALHALLA_GEO_POINT2_H_
171+
#endif // VALHALLA_MIDGARD_POINT2_H_

0 commit comments

Comments
 (0)