Commit Graph

353 Commits

Author SHA1 Message Date
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
Daniel J. Hofmann
c3e7e96dce Adds round trip tests for RFC 4648 Test Vectors and equality checks 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
735b325d74 RFC 4648 Test Vectors 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
f948380fa2 Object Encoder -> Base64, kill false dependencies while doing so 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
ca130e1dc4 Formats parameter parser unit tests 2016-04-05 22:58:32 +02:00
Patrick Niklaus
38db495879 Address PR comments
Renamed lua_function_exists and removes unused print function
2016-04-05 22:58:32 +02:00
Patrick Niklaus
e10e8910f3 Use global uturns parameter.
Instead of previously per-via settings like uturns=true;false;true;; it
now only supports a global setting uturns=true.
2016-04-05 22:58:32 +02:00
Patrick Niklaus
879ccfc8c2 Implement viewport code to fix simplification
This fixes #2083
2016-04-05 22:58:32 +02:00
Patrick Niklaus
a77574b3d7 Add tests for coordinate transformation 2016-04-05 22:58:32 +02:00
Patrick Niklaus
5f457bff12 Rename alternative -> alternatives 2016-04-05 22:58:32 +02:00
Patrick Niklaus
a8fc95d4e4 Move bearing to public namespace 2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
7c30ea32bf Runs scripts/format.sh 2016-04-05 22:58:32 +02:00
Patrick Niklaus
58fb633df3 Add support for tile plugin 2016-04-05 22:58:32 +02:00
Patrick Niklaus
5e5c52ff0a Simplify static_rtree tests 2016-04-05 22:58:32 +02:00
Patrick Niklaus
d9d4742130 First round of lat,lng -> lng,lat switcheroo 2016-04-05 22:58:32 +02:00
Patrick Niklaus
0fab6b7cab Add rectangle unit test 2016-04-05 22:58:32 +02:00
Patrick Niklaus
56ea24b03b Add tests for bearing parsing 2016-04-05 22:58:32 +02:00
Patrick Niklaus
64e5ebb55f Fix parameter parsing tests 2016-04-05 22:58:32 +02:00
Patrick Niklaus
f3e72623e9 Add viaroute suport for new API 2016-04-05 22:58:32 +02: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
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
aeee565115 Formats all the files we touch.. 2016-03-01 23:51:25 +01:00
Daniel Patterson
36adeec220 Remove unused tests. 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
Daniel J. Hofmann
eb6f01e65a Rip out obsolete floating point header 2016-02-12 16:30:01 -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
ec01c2a119 Folds json_* utilities into json subfolder and adapts includes 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
Patrick Niklaus
439eb9da3d Create public facing libraries for extractor, contractor and datastore
New libraries libosrm_extract, libosrm_contract, libosrm_store
2016-01-21 06:47:34 +01:00
karenzshea
b36145e3c4 add target test 2016-01-19 23:38:13 +01:00
Moritz Kobitzsch
1c1bfd7541 Fix routing when start and target are on the same segment
Fixes issue #1864. Given the simple set-up:

a --> b --> c
^-----------|

This would translate into an edge based graph (ab) -> (bc),
(bc) -> (ca), (ca) -> (ab).

