Commit Graph

407 Commits

Author SHA1 Message Date
Pepijn Schoen
427437d49b Use a one-time defined generic signature for SharedMemoryVectors 2017-04-04 17:00:36 +00:00
Pepijn Schoen
01deefc3bc First pass at adjustment for comments 2017-04-04 17:00:36 +00:00
Pepijn Schoen
157ca9161f clang-format 2017-04-04 17:00:36 +00:00
Pepijn Schoen
266e65e6d2 Replace bool for using shared memory with MemorySetting enum 2017-04-04 17:00:36 +00:00
Michael Krasnyk
f5393f44f7 Add minimal representative example for #3866 2017-03-28 10:40:13 +00:00
Patrick Niklaus
ad6e834992 Add regression test 2017-03-28 10:40:13 +00:00
Lev Dragunov
5727b1387e Test fixes 2017-03-22 10:39:36 +00:00
Daniel J. Hofmann
bd9eb76a2d Transparently Tidy Traces in Map Matching, resolves #2840.
The Map Matching plugin currently has issues with:
- high frequency traces and (performance)
- blobs, think noise at traffic signals (correctness)

This changeset implements trace-tidying transparently for the user.

We hopefully will see both performance gains as well as better matches!
2017-03-22 10:39:36 +00:00
Daniel J. Hofmann
c772210cc0 Back to Monaco for unit tests 2017-03-21 20:10:39 +00:00
Patrick Niklaus
7278f88aa9 Only extract berlin.osm.pbf once and fix windows builds 2017-03-21 20:10:39 +00:00
Daniel J. Hofmann
16621f00c1 Use float literals to silcen Windows warnings 2017-03-21 20:10:39 +00:00
Daniel J. Hofmann
2351b5a084 Merges node-osrm into repository
Build with

    cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DENABLE_MASON=On
