Commit Graph

567 Commits

Author SHA1 Message Date
Michael Bell
eb0c089574 Replace Travis with Github Actions for CI builds
Replace Travis for continuous integration with Github Actions.
The Github Actions pipeline is functionally equivalent, with
all the same build permutations supported.
Whilst the Github Actions offering is broadly equivalent to
Travis, a few changes have been made as part of the migration.

- The 'core' and 'optional' Travis stages have been consolidated
into one build matrix. This is due to the current inability in
Github Actions to share build steps between jobs, so this avoids
having to duplicate the steps.
Optional stage jobs will now run in parallel with core jobs,
but they still remain optional in the sense that they don't fail
the build.

- A number of existing Github Action plugins are used to replace
functionality provided by Travis or other tools:
Node setup, caching, Codecov, publishing release artifacts.

- Linux builds are updated to build on Ubuntu 18.04.
MacOS builds are updated to run on 10.15. Similar to the
Travis Xenial upgrade attempt, some changes are required due
to underlying platform and compiler upgrades. This means some
Node 10 toolchains will no longer be supported.

Whilst there is opportunity to upgrade some dependencies and
make the CI steps more idiomatic, I've left this for future changes
and just focussed on functional replication.
2021-09-03 18:35:01 +02:00
Patrick Niklaus
38df7d5e05 Fix the URL parser for special chars in profile 2021-09-03 10:55:53 +02:00
Karen Shea
a613375460
Validate source/destination indices correctly in nodejs support (#5595)
* validate source/destination indices correctly

Co-authored-by: Denis Chapligin <denis.chaplygin@wolt.com>
Co-authored-by: Daniel Patterson <danpat@danpat.net>
2021-01-28 06:02:01 -08:00
Michael Bell
bd3eb6591e
Undo libosrm API break by adding old interface as method overload (#5861)
Removes the breaking libosrm API change by adding the old interface to
the new. This does not introduce any new breaks.

The downside of this is that it allows for multiple ways to
return JSON responses.
2021-01-27 09:14:44 -08:00
Michael Bell
5266ac1635
Add support for multiple via-way restrictions (#5907)
Currently OSRM only supports turn restrictions with a single via-node or one
via-way. OSM allows for multiple via-ways to represent longer and more
complex restrictions.

This PR extends the use of duplicate nodes for representng via-way turn
restrictions to also support multi via-way restrictions. Effectively, this
increases the edge-based graph size by the number of edges in multi via-way
restrictions. However, given the low number of these restrictions it
has little effect on total graph size.

In addition, we add a new step in the extraction phase that constructs
a restriction graph to support more complex relationships between restrictions,
such as nested restrictions and overlapping restrictions.
2020-12-20 13:59:57 -08:00
Daniel Patterson
50d9632ed7
Upgrade formatting to clang-format 10 (#5895)
* Update formatting tools to clang-format-10

* Reformat using clang-format-10.0.09
2020-11-26 07:21:39 -08:00
Michael Bell
96acdaf0d5 Fix osrm-contract, tests, on Windows
As part of graph contraction, node renumbering leads to
in-place permuting of graph state, including boolean vector elements.

std::vector<bool> returns proxy objects when referencing individual
bits. To correctly swap bool elements using MSVC, we need to explicitly
apply std::vector<bool>::swap.

Making this change fixes osrm-contract on Windows.

We also correct failing tests and other undefined behaviours
(mainly iterator access outside boundaries) highlighted by MSVC.
2020-11-15 14:22:26 +00:00
Michael Bell
4799b46eeb
Incorrect error message when unable to snap all input coordinates (#5846)
In cases where we are unable to find a phantom node for an input
coordinate, we return an error indicating which coordinate failed.

This would always refer to the coordinate with index equal to the
number of valid phantom nodes found.

We fix this by instead returning the first index for which a
phantom node could not be found.
2020-09-30 18:44:22 -07:00
Denis Chapligin
78160c0fe4
Merge pull request #5813 from woltapp/tbbdeprecation
Partially fixes use of deprecated TBB features
2020-09-08 11:17:32 +03:00
Denis Chaplygin
03d9e7a8ce
Deprecated tbb::task_scheduler_init replaced with std::thread and tbb::global_control 2020-09-04 09:33:43 +03:00
Denis Chaplygin
7e24dcfd0a
Removed references to obsolete Boost.Test headers. 2020-09-02 13:16:44 +03:00
Denis Chaplygin
e97ec13064 Formatted the sources 2019-09-17 17:42:52 +03:00
Denis Chaplygin
fa5567e669 Added unit tests for 'skip waypoints' on Trip/Match services 2019-09-17 17:42:52 +03:00
Denis Chaplygin
a9d4e28e38 Added unit test for flatbuffers serialization of Match/Trip responses. 2019-09-17 17:42:52 +03:00
Denis Chaplygin
a5127539eb Added unit tests of 'skip_waypoints' option to the Nearest/Route/Table services. 2019-09-17 17:42:52 +03:00
Denis Chaplygin
0be87c73cf Fixed typo in flatbuffers: longitute -> longitude. 2019-08-26 14:31:51 +03:00
Denis Chaplygin
b8182dd7ff Replaced 'in' and 'out' at the flatbuffers 'instersection' object
with 'in_bearing' and 'out_bearing' to get flatbuffers schema javascript friendly.

Added a cucumber test for flatbuffers support.
2019-08-26 14:03:29 +03:00
Denis Chaplygin
ce71e08ef1 Added tests for Nearest/Table/Route flatbuffers serialization. 2019-08-26 11:09:38 +03:00
Denis Chaplygin
a9c187c99b Updated changelog entry 2019-08-26 11:09:38 +03:00
Denis Chaplygin
a44a75b211 Unit tests are compatible with new plugin API. 2019-08-26 11:08:56 +03:00
Daniel Patterson
4f0ec785f6
Configurable snapping behaviour (#5361) 2019-02-14 17:14:50 -08:00
Lev Dragunov
8b45ff7a18
Store metadata about original OSM data, and return it in the API response, if available. 2019-01-30 15:31:56 -08:00
Daniel Patterson
81bc2f41a6
When matching, ignore 'is_startpoint' propert, snap to any edge (#5297)
Includes all edges in the rtree, but adds an `is_startpoint` flag to each.  Most plugin behaviour remains unchanged (non-startpoint edges aren't used as snapping candidates), but for map matching, we allow snapping to any edge.  This fixes map-matching across previously non-is_startpoint edges, like ferries, private service roads, and a few others.
2018-12-13 17:10:32 -07:00
Kajari Ghosh
01ca32c81c
Fix fallback speed validity checks (#5300)
* fix fallback_speeds check to only accept values > 0

* add invalid_fallback_speed
2018-12-10 14:53:30 -05:00
Kajari Ghosh
2e17f3010a
Add a multiplier to the matrix (#5298)
* add a multiplier to the matrix

* add rounding

* remove scale_factor restrictions

* clamp for overflow error

* update check to match error message

* enforce clamping on < 0 and increase test coverage

* add an invalid scale_factor value to node tests

* increase test coverage

* changelog
2018-12-10 13:41:44 -05:00
Daniel Patterson
4dde9c7bbe
Include distance from input to snapped for all waypoints, not just on the nearest service. 2018-11-02 15:30:52 -07:00
Daniel Patterson
985ab58f45
Add feature to fill null table entries with as-the-crow-flies estimates. 2018-11-02 01:07:24 -07:00
Daniel Patterson
498259b220
Replace dynamic distance calculation for table plugin with pre-calculated distances on shortcuts, avoiding unpacking cost.
Adds approx 10% to total data size.  Speeds up large table requests by 2 orders of magnitude.

Co-authored-by: Kajari Ghosh <ghoshkaj@gmail.com>
2018-10-30 15:41:06 -07:00
Daniel Patterson
2f9cb44368
mmap tarfiles directly when mmapping is enabled, instead of copying data into separate mmapped block
Co-authored-by: Kajari Ghosh <ghoshkaj@gmail.com>
2018-10-26 23:53:59 -07:00
Daniel Patterson
d80318f8ea
Match serialized bit-packing for vector<bool> to match in-memory layout for vector_view<bool> so that data can be directly mmapped. 2018-10-26 23:53:50 -07:00
Michael Krasnyk
9695fa7941 Remove weight and duration from customizer::EdgeBasedGraphEdgeData 2018-04-28 08:59:18 +02:00
Michael Krasnyk
db18e8669f Always read .osrm.enw file in updater 2018-04-28 08:59:18 +02:00
Michael Krasnyk
c628ecbf24 Update tile unit tests 2018-04-24 15:40:57 +02:00
Kajari Ghosh
14860b62e9
Unpack paths and return total distance in matrix plugin for CH (#4990) 2018-04-20 18:18:55 -04:00
Patrick Niklaus
69fa52a010 Use byte based tar size encoding above 8GB 2018-04-10 21:12:39 +02:00
Patrick Niklaus
e1efa4c6ab Add test case for writing and reading huge tar file
This test case is disabled by default because it needs too much storage,
but serves as documentation for the future.
2018-04-10 21:12:39 +02:00
Patrick Niklaus
a06171438e Fix hard-coded hint strings in unit-tests 2018-04-10 18:08:18 +02:00
Michael Krasnyk
c4bf450fc6 Restore storage constructors with one arguments 2018-04-09 15:08:00 +02:00
Michael Krasnyk
8d8042ebae Use ranges with fixed types 2018-04-09 11:05:01 +02:00
Kajari Ghosh
be123cd72f Use ranges in datafacade instead of vectors
Range type must use immutable references due to a
regression in `boost::any_range`.
References:
https://svn.boost.org/trac10/ticket/10493
https://stackoverflow.com/questions/42427395/boostany-range-with-optimization-level-o2-causes-crash/42427662
2018-04-09 11:05:01 +02:00
Michael Krasnyk
bc120776f0 Don't apply unimplemented SH and PH conditions 2018-04-05 13:31:48 +02:00
Patrick Niklaus
9889a454ce Fix test compilation 2018-04-04 12:38:40 +02:00
Patrick Niklaus
39effb8f7e Fix checking for non-empty string in prefix check 2018-04-04 12:38:40 +02:00
Patrick Niklaus
4c2d578561 Fix unit-test compilation due to broken readGraph 2018-04-04 12:38:40 +02:00
Patrick Niklaus
81a4747acb Fix formating 2018-04-04 12:38:40 +02:00
Patrick Niklaus
9fc2c32408 Fix errors when loading an incompatible dataset. 2018-04-04 12:38:40 +02:00
Patrick Niklaus
c334d11e95 Refactor metric storage 2018-04-04 12:38:40 +02:00
Patrick Niklaus
5395290fd5 Add directory listing 2018-04-04 12:38:40 +02:00
Patrick Niklaus
9e97748700 Add datalayout tests 2018-04-04 12:38:40 +02:00
Patrick Niklaus
4a9fdca7b2 Remove fixed block identifiers 2018-04-04 12:38:40 +02:00
Daniel Patterson
b5a4ffed96
Return datasource names along with datasource annotation (#4973)
* Add new `datasource_names` annotation that returns the string version of the `datasources` annotation
2018-04-03 15:13:25 -07:00
karenzshea
0d9f18fe1f add microtar to executables 2018-03-27 20:50:34 +02:00
Patrick Niklaus
c322d93435 Make the block size of vector<bool> consistent 2018-03-26 12:12:41 +00:00
Patrick Niklaus
c0dd5d7c76 Fix formating 2018-03-26 11:02:34 +00:00
Patrick Niklaus
a542da3678 Remove old io::FileWrite serialization code 2018-03-26 11:02:34 +00:00
Patrick Niklaus
f1a392c4df Fix test include path 2018-03-26 11:02:33 +00:00
Patrick Niklaus
a52213c885 Get offset of data inside tar file 2018-03-26 11:02:33 +00:00
Patrick Niklaus
8e800c48bc Add function to stop and continue writing to a tar file 2018-03-26 11:02:33 +00:00
Patrick Niklaus
8152dcfb4c Port .ramIndex to tar file and mmap .fileIndex directly 2018-03-26 11:02:33 +00:00
Patrick Niklaus
86ffce3a50 Fix missing removal of timestamp in offline facade 2018-03-26 11:02:33 +00:00
Patrick Niklaus
bed53f5fd5 Remove timestamp file 2018-03-26 11:02:31 +00:00
Patrick Niklaus
b8260e44fa Port .names file to tar 2018-03-26 11:02:04 +00:00
Patrick Niklaus
06f28ffd34 Add BufferWriter/BufferReader and simplify interface for ConditionalRestrictions 2018-03-26 11:02:04 +00:00
Patrick Niklaus
4f454a3761 Add buffer reader/writer for per-element serialization 2018-03-26 11:02:04 +00:00
Patrick Niklaus
d4300e73f3 Remove line reading interface from FileReader 2018-03-26 11:02:04 +00:00
Patrick Niklaus
2c5e4e6c02 Add test cases for range table and packed vector serialization 2018-03-26 11:02:04 +00:00
Patrick Niklaus
cf5f6be472 Swtich EBG to tar file 2018-03-26 11:02:04 +00:00
Patrick Niklaus
5d1b4ce71d Port .osrm.icd file over to tar 2018-03-26 11:02:03 +00:00
Patrick Niklaus
c664d0392a Add test cases for int and unsigned vector for tar 2018-03-26 11:02:03 +00:00
Patrick Niklaus
aaf39162a8 Fix vector<bool> serialization for tar files and add unit tests 2018-03-26 11:02:03 +00:00
Patrick Niklaus
6d96a9a2e3 Serialize mldgr using the new tar writer 2018-03-26 11:02:03 +00:00
Patrick Niklaus
495131efd7 Add vector serialization 2018-03-26 11:02:03 +00:00
Patrick Niklaus
2eb633bc41 Add unit tests for tar reading 2018-03-26 11:02:03 +00:00
Patrick Niklaus
86bfe1ede1 First step towards reading/writing tar 2018-03-26 11:02:03 +00:00
Daniel Patterson
f7775f5e0b
Add source phantom weight to first segment when merging legs (#4949)
Fix annotation values for annotations on edges where phantom nodes are snapped.
2018-03-13 11:31:29 -07:00
Karen Shea
43f0723b73 Remove deduplication of unpacked_path_segments in MM collapsing (#4911)
* remove deduplication of unpacked_path_segments
2018-02-24 12:42:11 +11:00
Daniel Patterson
5531cace7f
Support maneuver relations (#4676) 2018-02-10 05:32:09 +11:00
Patrick Niklaus
26e5c4eae2 Fix formating 2018-02-09 17:51:58 +01:00
Patrick Niklaus
d13d6566f8 Fix infinite recursion warning 2018-02-09 17:51:58 +01:00
Patrick Niklaus
aa1048154c Add missing initializer around sub-object 2018-02-09 17:51:58 +01:00
Patrick Niklaus
eb1e83858a Use BOOST_CHECK instead of BOOST_ASSERT to make tests work in release mode 2018-02-09 17:51:58 +01:00
Patrick Niklaus
425a46fe78 Fix warnings in unit tests 2018-02-09 17:51:58 +01:00
Patrick Niklaus
b4cfc8d6e0 Fix formating 2018-02-06 11:51:33 +01:00
Patrick Niklaus
e7bb612050 Move debug printer code to own header 2018-02-06 11:51:33 +01:00
Michael Krasnyk
9e93f198ae Add CRC checksums to EBG and turns data 2018-02-02 11:33:38 -05:00
Michael Krasnyk
10de243556 Move guidance turn generation out of EBGF 2018-02-02 11:33:38 -05:00
Michael Krasnyk
988b6e3311 Split intersection analysis and guidance code
Intersection analysis occupy in osrm::extractor::intersection namespace
and guidance code osrm::guidance
2018-02-02 11:33:38 -05:00
Michael Krasnyk
36877e4de5 Move guidance pre-processing code into GUIDANCE library 2018-02-02 11:33:38 -05:00
Mateusz Loskot
c6d12e064c Add basic facades for Customizer and Partitioner run methods 2018-02-02 15:52:30 +01:00
Mateusz Loskot
8114104a43 Rename namespace partition to partitioner
Rename module partition to partitioner.
This cultivates naming used in existing modules like extractor,
customizer, etc. - noun vs verb (word partition is both though).
2018-02-02 11:07:18 +01:00
Huyen Chau Nguyen
61e06fcaba
Making the turn function more flexible (#4789)
* set and store highway and access classification for the turn function
* expose highway turn classification and access turn classification and speed to the lua profile turn function
* expose whether connection road at turn is incoming or outgoing
* add lua tests for exposed information to turn function
* update docs about attributes in process_turn
* add turn_classification info to docs
* adding warning if uturn and intersection dont match
* handle u turns that do not turn into intersection[0]
* split OSM link generation in an accessible coordinate function
2018-01-24 15:39:55 -05:00
karenzshea
02712cd513 Allow restricted access on highway=service roads for the car profile
We still backlist `access=private` for the car profile though.
2018-01-23 17:40:18 +01:00
Kajari Ghosh
155772f01f
Refactor isThroughStreet/Intersection options (#4751)
* refactor isThroughStreet 
* refactor HaveIdenticalName
* fix a typo in the unit tests
2018-01-19 13:49:00 -05:00
Michael Krasnyk
26f0b4dc77 Add assertion and adjust unit test expectations check 2018-01-19 13:55:05 +01:00
karenzshea
181eff29c7 add unit test for split submatch waypoints indices 2018-01-19 13:55:05 +01:00
karenzshea
55cc06fd8b Add waypoints parameter to matching service, returns map matching result
with selective input coordinates as waypoints
2018-01-08 12:28:20 +01:00
Michael Krasnyk
4b9e3a8068 Remove IntersectionGenerator 2018-01-05 17:35:11 +01:00
Michael Krasnyk
cc1a5ea78d Remove usage of IntersectionGenerator in EBGF 2018-01-05 17:35:11 +01:00
Kajari Ghosh
84b6ef4340
add osrm-routed and node-osrm flags to configure mapmatching radius limit (#4721) 2017-12-20 16:53:43 +05:30
vng
32e6ccb037 Code review fixes. 2017-11-16 15:08:30 +01:00