Starting at the end of the one-way street (ab) and going to
the beginning, the query has to find a self-loop within the
graph (ab) -> (bc) -> (ca) -> (ab), as both nodes map to the
same segment (ab).
2016-01-19 23:26:19 +01:00
Daniel J. Hofmann
c65dd16460 Make PolylineCompresser's encode and decode free standing functions 2016-01-09 19:55:22 +01:00
Daniel J. Hofmann
c590596dbe Make DouglasPeucker a free standing function 2016-01-09 19:55:21 +01:00
Patrick Niklaus
6991a38703 Run clang-format 2016-01-08 01:31:57 +01:00
Patrick Niklaus
6b18e4f7e9 Add namespace around all files 2016-01-08 01:30:52 +01:00
Patrick Niklaus
4312013552 Fix naming in coordinate_calculation 2016-01-05 12:06:34 +01:00
Patrick Niklaus
028ca5c9d9 Apply clang-format 2016-01-05 12:04:04 +01:00
Daniel J. Hofmann
685d330ee2 Remove license headers from project source files; global license 2016-01-04 19:06:32 +01:00
Mortada Mehyar
93a2e66704 use double precision calculations instead of mixing double and float 2016-01-03 20:44:38 -08:00
Patrick Niklaus
97585bb26a Fix include paths 2016-01-03 18:47:50 +01:00
Patrick Niklaus
078f71c144 Move files in unit_tests around 2016-01-03 16:37:38 +01:00
Patrick Niklaus
28bfefcac6 Add option to set segments as non-snapable from lua 2015-12-16 22:03:46 +01:00
Patrick Niklaus
bec56522e3 Add stxxl/vector include to range_table test 2015-12-16 22:02:34 +01:00
rparanjpe
5c3398c280 name_lengths std::vector --> stxxl::vector 2015-12-15 19:12:33 -08:00
Patrick Niklaus
4950e044ba Remove warnings and fix tests 2015-12-09 23:37:06 +01:00
Patrick Niklaus
cdb1918973 Refactor StaticRTree to remove application dependent code
StaticRTree now acts like a container, just returning the input data
(NodeBasedEdge) and not PhantomNodes.
2015-12-09 23:37:05 +01:00
Daniel Patterson
f87f18a291 Add support for 64bit OSM node id values. 2015-11-30 12:37:58 -08:00
Patrick Niklaus
aeaf0e7ba8 Fix unit test compilation 2015-11-25 00:27:20 +01:00
Daniel Patterson
8f3482561b Rename great_circle_distance->haversine_distance, and euclidean_distance->great_circle_distance, because that's what they actually are. 2015-11-17 17:10:06 -05:00
Daniel Patterson
e45656e5bf Refactor edge expansion into extract phase. New temporary file is generated - '.osrm.ebg' which is used by 2015-10-06 09:23:17 -07:00
Daniel Patterson
d07c0bde80 Adds support for a new b= parameter on the viaroute and match
plugins, allowing for better nearest neighbor matching when a heading
is known.
2015-10-06 11:15:10 +02:00
Daniel J. Hofmann
5c4a845b55 Remove template-heavy Boost.MPL headers where not needed.
This removed mpl headers from the code base, where not needed.

This mostly affects unit tests, where mpl's type list is actually only
used once to automatically generate tests for multiple types (see ref).

In addition, this commit also fixes the includes in the touched headers.

Resulting in 1/ reduces build times and 2/ proper includes.

Reference:

- http://www.boost.org/doc/libs/1_59_0/libs/test/doc/html/boost_test/tests_organization/test_cases/test_organization_templates.html#ref_BOOST_AUTO_TEST_CASE_TEMPLATE
2015-09-28 15:00:20 +02:00
Daniel J. Hofmann
468c01056f Replace custom replace utility with the stdlib's replace algorithm.
This removes the custom `replaceAll` function, replacing it with
`std::replace` from the stdlib's `<algorithm>` header.

This also removes the respective unit test.

More importantly, this removes the dependency on the
`<boost/algorithm/string.hpp>` header in the `string_util.hpp` header.
2015-09-28 15:00:20 +02:00
Daniel J. Hofmann
397078758e Remove boost/thread from rtree, include header for hash_combine in unit test.
The `static_rtree.hpp` header included `<booost/thread.hpp>` without using
anything from this header.

Removing it showed why:

the unit test for the rtree no longer built, since it was missing symbols
for Boost's `hash_combine`, used in the unit test.

Instead of relying on `<boost/thread.hpp>` including the proper header
for `hash_combine` by chance that we only use in the unit test, do the
following:

- remove `<boost/thread.hpp>` from the rtree implementation
- add `<boost/functional/hash.hpp>` to the rtree unit test

As always, include what you use.
2015-09-28 15:00:20 +02:00
Lauren Budorick
bac6703f8e Implement raster source feature to read data from third-party sources, to be used in lua profiles.
* Adds a data structure, RasterSource, to store parsed + queryable data
* Adds bindings for that and relevant data structures as well as source_function and segment_function
* Adds relevant unit tests and cucumber tests
* Bring-your-own-data feature
2015-09-03 22:28:18 -07:00
Huyen Chau Nguyen
74e00cf652 fix some small issues:
remove empty unit test