2017-03-21 20:10:39 +00:00
Patrick Niklaus
98529ee071 Apply clang format 2017-03-21 16:23:10 +00:00
Patrick Niklaus
e902ab4693 Fix all customization tests 2017-03-21 16:23:10 +00:00
Patrick Niklaus
2b397942fe Fix bug and add test coverage for GetInternalEdgeRange 2017-03-21 16:23:10 +00:00
Patrick Niklaus
655ca803d8 Adds a special graph for MLD with effcient boundary scan
This graph enables efficient boundary edge scans at each level.
Currenly this needs about |V|*|L| bytes of storage.
We can optimize this when the highest boundary nodes ID is << |V|.
2017-03-21 16:23:10 +00:00
Patrick Niklaus
58681fa7ea Refactor StaticGraph generation 2017-03-21 16:23:10 +00:00
Patrick Niklaus
57c6c6e51c Remove all boundary nodes and use simple u-v-stragtegy to pick id
This commit removes all occurences of unconnected boundary nodes
and switches to the simple heuristic of picking U for the forward
and V for the backward node. This performs better than several
fancy heuristics.
2017-03-17 11:23:48 +00:00
Patrick Niklaus
d661f3f31e Move customizer tests to own unit 2017-03-13 23:04:45 +00:00
Patrick Niklaus
907f933a54 Add update functionality to osrm-customize
All speed file flags are compatible with osrm-contract.
2017-03-13 23:04:45 +00:00
Pepijn Schoen
c7fc36a61b Normalize file writes 2017-03-09 14:16:41 +00:00
Michael Krasnyk
0a13390ab0 Compute correct speed values in tile plugin 2017-03-09 11:18:53 +00:00
Mateusz Łoskot
e13ba8ba11 Add basic facades for Extractor and Contractor run methods.
Based on idea suggested in comments to #3776, simplifies
use of extractor and contractor as libraries.
2017-03-08 22:48:03 +00:00
Michael Krasnyk
5aba239fc1 removed code duplication in unit tests 2017-03-08 16:08:00 +00:00
Michael Krasnyk
3f6ae245f6 Added osrm-customizer tool 2017-03-08 16:08:00 +00:00
Michael Krasnyk
bc2e06502e Added cells customizer 2017-03-08 16:08:00 +00:00
Patrick Niklaus
fae1c737a3 Disable building test data on windows 2017-03-08 00:56:50 +00:00
Michael Krasnyk
f42136637d Add edge-based graph loading in MLD facade 2017-03-08 00:56:50 +00:00
Patrick Niklaus
6cb401b1ff Run clang-format 2017-03-08 00:56:50 +00:00
Patrick Niklaus
fc9b5938e6 Hardcode path to test data dir for library-tests
This was needed because we now need multiple datasets for testing.
CMake will automatically prepare these over the makefile in test/data.
2017-03-08 00:56:50 +00:00
Patrick Niklaus
8f9e980945 Add class to translate from bisection ids to cell ids 2017-03-08 00:56:50 +00:00
Patrick Niklaus
b2f3b901e0 Fix cell storage tests 2017-03-08 00:56:50 +00:00
Patrick Niklaus
00d01946cd Moved MultiLevelPartition and CellStorage to partition namespace 2017-03-08 00:56:50 +00:00
Patrick Niklaus
694bf9d8b1 Integrate CellStorage into datafacade 2017-03-08 00:56:50 +00:00
Patrick Niklaus
ef71cc0d12 Clang format 2017-03-08 00:56:50 +00:00
Patrick Niklaus
5f73ac1eda Add unit tests selectiong algorithm 2017-03-08 00:56:50 +00:00
Patrick Niklaus
108fce896b Pull everthing in the facades 2017-03-08 00:56:50 +00:00
Michael Krasnyk
ff0a98196f Initial interation on writing out MLD partition/cell data 2017-03-08 00:56:50 +00:00
Patrick Niklaus
0770d8b8cf Fix tile datasize check 2017-03-03 16:03:41 +00:00
Patrick Niklaus
93cdd8bb46 Remove unneccessar branch in CoreCH code 2017-03-03 16:02:12 +00:00
Patrick Niklaus
a32f8a6a59 Fix two typos in tile code 2017-03-03 16:02:12 +00:00
Patrick Niklaus
7da86b5984 Implement CoreCH algorithm 2017-03-03 16:02:12 +00:00
Patrick Niklaus
2fa8d0f534 Port OSRM, Engine and Datafacades to be algorithm aware 2017-03-03 16:02:12 +00:00
Michael Krasnyk
1541d32a42 adjust cell_storage tests to new StaticGraph interface 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
e8cca36369 fix tbb leaks 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
be41e8b321 generate stats in annotation 2017-03-01 16:09:29 +00:00
Daniel Patterson
b62b09e5f6 Dump memory usage stats after partitioning. 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
b789da45bd add unit tests for the different components of the parttion tool 2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
c3cc79f798 always emit a small component view
Unit Tests for Reodering by Predicate
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
d56db500d3 Initial Skeleton for Recursive Bisection via Inertial Flow 2017-03-01 16:09:29 +00:00
Patrick Niklaus
438aa66b4c Add packed storage of partition information
Right now we need a 64bit integer for every node in the graph.
Depending on the number of cells we will see, we might get away with
32bit eventually.
2017-02-24 15:58:47 +00:00
Patrick Niklaus
e06ffabf21 Add storage for cell weights used in the MLD algorithm 2017-02-20 16:31:36 +00:00
karenzshea
c2727f2029 expose data about turning onto restricted roads to turn function 2017-02-20 12:40:51 +00:00
karenzshea
e75278f9c2 add unit test for annotations=true returning all annotations 2017-02-13 18:00:39 +00:00
Karen Shea
6446257a93 add error logging for missing osrm file to library tests (#3704) 2017-02-13 17:57:39 +01:00
karenzshea
23b07c9197 clang format 2017-02-13 15:49:30 +00:00
karenzshea
a61b1a3623 round speed to 1 decimal place 2017-02-13 15:49:30 +00:00
karenzshea
7f39c9fcb0 add unit test to check that speeds are equal to distance/duration 2017-02-13 15:49:30 +00:00
karenzshea
921ff43acf return speed annotations 2017-02-13 15:49:30 +00:00
Quinn Chrzan
1ed1bae249 Unit testing docs (#3698)
* Updating library-tests and associated documentation to be more informative

* Fixing heading markup for updated unit testing docs
2017-02-13 15:58:46 +01:00
Michael Krasnyk
2b00d92463 make annotations={true|false|(values)+} grammar 2017-02-10 16:11:24 +00:00
karenzshea
1f3a8d4538 remove units from rate columns in routability testing 2017-02-10 14:27:28 +00:00
Kajari Ghosh
2218658969 Trip with Fixed Start and End points (TFSE) (#3408)
* fixed start and end trip feature to trip service
2017-02-10 05:13:20 -05:00
karenzshea
1e9e420d91 clang format 2017-02-07 09:15:16 +00:00
karenzshea
ab91a05680 update cucumber suport code to return separate annotations headers 2017-02-07 09:15:16 +00:00
karenzshea
84261fd214 GetAnnotations function 2017-02-07 09:15:16 +00:00
karenzshea
734df348cb a few more parameter tests 2017-02-07 09:15:16 +00:00
karenzshea
3106b5dd9e set RouteParameters annotations member, when constructor only specifies annotations_type, add unit_tests 2017-02-07 09:15:16 +00:00
Michael Krasnyk
6e1c4bfecd Added indexed array data type with variable and fixed group blocks 2017-02-07 07:41:12 +00:00
Michael Krasnyk
ad594cb2e4 Update review findings 2017-01-27 11:19:37 +01:00
Michael Krasnyk
25baf51a2c Add duration to edges and use it in table plugin 2017-01-27 11:19:37 +01:00
Michael Krasnyk
c059d15cb9 Added weight multipliers for speed and turn updates 2017-01-27 11:19:37 +01:00
Patrick Niklaus
279f8aabfb Allow specifing a weight for routing that is independent of duration 2017-01-27 11:19:37 +01:00
Michael Krasnyk
7961fa8863 Added conditional restrictions grammar 2017-01-24 10:31:59 +01:00
Michael Krasnyk
88eb9e5499 Added opening_hours grammar 2017-01-24 10:31:59 +01:00
Daniel J. Hofmann
c277b95f03 Implements Zero-Copy String Views onto Contiguous Memory, resolves #3265.
- http://www.boost.org/doc/libs/1_61_0/libs/utility/doc/html/string_ref.html
- http://en.cppreference.com/w/cpp/string/basic_string_view
2017-01-23 15:22:39 +01:00
Michael Krasnyk
e8167b2e4e Use round for float to fixed coordinate transformations 2017-01-20 12:31:45 +01:00
Michael Krasnyk
c03aa8a273 Regression test for #3516 2017-01-20 12:31:45 +01:00
Daniel J. Hofmann
e4dc2aa45c Removes Base64 Unit Test Dead Code.
- https://github.com/Project-OSRM/osrm-backend/pull/2139
- 6c9ddde682
2017-01-17 12:50:53 +01:00
Michael Krasnyk
d0f1347ff1 Adjusted number of nodes in annotation, resolves #3515 2017-01-16 23:54:00 +01:00
Michael Krasnyk
1d4d3b80b5 Fix possible division by zero by clamping latitude to 85.05°
Resolves #3530
2017-01-12 16:44:58 +01:00
Moritz Kobitzsch
15c8fd326f Remove assertions that could be triggered by bad data. (#3469)
When two consecutive nodes have identical coordinates, there is no valid
bearing.  For now, make equal nodes have bearing 0.

Full fix still needs to be done via https://github.com/Project-OSRM/osrm-backend/issues/3470.
2017-01-06 17:10:02 -08:00
Daniel Patterson
f7e8581a1b Replace fingerprint with semver-based scheme. (#3467) 2017-01-06 13:45:08 -08:00
Moritz Kobitzsch
e6ff17ab2a refactor merging of segregated roads
adjust to generalFindMaximum function
moved parallel detection to ratio/absolute based regression testing
considerably improved detection quality using normalised regression lines
only follow initial direction/narrow turns for parallel detection
2017-01-03 12:32:51 +01:00
Daniel J. Hofmann
7b11cd3a11 Makes Types in Squared Dist Calculation Explicit, see #3483. 2016-12-22 15:43:04 +01:00
Moritz Kobitzsch
bc081b7132 refactor route step / intermediate intersections
rename intersection (engine version) to IntermediateIntersection
follow coding convention for existing functions, move invalidate into routeStep
moved elongate into route step
move forward-step-signage into route step
replace post-processings `forwardInto` with `RouteStep` functionality. Don't change maneuver in step
separete declaration and implementation
2016-12-22 08:33:27 +01:00
Moritz Kobitzsch
1ba5ff44cc reduce warnings when compiling tests, add constructor to base parameters, fixes gcc49 unit tests building 2016-12-19 14:24:17 -05:00
Daniel J. Hofmann
b1f6797aab Adds generate_hints=true for dropping hints in response, resolves #1789.
Adds an `generate_hints=false` option which lets us skip generating and
emitting hints for Waypoints. This can be used to decrease the response
size when the user does not need hints anyway.

We should think about making `false` the default here in v6.
2016-12-19 12:09:36 +01:00
Daniel J. Hofmann
cbfb055f81 Changes Single Coordinate Geoms from Point to LineString, closes #3425. 2016-12-09 11:53:06 +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
Michael Krasnyk
4b1aae40af Decoding should not fail for incomplete polyline strings (#3404)
Possible fails in
1) correct lattitude, longitude is missing
2) no end-of-number (0 5th bit) marker in the last character
2016-12-06 14:09:18 +01:00
Daniel J. Hofmann
949d505783 Removes access_restricted flag internally 2016-12-05 14:15:47 +01:00
Michael Krasnyk
0fbd18b0dd Make absolute fixtures path 2016-12-04 16:34:42 +01:00
Daniel Patterson
0817cd6dfd Enforce iteration order so that tiles are encoded consistently on all platforms (#3393) 2016-12-02 08:59:39 -08:00
Michael Krasnyk
110e6c3689 Fix failing on windows io read test (#3390) 2016-12-01 11:44:28 -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
12d58ace10 add support for junction=circular, allowing named circular junctions to be treated as rotaries 2016-11-29 13:44:32 +01:00
Michael Krasnyk
e343f71541 Refactor Hilbert values computation 2016-11-28 14:17:12 +01: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
Moritz Kobitzsch
f88ac989ea reserve when possible 2016-11-11 14:48:50 +01:00
Michael Krasnyk
4f2bb19b0f Use single precision values in vector<float> initializer list (#3270) 2016-11-08 21:06:55 -08:00
Daniel Patterson
cef53c4b56 Fix key/val offset bug. 2016-11-08 11:45:28 -08:00
Daniel Patterson
f96e61ee06 Construct adjacency list and properly traverse it. 2016-11-08 11:45:28 -08:00
Daniel Patterson
d21c8e3800 Add simple check for number of turns found in the tile. 2016-11-08 11:45:28 -08:00
Kajari Ghosh
f33180f092 request polyline with precision of 5 or 6 positions (#3220) 2016-11-07 15:11:21 -05:00
Michael Krasnyk
3e18e31bc9 Added percent-encoding to URL parser
Reference:
https://tools.ietf.org/html/rfc1738
2016-11-07 14:16:51 +01:00
Kajari Ghosh
c30f43b148 added max_speed to the profiles (#3089) 2016-11-01 17:13:10 -04:00
Dane Springmeyer
a22e0fa62e minor build fixes
- Travis: Upgrade clang from 3.8.0 to 3.8.1 (provides smaller package for faster downloading)
  - Travis: Makes BUILD_COMPONENTS an option
  - Followup after #3130 (Boost_LIBRARIES variable no longer exists)
2016-10-27 13:39:33 -07:00
Dane Springmeyer
502d9e10c2 cmake fixes:
- Builds up ENGINE_LIBRARY_LISTING correctly to pass to pkg-config
    - Previous behavior had major flaw and would result in paths in libosrm.pc like: "-L-L"
      when the data was "-L/path -lfoo" or just "-lpthread" with no -L/path. It only worked correctly for static libraries
  - Refactors to call find_package for boost in one place (helps prepare for upcoming mason PR)
2016-10-20 12:09:27 -07: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
Patrick Niklaus
769485cc2f Initilialize tbb task scheduler correctly. Thanks @oxidase! 2016-10-19 18:30:06 +02:00
karenzshea
72fa35da10 add a toolkit function to find lanes to the left/right of turn lanes 2016-10-13 17:59:25 +02:00
karenzshea
615e302b8c test for tile that fails IsValid() check 2016-10-12 11:20:01 -04:00
karenzshea
1ed8e7e98c test a z12 tile 2016-10-12 10:20:14 -04:00
Patrick Niklaus
240a7696da Catch boost bad_numeric_cast exception and let parser return an error 2016-10-11 00:04:53 +02:00
Lauren Budorick
a75e16e26b Deduplicate foward/reverse geometries
Changes the internal representation of compressed geometries to be a
single array shared between forward and reverse geometries that can be
read in either direction. Includes a change on
extractor::OriginalEdgeData to store via_geometry ids that indicate
which direction to read the geometry for that edge based edge.

Closes #2592
2016-10-06 10:09:57 -07:00
karenzshea
89007ae669 Adapts Tile tests to protozero's strict iterator_range API from @daniel-j-h 2016-10-03 13:07:18 -04:00
Moritz Kobitzsch
d1f1358e48 adjust for comments by daniel-j-h 2016-09-30 17:27:14 +02:00
Daniel Patterson
805d93912d Construct an adjacency list in order to discover turns. 2016-09-30 17:12:23 +02:00
Daniel Patterson
0b7b16abc0 Include new method in test mock objects. 2016-09-30 17:12:22 +02:00
Lauren Budorick
14e7460465 Include turn information in debug tiles. 2016-09-30 17:12:20 +02:00
Daniel J. Hofmann
6290aeea93 Fixes Tile Unit Test Compilation 2016-09-30 16:58:50 +02:00
Daniel J. Hofmann
e3c1b133bf Adds a limit for number of results returned in Nearest service, resolves #2872 2016-09-12 11:59:08 +02:00
Daniel J. Hofmann
a289e1cd96 Fixes bearing range of zero exhaustive graph traversal 2016-09-08 17:33:50 +02:00
karenzshea
dcc1b5ab2b return name and reference separately 2016-09-08 14:28:23 +02:00
Lev Dragunov
8986777c58 JSON instruction serialization fix. 2016-08-08 20:32:01 +03:00
Daniel Patterson
d012b44b7f
Filter out edges that have any speed=0 segments.
They become non-snappable and non-routable.  Note that a single segment
of speed=0 will eliminate the entire edge.
2016-07-30 23:53:38 +02:00
Patrick Niklaus
c7a1576100
Apply clang-format again 2016-07-26 15:00:58 +02:00
Daniel Patterson
ec02cdc4cc Use mmap instead of read - it's a lot faster here.
Also clean up construction of STRONG_TYPEDEF so that it can be
packed properly in structs (this explains all the () -> {}) changes
here.
2016-06-27 17:24:30 -07:00
Moritz Kobitzsch
5905708111 expose lanes as enums, adjusted for comments 2016-06-27 11:12:02 +02:00
Moritz Kobitzsch
5d91b759d1 Implement Turn Lane Api 2016-06-27 10:07:48 +02:00
Daniel J. Hofmann
ec0a1a4ab1 Anticipate Lane Changes 2016-06-27 10:07:43 +02:00
Moritz Kobitzsch
efa29edf09 basic turn lane handling 2016-06-27 10:07:41 +02:00
Moritz Kobitzsch
e03d132823
fix invalid circle centers 2016-06-24 15:12:51 +02:00
Lauren Budorick
2592cd2e58
Update tests to catch 0-subtraction error 2016-06-21 19:31:46 +02:00
Vladimir Kurchatkin
6bdfe68897 Add feature name to vector tiles (#2488) 2016-06-10 11:15:14 -07:00
Daniel J. Hofmann
801cc72691 Sync with Clang38 Format 2016-06-02 14:43:27 +02:00
Lauren Budorick
058b8c3b31 Template vector 2016-06-02 14:27:25 +02:00
Lauren Budorick
0c60a2aef8 Minor cleanups + comments 2016-06-02 14:27:25 +02:00
Lauren Budorick
1659bbf7b1 Refining packed_vector.hpp
* Rename to std::vector-like APIs (push_back, at)
* Add size, reserve, capacity methods
2016-06-02 14:27:25 +02:00
Lauren Budorick
46b58fba83 Packed vector cleanups and unit test 2016-06-02 14:27:25 +02:00
Lauren Budorick
a4ac07866a Recreate feature/expose_node_ids 2016-06-02 14:27:25 +02:00
Daniel J. Hofmann
6edc565c01 Add destinations API feature 2016-06-02 12:00:23 +02:00
Daniel J. Hofmann
bb0c2754d3 With empty summaries no longer the case, update library tests accordingly 2016-06-02 00:26:04 +02:00
Patrick Niklaus
0a53775fb3
Expose pronunciation in RouteStep
Uses name:pronunciation by default for cars.
2016-06-01 23:17:57 +02:00
Patrick Niklaus
6e16eab6ec
Format with clang-format 3.8 2016-05-27 21:05:04 +02:00
Patrick Niklaus
262354f733
Rename annotate to annotations 2016-05-26 23:35:11 +02:00