Commit Graph

736 Commits

Author SHA1 Message Date
Michael Krasnyk
84b618ed1a Add headers consistency check 2016-12-15 10:58:17 +01:00
Moritz Kobitzsch
dc8e6bd8d9 use correct type in graph contractor to avoid overflows in nodes 2016-12-15 10:56:07 +01:00
karenzshea
68e38880df switch back to lua based env naming 2016-12-15 10:55:16 +01:00
karenzshea
d5904d5756 increase template depth on clang and gcc builds 2016-12-15 10:55:16 +01:00
Daniel J. Hofmann
0f59b78c02 Rewrite lua bindings using sol interface 2016-12-15 10:55:16 +01:00
Daniel J. Hofmann
6e7fe5feb0 Clean plate: luabind ripped out and sol2 basic integration 2016-12-15 10:55:16 +01:00
Daniel Patterson
3dfbf42e61 Don't mark all lanes as designated when there are blank lane specifiers in the tag. 2016-12-15 10:55:16 +01:00
Daniel Patterson
f88f51fd98 Log some memory usage statistics after preprocessing tasks. 2016-12-13 21:59:12 +01:00
Daniel Patterson
8c7f744b1a Update node weights if traffic data is applied. 2016-12-11 16:02:58 +01:00
Huyen Chau Nguyen
62f0e11bfa assert that there is an open logger file when trying to log geojson output (#3417) 2016-12-09 14:58:20 +01:00
Patrick Niklaus
03d653c0bb Fix removing shared memory segments in a multi-process setup 2016-12-09 12:18:05 +01:00
Daniel J. Hofmann
cbfb055f81 Changes Single Coordinate Geoms from Point to LineString, closes #3425. 2016-12-09 11:53:06 +01:00
Moritz Kobitzsch
2288704bb5 don't assign unused name to exception 2016-12-08 13:35:28 +01:00
Daniel J. Hofmann
97dcf4eef9 Fixes Compiler Crashes on Windows 2016-12-08 13:23:21 +01:00
Daniel J. Hofmann
875f482203 Refactors and improves the Sliproad Handler, resolves #3109 2016-12-07 19:22:03 +01:00
Moritz Kobitzsch
df3c39cef5 clean-up guidance code/code in general
removes duplicated includes
removes unused includes
eliminates dedicated toolkits that resulted in circular dependencies
moves functionality close to data, where possible
2016-12-07 12:10:56 +01:00
Daniel Patterson
468d8c0031 Refactor logging, improve error handling workflow, clang-format. (#3385) 2016-12-06 12:30:46 -08:00
Pepijn Schoen
6f4c6e84ae Handle file output through a FileWriter, align interfaces for FileWriter and FileReader 2016-12-06 15:59:12 +01:00
Daniel J. Hofmann
949d505783 Removes access_restricted flag internally 2016-12-05 14:15:47 +01:00
Daniel J. Hofmann
9d8b92f418 Abstracts away over differences in IntersectionView and Intersection.
Usage:

    struct MyIntersection : EnableIntersectionOps<MyIntersection> {

    };

Done.

We require MyIntersection having at least the member attributes from
IntersectionViewData but don't enforce a inheritance hierarchy.
2016-12-02 12:32:07 +01:00
Daniel Patterson
928a6f0c7d Variant got re-packaged, need to update search paths. (#3392) 2016-12-01 16:59:29 -08:00
Moritz Kobitzsch
561b7cc58e Rember Intersection Shapes
Changes the processing order in the edge based graph factory.
Instead of iterating over all outgoing edges in order, we compute the edge
expanded graph in the order of intersections.
This allows to remember intersection shapes and re-use them for all possible ingoing edges.

Also: use low accuracry mode for intersections degree 2 intersections

We can use lower accuracy here, since the `bearing`
after the turn is not as relevant for off-route detection.
Getting lost is near impossible here.
2016-12-01 15:24:20 +01:00
Daniel Patterson
5a311012af Consolidate file reading through the new FileReader class/interface. (#3321) 2016-11-30 19:08:01 -08:00
Moritz Kobitzsch
a1127c3e09 reduce numbers of intersections in findNextIntersection, don't normalise for turn lanes 2016-11-30 10:21:53 +01:00
Moritz Kobitzsch
12d58ace10 add support for junction=circular, allowing named circular junctions to be treated as rotaries 2016-11-29 13:44:32 +01:00
Moritz Kobitzsch
4636aaabfe make can be ignored false by default 2016-11-29 11:47:35 +01:00
Michael Krasnyk
e343f71541 Refactor Hilbert values computation 2016-11-28 14:17:12 +01:00
Moritz Kobitzsch
a49bd70985 add low precision intersection_generator mode for faster graph traversal 2016-11-22 18:25:19 +01:00
Kajari Ghosh
fc52dd85fe refactor graph_loader (#3333)
Refactors the GraphLoader class to use the safer FileReader wrapper for better error handling.
2016-11-21 17:32:00 -08:00
karenzshea
0bd08224bf add comments, refactor find obvious turn 2016-11-21 13:16:30 -05:00
Patrick Niklaus
3bade8625f Don't crash on assigning nil to a string in lua 2016-11-21 12:17:44 +01:00
Patrick Niklaus
95a584a30d Make rounding when computing PhantomNode weight symmetric
Resolves a problem where the duration in forward and backward direction
was slightly different.
2016-11-18 17:46:32 +01:00
Kerrick Staley
2c9e18d5a9 Hardcode search radius parameters 2016-11-17 17:56:23 +01:00
kerrick-lyft
b73c59088c Smarter search radius formula for map matching 2016-11-17 17:56:23 +01:00
Michael Krasnyk
ba2629456f Added a copy of std::align due to missing implementation in gcc < 5
References:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57350
2016-11-17 16:02:56 +01:00
Daniel J. Hofmann
1b4779a58c Avoids Shuffling Data Around for Nothing, closes 3306 2016-11-17 12:51:18 +01:00
Daniel J. H
73e365d398 Conditionally checks std::is_trivially_copyable only if available. (#3327) 2016-11-16 12:07:45 -08:00
Michael Krasnyk
d5bf508046 Fix alignments in shared facade via alignof/std::align 2016-11-16 18:20:19 +01:00
Daniel Patterson
eb12c16fd6 Output newlines for each progress indicator when not on a tty. 2016-11-15 18:14:05 -08:00
Daniel Patterson
17c32f5ce7 Fully revert 04f8b653c94614 2016-11-15 16:55:02 -08:00
Daniel Patterson
53ef2e2955 Use an enum type for the 'should read fingerprint' flag, rather than a mysterious boolean
Fix tests.
2016-11-15 16:55:02 -08:00
Daniel Patterson
7b1131b982 Consolidate vector deserialization. 2016-11-15 16:55:02 -08:00
Daniel Patterson
1fc969e6c8 Fix naming convention, and pass-by-reference for data layout. 2016-11-15 16:55:02 -08:00
Daniel Patterson
49f960064c Partial revert of 04f8b653c94614 - the PackedVector is special. 2016-11-15 16:55:02 -08:00
Daniel Patterson
83a9d0590d Pass-by-reference instead of pointer. 2016-11-15 16:55:02 -08:00
Daniel Patterson
d8b016b92a Simplify read error detection. 2016-11-15 16:55:02 -08:00
Daniel Patterson
608044305d Rename the datafacades to more clearly describe what they do. 2016-11-15 16:55:02 -08:00
Daniel Patterson
2dfeb0cabc Remove unused code. 2016-11-15 16:55:02 -08:00
Daniel Patterson
2f9b5788d0 Destructor should fail hard if an exception is raised. 2016-11-15 16:55:02 -08:00
Daniel Patterson
be496eb4e3 Return the type we claim it will return. 2016-11-15 16:55:02 -08:00
Daniel Patterson
97244557b1 Don't need to use new, make_unique<> can do what we need here. 2016-11-15 16:55:02 -08:00
Daniel Patterson
e2e5eb0169 Remove use of ShM<>::vector in favour of the boost::iterator_range 2016-11-15 16:55:02 -08:00
Daniel Patterson
6949d7ee5b Remove ownership of block pointers from base class. 2016-11-15 16:55:02 -08:00
Daniel Patterson
4ad6d88888 Refactor file loading to use a common class that has proper error handling. 2016-11-15 16:55:02 -08:00
Daniel Patterson
e226b52f21 const-ify things, use RAII for file closure, and start to use io:: to read some stuff. 2016-11-15 16:55:02 -08:00
Daniel Patterson
b1125b7f1f Rename base class to something more in line with it's actual function. 2016-11-15 16:55:02 -08:00
Daniel Patterson
33ff92d27e Remove debugging code. 2016-11-15 16:55:02 -08:00
Daniel Patterson
bf6df74d44 Consolidate datafacade file loading logic.
Both datafacades now use a single large memory block and common
file loading logic.
2016-11-15 16:55:02 -08:00
Daniel J. Hofmann
8f6dd805e5 Fixes ODR Violation in Graph Loader, closes #3308 2016-11-15 12:04:13 +01:00
Daniel J. Hofmann
7e4020c010 Allocates memory for the node info list upfront.
Turns out we were not doing this. Huh.

Callstack:
- 78583d2c8c/include/util/graph_loader.hpp (L65-L68)
- 538bbd47d1/src/extractor/extractor.cpp (L423-L424)
- 78583d2c8c/src/extractor/extractor.cpp (L465-L466)
- 78583d2c8c/src/extractor/extractor.cpp (L254-L261)
2016-11-15 00:06:52 +01:00
Moritz Kobitzsch
78583d2c8c fix getTurnDirection, widen straight range, adjust tests accordingly 2016-11-14 11:09:14 +01:00
Michael Krasnyk
b57169e221 Flush stxxl vectors before using in PrepareData 2016-11-12 02:09:51 +01:00
Moritz Kobitzsch
f88ac989ea reserve when possible 2016-11-11 14:48:50 +01:00
Moritz Kobitzsch
827a1fbd7a separate intersection generation and intersection normalization 2016-11-10 12:56:46 +01:00
Moritz Kobitzsch
e84a0ea37c reduce coordinate_extraction overhead. slowdown reduced by 30 percent 2016-11-10 10:44:54 +01:00
Moritz Kobitzsch
7073403f1b rip out dedicated file for single function (minor refactor) 2016-11-09 12:52:39 +01:00
Daniel Patterson
af7960a796 Fix buffering of query box - it was shrinking in the Y axis, rather than growing. 2016-11-08 11:45:28 -08:00
Daniel Patterson
4c6d6aeaa7 Fix retrieval of forward/reverse data. 2016-11-08 11:45:27 -08:00
Moritz Kobitzsch
9c11f4231c add locations feature to allow testing turn locations, fix minor bug breaking the arrival location 2016-11-08 13:42:15 +01:00
Moritz Kobitzsch
837ab105ad fix error in ordering arguments for requiresNameAnnounced versions 2016-11-08 12:14:23 +01:00
Daniel J. Hofmann
6ac9617d49 Adapt test to returning ref, Take Pronunciation into Account, Fixes name change heuristic usage in UTurn check 2016-11-08 12:14:23 +01:00
Daniel J. Hofmann
c1651ccb12 Uses Name Change Heuristic Instead of Comparing Name Ids
References:
- https://github.com/Project-OSRM/osrm-backend/issues/2857
- https://github.com/Project-OSRM/osrm-backend/pull/2900
- https://github.com/Project-OSRM/osrm-backend/issues/2909
2016-11-08 12:14:23 +01:00
Kajari Ghosh
f33180f092 request polyline with precision of 5 or 6 positions (#3220) 2016-11-07 15:11:21 -05:00
Moritz Kobitzsch
2fb40944bf pull in intersection finder accumulator 2016-11-04 13:28:09 +01:00
Moritz Kobitzsch
cd03877c90 link ConnectedRoad and TurnOperation via class hierarchy
and empower intersection by adding basic functionality to pod type
refactor extractor/toolkit into intersection
2016-11-03 13:42:29 +01:00
Patrick Niklaus
08a5648e3e Use coorect osm ids for start/target segment 2016-11-02 17:52:41 +00:00
Moritz Kobitzsch
faa5185440 add node-based-graph traversal capabilities 2016-11-02 15:38:09 +01:00
Moritz Kobitzsch
4ba8ccfcce add a geojson debugger that allows creating features for easy inspection 2016-11-02 14:54:00 +01:00
Kajari Ghosh
c30f43b148 added max_speed to the profiles (#3089) 2016-11-01 17:13:10 -04:00
Denis Koronchik
5da63998d6 Add support of custom ServiceHandler 2016-10-31 15:38:03 +01:00
Kajari Ghosh
6fc0609a62 Map matching test coverage fix (#3201)
* fixed map matching test coverage
2016-10-29 11:22:09 -04:00
Patrick Niklaus
f02b7b0910
[skip ci] Fix formating using format.sh 2016-10-28 14:45:05 -07:00
Denis Koronchik
dc7e61c25d Fix declaration of makeRouteStep function 2016-10-27 20:12:02 +02:00
Moritz Kobitzsch
88c3f4c481 Considering multiple small turns, right after each
other can result in a combined turn angle that is
straight instead of turning left and right.
2016-10-27 19:19:23 +02:00
Moritz Kobitzsch
01a2c66472 rip out unused m_node_info_list 2016-10-27 18:51:59 +02:00
Huyen Chau Nguyen
cf35bbeb50 refactor function names; consolidate readCount() functions;
remove templated types as much as possible for type safety;
add more comments;
clean up code, add const if possible;
2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
fe94977c9b refactor loading code of .ramIndex files and move to io.hpp 2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
69a60686dc refactor loading code of .datasource_indexes and .datasource_names files and move to io.hpp 2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
7b97e1035f refactor loading code of .nodes and .edges files and move to io.hpp 2016-10-26 13:18:52 -07:00
karenzshea
c4f010e363 read properties stream to size of properties object, not 1 2016-10-26 13:18:52 -07:00
karenzshea
51ebadfc45 deduplicate code for loading profile properties into io.hpp 2016-10-26 13:18:52 -07:00
Michael Krasnyk
7753845f5c Make thread-locked access to stxxl containers
From stxxl FAQ: "you should not share a data structure between
threads (without implementing proper locking yourself)."
The access to name_char_data can be implicitly parallelized
if _GLIBCXX_PARALLEL is defined and invalidate local-thread iterators.
2016-10-25 10:03:26 -07:00
Patrick Niklaus
b8795c7341 Rename increasingly inaccuratly named distance member of QueryEdge to weight 2016-10-21 21:00:02 +02:00
jakepruitt
c30784895d clang-format and remove debug 2016-10-20 11:32:28 -07:00
jakepruitt
fa1fc810ea std::for_each -> std::copy 2016-10-20 11:32:28 -07:00
jakepruitt
052b0e831d Remove debug logging 2016-10-20 11:32:28 -07:00
jakepruitt
42271d99b2 Store node ID's and weights separately in CompressedEdgeContainer
Removes CompressedEdges from the extractor and shared data format by
directly serializing vectors of node ID's, forward weights and reverse
weights for each node-based-edge

Refs #2575
2016-10-20 11:32:28 -07:00
Moritz Kobitzsch
ecee13bffa actually calculate distance instead of using .distance which is a timing value 2016-10-20 12:27:02 +02:00
Moritz Kobitzsch
5e167b8745 Turn Angles in OSRM were computed using a lookahead of 10 meters.
This PR adds more advanced coordinate extraction, analysing the road
to detect offsets due to OSM way modelling.

In addition it improves the handling of bearings. Right now OSM reports
bearings simply based on the very first coordinate along a way.
With this PR, we store the bearings for a turn correctly, making the
bearings for turns correct.
2016-10-20 10:47:29 +02:00
Huyen Chau Nguyen
2d13116487 fix memory leak of char[] initialization 2016-10-19 17:26:21 -07:00