remove compiler directives

move trip related files from routing_algorithms to algorithms

run clang-format on files

fix all std::size_t related issues

improve code by adding std::move()s

clean up includes

fixing several code stye and improvement issues

add several small code improvements

return single scc in SplitUnaccessibleLocations() when theres only one

change ComputeRoute() to return an InternalRouteResult by value

improve some code style issues
2015-09-01 15:20:35 +02:00
Huyen Chau Nguyen
e6eea67eeb rename all names with round_trip, trip or tsp to trip to standardize the naming 2015-09-01 15:20:34 +02:00
Chau Nguyen
a40b3a98dc split algorithms in different plugins for better evaluation
split tsp brute force algorithm for better testing

refactor and clean up
2015-09-01 15:20:33 +02:00
Patrick Niklaus
49adf2192a Move calculate_coordinate to algorithms/
Fixes #1367
2015-08-12 13:02:18 +02:00
Patrick Niklaus
f838f3427b Fix static graph test 2015-08-06 15:09:28 +02:00
MoKob
b526cadebd Initial version of core ch
This improves preprocessing times in favour of worse query performance.
Core size can be set over the --core parameater, default is the old
behaviour to fully contract the graph.
2015-08-01 18:00:48 +02:00
Patrick Niklaus
021a1c7a39 Restructure the construction of the undirected graph 2015-07-01 18:07:29 +02:00
Patrick Niklaus
4a7451682b Fix data_structure test thanks to new assertion 2015-07-01 18:07:29 +02:00
Patrick Niklaus
faa880d60a Remove unused memebers and rename to currrent style convention 2015-07-01 18:07:29 +02:00
Patrick Niklaus
fd30e82836 Add graph compressor unit tests 2015-07-01 18:07:29 +02:00
Patrick Niklaus
3ef34fbb56 Rename GeometryCompressor and add unit tests 2015-07-01 18:07:29 +02:00
Andreas Gruß
782fba2ce7 updated to 1E6 based polyline format 2015-06-02 13:15:31 +02:00
Andreas Gruß
ee3b296a99 fixed values of test 2015-06-02 12:10:13 +02:00
Andreas Gruß
8b62d04453 test added 2015-06-02 12:09:59 +02:00
Patrick Niklaus
a57fb4f1ab First step into overhauling the edge storage 2015-06-01 17:22:12 +02:00
Patrick Niklaus
6d43d9f2b6 Add unit test for dynamic graph
Also simplify the unit tests.
2015-04-17 00:38:09 +02:00
Dennis Luxen
3a291f5c8e fix escaping of double quote in JSON response, fixes #1410 and also adds a unit test for that case. 2015-04-02 10:34:40 +02:00
Dennis Luxen
5bed7f292f add test for printInt() sign correctness 2015-03-30 12:37:39 +02:00
Dennis Luxen
1851a31e66 add unit tests for functions escape_JSON, printInt and replaceAll in string_util.hpp 2015-03-27 18:15:58 +01:00
Dennis Luxen
7e00a86bb4 implement ISO 8601 durations parsing, cf. #1399 2015-03-02 17:18:52 +01:00
Dennis Luxen
3bd27ae8c5 change copyright line from personal names to project 2015-02-19 09:19:51 +01:00
Dennis Luxen
b20b7e65bf renamed: Util/* -> util/* 2015-01-27 17:47:23 +01:00
Dennis Luxen
bcd73e604c reformat coordinate and rtree test code 2015-01-22 17:00:48 +01:00
Dennis Luxen
e80ca6553d use new coordinate interface in unit tests 2015-01-22 16:58:45 +01:00
Dennis Luxen
baacd0e50c reformat source files 2015-01-22 12:24:54 +01:00
Dennis Luxen
01f3237416 speed up nearest neighbor query by pruning, move coordinate calculations away from library interface 2015-01-20 16:24:49 +01:00
Dennis Luxen
472a567f42 add cmath include to fix call to std::abs() on clang compiler, reorder includes 2015-01-16 17:23:29 +01:00