Commit Graph

535 Commits

Author SHA1 Message Date
FILLAU Jean-Maxime
2de17f3fd0 Adding url unit test for "sides" parameters
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
FILLAU Jean-Maxime
8e70c87e64 New "sides" setting in base parameters for phantom nodes.
- Adding sides parameter into base parameters, it can take the values SIDE, OPPOSITE or DEFAULT.
 - Adding url parser for "sides" parameter, url values are "s" for SIDE, "o" for OPPOSITE and "d" for DEFAULT, example : "sides=s;s".
 - Checking parameters, if "sides" parameter is used, the number of parameter is the same as number of location.
 - Create a phantom to start at side driving or Opposite side driving.

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
2017-05-30 10:19:41 +00:00
Patrick Niklaus
a544935e7d Fix unit-test 2017-05-29 15:09:36 +00:00
Daniel Patterson
570d81c6dd Bypass boost::numeric_cast checks for coordinate values that have already been validated (#4059)
(i.e. stuff that's stored in our datafiles).  Keep those checks for user-supplied values
(i.e. coordinates coming from files during preprocessing, or coordinates supplied by users
 during requests)
2017-05-19 10:52:44 -07:00
Michael Krasnyk
7a4c5a64fa Simplify angleBetween to avoid cancellation losses 2017-05-17 15:52:11 +00:00
Michael Krasnyk
c535e74a65 Added test to check bearing::angleBetween precision 2017-05-17 15:52:11 +00:00
Michael Krasnyk
5e2e1d4c96 Renamed EdgeBasedNode to EdgeBasedNodeSegment 2017-05-17 15:21:51 +00:00
Michael Krasnyk
26702920b4 Move ComponentID to EdgeBasedNodeDataContainer 2017-05-17 15:21:51 +00:00
Michael Krasnyk
ca6b1b39b7 Remove data duplicates in .node file 2017-05-17 15:21:51 +00:00
Patrick Niklaus
6bd724fe24 Rewrite packed vector to also allow random access
This fixes issues #3952. The new approach pre-computes masks for fast
access. Since elements can potentially span multiple words we need masks
and offsets for each upper and lower word.

Due to a bug in the C++14 standart the mask computation is not
recognized as constexpr, but would work on C++17.
2017-05-16 10:25:29 +00:00
Karen Shea
799a677e7a Conditional turn restriction support (#3841)
* optionally include condition and via node coords in InputRestrictionContainer

* only write conditionals to disk, custom serialization for restrictions

* conditional turn lookup, reuse timezone validation from
extract-conditionals

* adapt updater to use coordinates/osm ids, remove internal to external map

* add utc time now parameter to contraction

* only compile timezone code where libshp is found, adapt test running

* slight refactor, more tests

* catch invalid via nodes in restriction parsing, set default cucumber
origin to guinée

* add another run to test mld routed paths

* cosmetic review changes

* Simplify Timezoner for windows build

* Split declaration and parsing parts for opening hours

* adjust conditional tests to run without shapefiles

* always include parse conditionals option

* Adjust travis timeout

* Added dummy TZ shapefile with test timezone polygons

* [skip ci] update changelog
2017-05-11 12:13:52 +02:00
Michael Krasnyk
88082c48cf Remove GetEdgeBasedNodeID from TurnDataContainer 2017-05-03 21:59:38 +00:00
Michael Krasnyk
f1e4349c82 Move geometry ids, name_ids and travel_modes to EdgeBasedNodeData 2017-05-03 21:59:38 +00:00
Michael Krasnyk
07c7cb3c6c Rename BinaryHeap to QueryHeap 2017-05-02 15:54:25 +00:00
Daniel J. Hofmann
9334cc463d Fixes Table not checking for valid phantom nodes
We failed to check if we could actually find phantom nodes for all
coordinates in the table plugin, leading to corrupt internal state.

```
curl 'http://localhost:5000/table/v1/car/7.4151,43.7305;7.4222,43.7368?radiuses=0;'
```

```
[assert][140505627227904] /tmp/osrm-backend/include/engine/routing_algorithms/routing_base.hpp:68
in: void osrm::engine::routing_algorithms::insertNodesInHeap(osrm::engine::SearchEngineData<osrm::engine::routing_algorithms::ch::Algorithm>::ManyToManyQueryHeap&, const osrm::engine::PhantomNode&) [with bool DIRECTION = false; osrm::engine::SearchEngineData<osrm::engine::routing_algorithms::ch::Algorithm>::ManyToManyQueryHeap = osrm::util::BinaryHeap<unsigned int, unsigned int, int, osrm::engine::ManyToManyHeapData, osrm::util::UnorderedMapStorage<unsigned int, int> >]: phantom_node.IsValid()
terminate called without an active exception
```
2017-05-02 13:41:33 +02:00
Patrick Niklaus
a66918a303 Make PackedVector generic 2017-04-18 17:24:46 +00:00
Michael Krasnyk
3915c1286b Don't remove the last original coordinate during tiding 2017-04-13 21:27:00 +00:00
Patrick Niklaus
288155ead0 Fix formating 2017-04-06 15:42:38 +00:00
Patrick Niklaus
d94017dfae No shared_memory_wrapper, (De)SerializeVector 2017-04-06 15:42:38 +00:00
Patrick Niklaus
7f6e0c478b Split QueryNode into coordinates and osm id 2017-04-06 15:42:38 +00:00
Patrick Niklaus
d7e1c9c09c Refactor turn data into own class 2017-04-06 15:42:38 +00:00
Michael Krasnyk
cf17a3a4c3 PR review adjustments 2017-04-06 10:36:40 +02:00
Michael Krasnyk
8c64b01d67 itroduce ADL via algorithm specific ch, corech and mld namespaces 2017-04-06 10:36:40 +02:00
Patrick Niklaus
272ea9b92e Fix test compilation 2017-04-05 11:22:39 +00:00
Pepijn Schoen
091a495632 clang-format 2017-04-04 17:00:36 +00:00
Pepijn Schoen
16665aeb00 Renaming of MemorySetting > Ownership 2017-04-04 17:00:36 +00:00
Pepijn Schoen
d6e56c38d5 Rename SharedMemoryWrapper to vector_view 2017-04-04 17:00:36 +00:00
Pepijn Schoen
b21ee1b63b Fixed regression 2017-04-04 17:00:36 +00:00
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
Dane Springmeyer
4de64a92cb fix zlib linking order 2016-05-25 09:32:27 -04:00
Dane Springmeyer
fe39d0fd10 disable BOOST_TEST_DYN_LINK if Boost_USE_STATIC_LIBS 2016-05-20 00:03:37 -04:00
Patrick Niklaus
98b83b7208
Fix library test 2016-05-19 16:44:31 +02:00
Moritz Kobitzsch
9c8bf820de
adjusted to in/out. only emit one of them for depart/arrive 2016-05-19 16:44:31 +02:00
Michael Krasnyk
508c205d35
Refactoring of iso_8601_grammar
* formats 'hh:mm:ss' and ISO 8601 are merged into one grammar.
* iso_8601_grammar is changed to static const.
* iso_8601_grammar supports formats P[n]DT[n]H[n]M[n]S, P[n]W,
  and part of alternative PTHHMMSS and extended PTHH:MM:SS formats.
2016-05-17 00:39:32 +02:00
Daniel Patterson
fa525ad610
Return an array with meta-data for each coordinate.
Currently supports duration and distance for each coordinate.

This is particularly useful in map-matching, comparing how
a trip progresses compared to a real GPS trace that is
map-matched.
2016-05-12 01:11:09 +02:00
Patrick Niklaus
7174c5d036
Make StaticRTree and facades const 2016-05-07 23:52:11 +02:00
Patrick Niklaus
ddd128ce0e
Only use const-ref for coordinate vector 2016-05-07 23:52:11 +02:00
Michael Krasnyk
2acde49f0f
Make LeafNode aligned to memory pages.
Changes:
* LeafNode is aligned to LEAF_PAGE_SIZE.
  Alignment brings 24 bytes memory overhead for 4096, but reduces
  cache misses rate.
* Unused m_element_count from leaf nodes file.
  The size is computed as m_leaves_region.size() / LEAF_PAGE_SIZE.
* Added try/catch for mmap exceptions messages.
2016-05-07 23:52:11 +02:00
Michael Krasnyk
e2e8104864
Addition to fix #2356
Updated unit tests for the Hint parser and
added emplacement of empty hints.
2016-05-07 09:47:32 +02:00
Patrick Niklaus
35fac07581
Add failing test for empty hint 2016-05-04 15:24:48 +02:00
Patrick Niklaus
e470d1ae1c
Fix naming convention in RasterSource 2016-05-02 17:25:58 +02:00
Michael Krasnyk
5186b9490d Fix syntax error position indicators in parameters queries
To fix #2193 prefix_length member variable has been added to ParsedURL
that is set to the length of "/service/version/profile/" prefix
when the prefix is accepted by the parser.
Also BOOST_FUSION_ADAPT_STRUCT for osrm::server::api::ParsedURL
has been moved from header to url_parser.cpp to speed up compilation
of CUs that do not use the fusion adaption.
2016-04-27 19:52:23 +02:00
Michael Krasnyk
dac2f93383 Refactoring of parameter garammars
* signature changed from void() to void(engine::api::Parameters&)
* performance increase due to use "static const GrammarT" and avoid
  construction and destruction of grammars during parsing
* removed code duplication in inherited grammars
* rule unlimited changed to qi::lit
* added rule size_t_
* parser accepts "&geometries=" and "&overview=" and fails at "foo"
  instead of "&geometries=foo" and &overview=foo
* added expectations checks for derived grammars
* changed rules qi::list(".") to character rules '.'
2016-04-23 21:15:21 +02:00
Patrick Niklaus
82df0ca766
Fix parser tests and destinations=all / sources=all 2016-04-22 11:01:15 +02:00
Daniel J. Hofmann
202bb6d3e2
Fix accidental rebase issues 2016-04-22 10:40:03 +02:00
Daniel J. Hofmann
bc514926bf
Unit test for trip across component boundaries.
Daniel's mental model, with updates from Patrick and staring at the code
(plugins/trip.cpp): Trip first snaps coordinates which in the case of
phantoms that are not only in small components with the same id
switches small components to big ones. Therefore we get either only
small or only big components. Only then the Tarjan SCC decomposes this.

Result: multiple subtrips only happen for islands or continents.
2016-04-22 10:40:03 +02:00
Daniel J. Hofmann
9fc16b6a83
Unit test for trip exclusively in big component 2016-04-22 10:40:03 +02:00
Daniel J. Hofmann
2125e0175d
Unit tests for special symbols in radiuses, sources, destination 2016-04-22 10:40:03 +02:00
Daniel J. Hofmann
6b5982d389
Table unit test, revealing position_index -> waypoint_index mismatch 2016-04-22 10:40:03 +02:00
Daniel J. Hofmann
a4a8aa63d4
Invalid route requests 2016-04-22 10:40:03 +02:00
Daniel J. Hofmann
bedf451952
Namespace aliases 2016-04-22 10:40:03 +02:00
Daniel J. Hofmann
93b8f1993c
Split off parameters I/O from unit tests 2016-04-22 10:40:03 +02:00
Daniel J. Hofmann
c693f4806b
Unit tests for routing / snapping across components 2016-04-22 10:40:03 +02:00
Patrick Niklaus
da6dbd2159
Revert "Removes summary from legs property"
This adds the summary back to the RouteLeg, it now depends on if
`steps=true`.
This reverts commit eaf9993dd9.
2016-04-21 22:39:16 +02:00
Patrick Niklaus
3e2e10a4c3 Add unit test for tile plugin 2016-04-15 14:48:21 +02:00
karenzshea
324f1739e4 more table tests, break waypoint obj check into header file 2016-04-15 14:46:17 +02:00
karenzshea
1489662f57 start tests for table plugin 2016-04-15 14:46:17 +02:00
Moritz Kobitzsch
ae45ad1ad2 fix r-tree abort location 2016-04-14 11:40:36 +02:00
Patrick Niklaus
589767fe6d uturns -> continue_straight 2016-04-12 23:16:02 +02:00
Daniel Patterson
43725bae89 Fix Radius Calculation for points collinear in latidue 2016-04-12 11:25:59 +02:00
Patrick Niklaus
9f515dad09 Fix tests 2016-04-09 23:04:43 +02:00
Patrick Niklaus
5052c4ae3a Move projection function into own header and inline 2016-04-09 17:31:36 +02:00
Patrick Niklaus
4886d46d91 Use DouglasPeucker with squaredEuclideanDistance 2016-04-09 17:26:27 +02:00
Daniel J. Hofmann
45bcb22270 Fixes unit tests that relied upon wrong behavior in parsers 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
2539fd53dc Enable unit test that should pass with fixes from this branch 2016-04-08 21:03:50 +02:00
Moritz Kobitzsch
dfd180a292 fixing unit tests 2016-04-08 11:21:14 +02:00
Dane Springmeyer
56ba2cb251 Add missing -lz to fix linking of server-tests 2016-04-08 01:52:35 +02:00
karenzshea
6033c05ff0 checks for waypoint index and route lengths 2016-04-07 22:11:28 +02:00
karenzshea
407da8bd15 start match test 2016-04-07 22:11:28 +02:00
Daniel J. Hofmann
b1ed268d0e Start modularizing the CMake buildsystem
The main reason for modularizing the unit tests was to split off
libboost_unit_test_framework from the osrm toolchain binaries.

Now only the unit test binaries link against it, unblocking
binary distribution without unit test library dependencies.

I started this on v4 a couple of weeks ago and hit a -llua5 issue on
Travis. By now v5 diverged quite a bit (especially in the code that I
have to stare at for debugging the issues).

https://github.com/Project-OSRM/osrm-backend/pull/2073

Let's bring this to v5+ only.

This is blocking:

- https://github.com/Project-OSRM/osrm-backend/issues/2065
- https://github.com/Project-OSRM/osrm-backend/issues/2197#issuecomment-204864938
2016-04-06 18:36:06 +02:00
Daniel J. Hofmann
eaf9993dd9 Removes summary from legs property 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
4f1ca20dda Do not rely on alternatives being found in unit tests 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
97401ad99a Disable steps and alternatives by default 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
29c2a117c0 Adapts tests to case sensitive "Ok" status code. 2016-04-05 22:59:14 +02:00
Patrick Niklaus
30a9bc3179 Fix mathematical assumptions in StaticRTree
StaticRTree now uses projected coordinates internally. That means we can
use a euclidean distance measure (squared distance) for sorting the
query queue.
2016-04-05 22:59:14 +02:00
Lauren Budorick
49e2cb6c36 Fix raster_source + tests 2016-04-05 22:59:14 +02:00
Daniel Patterson
c47f6e2ca5 Use simpler coordinates for tests. 2016-04-05 22:59:14 +02:00
Daniel Patterson
cc09df1961 Use correct perpendicular distance measure when simplifying line geometries. 2016-04-05 22:59:14 +02:00
Moritz Kobitzsch
db26d2b2d7 fixes missing overrides in mock data facade 2016-04-05 22:59:14 +02:00
Patrick Niklaus
fda4656630 Implement re-enabling of PhantomNode directions after bearing filtering 2016-04-05 22:59:14 +02:00
Patrick Niklaus
a964bec0f8 Add route fixture test 2016-04-05 22:59:14 +02:00
Patrick Niklaus
b65ba5c394 Adapt get_osrm to EngineConfig changes 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
4025cbd555 Make extractor unit tests work again after global uturn changeset 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
3da27c06c3 Number of waypoints equals number of input coordinates 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
bc7824812b Make test assumption failure output violation in Route unit tests 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
baf7822340 Hook up small component locations for Nearest response test 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
82ee08fcaf Provide dummy locations from our fixed monaco dataset 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
e70f0eea02 Fix base64 test wrt. Hint no longer taking coordinate in ctor 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
8be93a0202 Adapt mock facade implementation to renamed base facade symbols 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
d4f7f19a22 Provide implementation for all pure virtual base member functions in mock facade 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
61c9c69718 Make unit tests compile again after rebasing 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
9ec46222e3 Makes Nearest plugin adhere to v5 spec for precondition violations, fixes #2108 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
210da11fbb Unit test for Route service; some failing where v5 spec is unclear 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
ee61ae360d Unit tests for Tile service; plugin needs improvements: see #2109 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
890e0f4995 Unit tests for Nearest service; one test failing: see #2108 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
c22453f24a Tests for config level constraints; table failing: see #2100 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
099a805260 Initial unit tests setup for typed libosrm services 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
9d893d6d4d Library tests build system integration 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
e55af0c274 Add guidance assembly unit test stub 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
061b2b63e9 Explicitely construct coordinate and phantom node 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
1486098065 Adapts all unit tests and benchmarks to compile under v5 again 2016-04-05 22:58:32 +02:00