Commit Graph

198 Commits

Author SHA1 Message Date
Patrick Niklaus
7cc689af7d Move bearing to public namespace 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
e1da384b62 Moves route assembly into implementation file 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b250fce92c Fixes remaining engine/guidance includes 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
11da796a70 Fixes accumulate living in <numeric> and not <algorithm> 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
2985e73938 Puts step maneuver handling into implementation file 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
5c39449263 Adapts MakeResponse to not pass vector by pointer 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
ea81866e28 Runs scripts/format.sh 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
8322a7ccaf bugfixing/classification 2016-03-31 18:58:52 +02:00
Patrick Niklaus
8c71239e48 Big Restructuring / Cleanup 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
ffb3578180 starting on conflict resolution 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
ebdae7591b handle segregated roads (merge for turn analysis) 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
0ba70bcbf9 structural changes, motorway handling 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
3cdd282e0f enter and exit roundabout feature - currently not showing turn 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
72202b7e4a migrated out of edge based graph factory 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
9f9040eaf6 relative waypoint locations 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
bc252ea110 handling of roundabouts (simple version) 2016-03-31 18:58:52 +02:00
Moritz Kobitzsch
bcf7741f95 advanced guidance on 5.0 2016-03-31 18:58:52 +02:00
Patrick Niklaus
4e9709d038 Fix table response format to return null + double in seconds 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
09d70f7342 Provides ctor from base path for EngineConfig, fixes #2030 2016-03-31 18:58:52 +02:00
Patrick Niklaus
666d363c93 Preliminary integration of the tile plugin 2016-03-31 18:58:52 +02:00
Patrick Niklaus
0182b9a584 sources and destinations can be empty actually 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
cc93ed15c0 Fixes coordinate, source and destination validation by means of backporting #2041 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b0a83191cd Fixes ownership semantics and forwarding references misplacements in the JSON factory 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
b8f6d3ca97 Unwrap function call from identity lambda 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
5a0ee6d1d8 Uses JSON's String constructor for polyline encoding 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
4e02e8e1a0 Passes coordinates by value 2016-03-31 18:58:52 +02:00
Patrick Niklaus
17382b2a28 Fix if the last coordinate is not found 2016-03-31 18:58:52 +02:00
Patrick Niklaus
c2423ef20f Allocate correct table size 2016-03-31 18:58:52 +02:00
Patrick Niklaus
77a4530433 Fix geometries type in steps 2016-03-31 18:58:52 +02:00
Patrick Niklaus
5e1a8d82d6 Fix behaviour of table if sources/destinations arrays are empty 2016-03-31 18:58:52 +02:00
Patrick Niklaus
60d83ccf53 First round of lat,lng -> lng,lat switcheroo 2016-03-31 18:58:52 +02:00
Patrick Niklaus
ce2c0ba160 Fix match and trip API response 2016-03-31 18:58:52 +02:00
Patrick Niklaus
776add7ea2 Fix out-of-bounds write in map_matching 2016-03-31 18:58:52 +02:00
Patrick Niklaus
db170d006a Finish the nearest plugin 2016-03-31 18:58:52 +02:00
Patrick Niklaus
84d79f789c Initialize NearestParameters correctly 2016-03-31 18:58:52 +02:00
Patrick Niklaus
b1d70b8a8c Adapt to feedback in #519 2016-03-31 18:58:52 +02:00
Patrick Niklaus
1b1211092b Add trip plugin 2016-03-31 18:58:52 +02:00
Patrick Niklaus
4e0f2e13bd Hook up map matching 2016-03-31 18:58:52 +02:00
Patrick Niklaus
28961ed593 First compiling version of map_match plugin 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
40bf5c6092 Fix missing headers in hint.hpp 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
6a77ac442e Enable all plugins with aStatus::Error return code fallback for not implemented ones 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
2617960d6c We don't need templates at all, this is not CRTP? 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
d989714007 Adapts Nearest plugin to new API 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
9704ca7a8b Fix deleting incomplete type and make Engine moveable only 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
ec79d1e933 Adapts publicly facing new API 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
94f6005358 Adapts NearestParameters to new API 2016-03-31 18:58:52 +02:00
Patrick Niklaus
7d51a76e79 Initial non-building match plugin 2016-03-31 18:58:52 +02:00
Patrick Niklaus
59b4a142ec Add table API 2016-03-31 18:58:52 +02:00
Patrick Niklaus
72ebb3acb8 Fix parameter parsing tests 2016-03-31 18:58:52 +02:00
Patrick Niklaus
9e5a300cbb Fix table plugin 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
bf9824502a First take at distance table API re-write 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
d69bad9cb2 Adapts TableParameters and its validation to new API 2016-03-31 18:58:52 +02:00
Patrick Niklaus
66d241a2d8 Add viaroute suport for new API 2016-03-31 18:58:52 +02:00
Daniel J. Hofmann
a1b87b5236 Handle all distances between coordinates being zero in Farthest Insertion algorithm.
Assertions for additional safety and sanity.

References:
- see https://github.com/Project-OSRM/osrm-backend/issues/2147
2016-03-31 18:57:24 +02:00
Patrick Niklaus
21245273b4 Also exclude the compressed flag from the data format 2016-03-24 21:24:08 +01:00
Patrick Niklaus
8d7821c84e Remove geometry indicator 2016-03-24 21:24:08 +01:00
Daniel J. Hofmann
8640129835 Ampersand binds to variable name 2016-03-15 11:47:57 +01:00
Daniel J. Hofmann
655dd2277c Eliminate extra semicola 2016-03-15 11:47:57 +01:00
Daniel J. Hofmann
40f95191a0 Do not copy pairs in loop 2016-03-15 11:47:57 +01:00
Moritz Kobitzsch
4150c804df Improve the core search stopping criterion 2016-03-15 09:33:10 +01:00
Patrick Niklaus
8912928581 Disable alternatives by defaul fixes #2072 2016-03-10 21:01:30 +01:00
Daniel J. Hofmann
ac0279aa83 RAII for auto-closing file streams
Small fixes I didn't want to include in unrelated PRs.

There are a few left in `storage.cpp` but since it's a single function
in 600 lines of code, I didn't want to touch the mess. The others are
safe to remove, cucumber and test run on Finland gives 👍.
2016-03-09 17:46:02 +01:00
Patrick Niklaus
adc3bacea9 Add pruning based on @MoKob's idea in #1921 2016-03-08 00:43:45 +01:00
Patrick Niklaus
f86b5a44bc Adapt shortest_path and viaroute to core search 2016-03-07 21:26:12 +01:00
Daniel Patterson
017ff53702 Code review updates. 2016-03-03 13:25:01 -08:00
Daniel Patterson
49441fe204 Make forward/reverse weight/offset calculated at query time,
rather than being cached in the StaticRTree.  This means we
can freely apply traffic data and not have stale values lying
around.  It reduces the size of the RTree on disk, at the expense
of some additional data in RAM.
2016-03-03 10:49:12 -08:00
Daniel J. Hofmann
e90b1bbead Allow no sources and no destinations for full table query 2016-03-03 02:00:39 +01:00
Daniel J. Hofmann
ce1ca1b625 Fixes critical error in table plugin accessing uninitialized memory
Although we check for valid coordinates in the table plugin via
`check_all_coordinates`, we do not check for #srcs > 0 and #dsts > 0.

This would be fine as the grammar parser combines adding coordinates and
setting their `is_source` and `is_destination` property, which makes
adding coordinates without specifying source or destination impossible.

See: route_parameters.cpp, AddSource, AddDestination, and api_grammar.hpp

In contract, the Polyline codepath does not do this! In fact, it only lets
you set coordinates, but not their `is_source` or `is_destination` property.

See: route_parameters.cpp, SetCoordinatesFromGeometry

Therefore, the following queries only set coordinates:

    http 'http://localhost:5000/table?locs=s_hhFg{arEgEfEgEfEgEfEgEfEgEfEgEfEgEfEgEfEgEfE'
    http 'http://localhost:5000/table?locs=_p~iF~ps|U_ulLnnqC_mqNvxq`@'

but fail to specify sources and targets!

The distance table plugin now assumes `is_course` and `is_destination`
is the same size as `coordinates`.

And happily accesses uninitialized memory.
2016-03-03 02:00:39 +01:00
Patrick Niklaus
0eaa393065 Limit tile zoomlevel to 12+ 2016-03-02 19:59:49 +01:00
David Low
79e8d1aac3 Minor typo fix 2016-03-02 15:16:28 +08:00
Daniel J. Hofmann
2ce553d661 Math functions are not constexpr since they have side-effects (setting errno) :( 2016-03-01 23:51:26 +01:00
Daniel J. Hofmann
2efef91f1c Fixes const correctnes and explicit types in tile header 2016-03-01 23:51:26 +01:00
Daniel J. Hofmann
3feba9a581 Fixes Undefined Behavior in tile header from ODR-violation 2016-03-01 23:51:26 +01:00
Daniel J. Hofmann
afae896d05 Makes compile time constants properly ROM-able and deduplicates them across TUs 2016-03-01 23:51:26 +01:00
Daniel J. Hofmann
bcbaa21739 Fixes tile header includes 2016-03-01 23:51:25 +01:00
Daniel J. Hofmann
d60bc61d13 Properly constructs objects of type const RectangleInt2D in facades 2016-03-01 23:51:25 +01:00
Daniel J. Hofmann
aeee565115 Formats all the files we touch.. 2016-03-01 23:51:25 +01:00
Daniel Patterson
8126793b18 Don't need to actually create a vector, we just write out all speeds from 0-127 2016-03-01 23:51:25 +01:00
Daniel Patterson
6a2592421c Optimize encoding of speed values. Only store 0-127, so we can efficiently pack into a byte. Speed and is_tiny values are now shared, so tiles should be much smaller. 2016-03-01 23:51:25 +01:00
Daniel Patterson
95bf81f528 Add a bunch of comments. 2016-03-01 23:51:25 +01:00
Daniel Patterson
ae802a8a83 No need to send a back to the client, km/h are specific enough. 2016-03-01 23:51:25 +01:00
Daniel Patterson
ee71d2fe5f Don't need to static cast. 2016-03-01 23:51:25 +01:00
Daniel Patterson
8dd2447cc5 Don't round until necessary, this keeps coordinates in much better positions. 2016-03-01 23:51:25 +01:00
Daniel Patterson
26453af1b9 Add a distinct Buffer type for encoding binary data in JSON responses. Treated like a string, but allows other consumers (a-la node-osrm) to recognize and not break string encodings. 2016-03-01 23:51:25 +01:00
Daniel Patterson
5dc7b79bb6 Implements a vector tileserver so you can see what's going on inside
OSRM.
2016-03-01 23:51:25 +01:00
Patrick Niklaus
69bc8a8b22 Fix unpacking for self-loop nodes not in core. Fixes #1999 2016-02-21 01:38:06 +01:00
Mortada Mehyar
aae02cd1be fixed minor typos 2016-02-18 23:05:11 -05:00
Moritz Kobitzsch
2679c1cf0a correct handling of travel modes 2016-02-16 01:35:04 +01:00
Moritz Kobitzsch
f14352f494 modify turn angles and instructions 2016-02-15 20:13:55 +01:00
Moritz Kobitzsch
ab9426e260 fix routing when requiring loop at a core node 2016-02-15 18:26:39 +01:00
Daniel J. Hofmann
27fe85ac8b Dividable-by-three instead of next-dividable-by-three 2016-02-12 18:10:44 -08:00
Daniel J. Hofmann
4b8c0ac143 Revert "Folds json_* utilities into json subfolder and adapts includes"
This reverts commit cd039c69c0a92a35889e3c875b8eb53cf07377bb.
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
c9f0158fdb Ifdef is_trivially_copyable<T> behind gcc >= 5 guard 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
aac21f932b Refactors Base64 encoding and decoding, it's almost beautiful now 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
ec01c2a119 Folds json_* utilities into json subfolder and adapts includes 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
ef171f3acd Properly use typed math constants instead of impl. specific hacks
PI is not in the stdlib, neither is 1/pi, pi*2 and so on. Instead
of relying on implementations providing these, use properly typed
math constants.

Main benefits:
- portable and
- returns constexpr, for compile-time computation

References:
- http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/math_toolkit/constants_intro.html
- http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/math_toolkit/constants.html
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
64b36807d3 Transforms osrm_exception to exception 2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
fa8529949b Make swap noexcept (as it has to be!) and fix swap misuses 2016-02-08 11:47:44 -08:00
Daniel J. Hofmann
3075f6cea7 No need for deferred, non-blocking or timeout acquisition 2016-02-08 11:26:40 -08:00
Daniel J. Hofmann
ff966490bb Fixes datafacade includes 2016-02-08 11:26:40 -08:00