* - Use libtbb-dev in builder stage and libtbb12 package in the runstage instead of building oneTBB v2021.12.0 from source code
- Remove wget package from builder stage, because it is not used
- Uppercase "FROM ... as" -> "FROM ... AS" to silence a "docker build" warning
- Sort packages alphabetically and put them on separate lines for easier comparison
* - Fix the warning "FromAsCasing: 'as' and 'FROM' keywords' casing do not match"
- Sort packages alphabetically and put them on separate lines for easier comparison
* Revert -Wno-stringop-overflow
* Update the link to multi staged builds in the comment
* Update alpine:3.20.0 -> alpine:3.20.5
* Remove unused bearing::get function
* Remove unused bearing::get function
* Remove unused bearing::get function
* Remove unused bearing::get function
* Attempt to fix failing CI on gcc-13 jobs
* Attempt to fix failing CI on gcc-13 jobs
* Attempt to fix failing CI on gcc-13 jobs
* Attempt to fix failing CI on gcc-13 jobs
* Attempt to fix failing CI on gcc-13 jobs
The change clarifies the conditions for forcing routing steps and
simplifies the codebase to support it.
- Makes explicity the search runtime condition for forcing a routing
step. Namely, the node is a source of the forward and reverse searches,
and it's one of the pre-identified nodes that requires a step to
be forced.
- Consolidate the two lists of force nodes into one. Not only is there
no algorithmic value in separating the nodes by geometric direction,
the improvements to via-routes with u-turns mean atleast one of these
lists will be empty for any search.
- Rename 'force loop' to 'force step'. This moves the code away
from the original CH-specific language for checking for self-loops
in the case where this condition is met. MLD does not have loops.
Additional cucumber tests are added to cover the logic related to
negative search weights and forcing routing steps on via-route
paths.
* Remove include that breaks compilation for Boost v1.85.0
* Update CHANGELOG.md
* Fix typo
* Fix issues found by newer clang-tidy version
* Add include to boost filesystem to satisfy Windows compiler
Each leg of a via-route supporting u-turns does not need to consider
force-loops. Negative weight checks are sufficient to prevent
incorrect results when waypoints are on the same edge.
* Added approach on the opposite side of the road.
* Additional test and docs coverage for opposite approach
---------
Co-authored-by: Aleksandrs Saveljevs <Aleksandrs.Saveljevs@gmail.com>
* sort manuever overrides vector after partition
---------
Co-authored-by: rshokri <reza.shokri@tapsi.cab>
Co-authored-by: Michael Bell <michael@mjjbell.com>
* Extract prerelease/build information from package semver
Currently we only extract the major.minor.patch identifiers from
the semver label stored in package.json.
This leads to version information in executables incorrectly
reporting a release version is running on prereleases and special builds.
This commit is a quickfix to extract this information and report it
in version strings.
CMake regex parsing is not sophisticated enough to handle the full semver
regex, so we might need to explore other CMake modules if we want to
strictly parse the label.
Unidirectional traffic signal segments are currently not compressed.
This means traffic signals which are not on turns can be missed and
not applied the correct penalty.
This commit changes this behaviour to correctly handle the graph
compression. Additional tests are added to ensure there is no
regression for other cases (turns, restrictions).
Co-authored-by: Michael Bell <michael@mjjbell.com>
* Pin Conan revisions correctly
Conan dependencies are not pinned correctly. This means we're
pulling in a newer onetbb recipe that no longer has a shared
library option.
Following other examples of how to pin revisions with cmake
for conan v1, we correctly pin the expected revisions.
Longer term we should look into
- upgrading to conan v2
- defining the conan config separately from cmakelists.txt
- understanding the need for disabling onetbb shared library support
but for the purposes of reviving CI, this will be sufficient.
* Fix macos CI builds
This change adds support for disabling datasets, such that specific
files are not loaded into memory when running OSRM. This enables users
to not pay the memory cost for features they do not intend to use.
Initially, there are two options:
- ROUTE_GEOMETRY, for disabling overview, steps, annotations and waypoints.
- ROUTE_STEPS, for disabling steps only.
Attempts to query features for which the datasets are disabled will
lead to a DisabledDatasetException being returned.
Currently `npm test` runs the Cucumber suite with a matrix
configuration for selecting the algorithm (CH, MLD) and data loading
(shared-memory, mmap) options.
However, there is a third data loading option, 'load directly',
which is to directly load the datasets into the osrm-routed process memory.
The code paths for each data loading option are distinct:
Storage::Run + SharedMemoryAllocator
MMapMemoryAllocator
ProcessMemoryAllocator
This commit adds direct data loading as part of the Cucumber
configuration matrix.
This will ensure optional dataset support can be added without any
regressions.
* Ensure required file check in osrm-routed is correctly enforced.
The storage module had a stricter check. This keeps the IOConfig
check in sync.
* Correct HTTP docs to reflect summary output dependency on steps parameter.
There is no summary parameter.
* npm audit fix
Building with GCC 13 failed because for example std::int32_t
was not found. Porting guide [1] suggested to add explicit includes
for <cstdint> if necessary, so did just that.
[1]: https://gcc.gnu.org/gcc-13/porting_to.html
* print tracebacks and line numbers for Lua runtime errors
* revert format changes
* update changelog with lua traceback, #6564
* revert using protected_function for old GetStringListFromFunction and source_function #6564
* add unit test for line numbers in tracebacks, #6564
* apply clang-format (#6564)
* remove unused test helper function, #6564
* suppress leaksanitizer warnings in extract-tests, #6564
When the extractor encounters a lua runtime error, some osmium objects are not freed. In production this doesn't matter because these errors bring down OSRM. In the tests we catch them to ensure they occur, and the leaksanitizer flags them.
CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (Lua). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/usr/share/cmake-3.24/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
cmake/FindLua.cmake:39 (include)
CMakeLists.txt:571 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
- remove GOLD linker special case handling
- bump minimum cmake version to 3.20
- simplify LTO detection
- remove outdated way to check for compiler flags
- remove outdated compiler version gates (rely on CXX version)
- remove outdated Apple platform handling
- disable compiler-specific CXX extensions
- require boost 1.70 in all builds
- remove unused variable
This change takes the existing typedefs for weight, duration and
distance, and makes them proper types, using the existing Alias
functionality.
Primarily this is to prevent bugs where the metrics are switched,
but it also adds additional documentation. For example, it now
makes it clear (despite the naming of variables) that most of the
trip algorithm is running on the duration metric.
I've not made any changes to the casts performed between metrics
and numeric types, they now just more explicit.
Weight and duration penalties are flipped in the lambda function
that applies penalties from traffic signals.
Duration is in deciseconds, whilst weight is multipled by
10^weight_precision, with weight_precision being 1 by default.
Therefore, for default routability profile, the penalties end up
being the same, hence why no tests picked this up.
If distance weight is used however, it will incorrectly apply an
additional penalty to the weight, and not add the traffic signal
delay to the duration in the routing graph.
To confuse things further, in some API responses the values are
correct because they use geometry data instead, but it's still
possible that a sub-optimal route was selected.
However, given the distance weight is in meters, and the additional
penalty per traffic light would be 20, it's unlikely this would
have changed the routing results.
In any case, we correct the function to apply the arguments correctly.
In case we're not able to get access to the unscoped credentials.
Scoped packages are also the recommended approach for projects
managed by a team of developers.
Badly constructed OSM intersections can create OSRM intersection
views that have no valid turns.
The guidance code for segregated intersections tries to look
ahead to the second intersection to ensure lanes are announced
intuitively.
Currently, OSRM assumes there are always turns at the second
intersection that we should consider. This commit corrects
this assumption so that it can now handle badly constructed
OSM intersections with no turns.
Due to some rather complex logic that tries to calculate intersection
angles by looking further up the road, it's possible to return
an intersection view that is missing a u-turn - something which
is assumed to exist in later guidance calculations.
We apply a fix here by ensuring the u-turn is always included in
the returned view.
Currently OSRM parses traffic signal nodes without consideration
for the direction in which the signal applies. This can lead
to duplicated routing penalties, especially when a forward and backward
signal are in close proximity on a way.
This commit adds support for directed signals to the extraction and
graph creation. Signal penalties are only applied in the direction
specified by the OSM tag.
We add the assignment of traffic directions to the lua scripts,
maintaining backwards compatibility with the existing boolean
traffic states.
As part of the changes to the internal structures used for tracking
traffic signals during extraction, we stop serialising/deserialising
signals to the `.osrm` file. The traffic signals are only used by
`osrm-extract` so whilst this is a data format change, it will not
break any existing user processes.
Currently there is an edge-case in the turn restriction implementation,
such that routes can not be found if the target input location snaps
to a way used in a (multi) via restriction.
With the addition of snapping input locations to multiple ways, we
can now also snap to the "duplicate" edges created for the restriction graph,
thereby fixing the problem.
This is achieved by adding the duplicate restriction edges to the
geospatial search RTree.
This does open up the possibility of multiple paths representing exactly
the same route - one using the original edge as a source, the other
using the duplicate restriction graph edge as source. This is fine,
as both edges are represented by the same geometry, so will generate
the same result.
This PR improves routing results by adding support for snapping to
multiple ways at input locations.
This means all edges at the snapped location can act as source/target
candidates for routing search, ensuring we always find the best route,
and not the one dependent on the edge selected.
There is a bug in the deflate compression. Therefore, we do not want
to select this in the default choice for HTTP response compression.
Instead we revert back to the previous precedence, selecting gzip as
the priority.
This change unblocks the osrm-extract debug build, which is
currently failing on a maneuver override assertion.
The processing of maneuver overrides currently has three issues
- It assumes the via node(s) can't be compressed (the failing assertion)
- It can't handle via-paths containing incompressible nodes
- It doesn't interop with turn restriction on the same path
Turn restrictions and maneuver overrides both use the same
from-via-to path representation.
Therefore, we can fix these issues by consolidating their
structures and reusing the path representation for
turn restrictions, which already is robust to the above
issues.
This also simplifies some of the codebase by removing maneuver
override specific path processing.
There are ~100 maneuver overrides in the OSM database, so the
impact on processing and routing will be minimal.
Currently route results are annotated with additional path information,
such as geometries, turn-by-turn steps and other metadata.
These annotations are generated if they are not requested or returned
in the response.
Datasets needed to generate these annotations are loaded and available
to the OSRM process even when unused.
This commit is a first step towards making the loading of these datasets
optional. We refactor the code so that route annotations are only
generated if explicitly requested and needed in the response.
Specifically, we change the following annotations to be lazily generated:
- Turn-by-turn steps
- Route Overview geometry
- Route segment metadata
For example. a /route/v1 request with
steps=false&overview=false&annotations=false
would no longer call the following data facade methods:
- GetOSMNodeIDOfNode
- GetTurnInstructionForEdgeID
- GetNameIndex
- GetNameForID
- GetRefForID
- GetTurnInstructionForEdgeID
- GetClassData
- IsLeftHandDriving
- GetTravelMode
- IsSegregated
- PreTurnBearing
- PostTurnBearing
- HasLaneData
- GetLaneData
- GetEntryClass
Requests that include segment metadata and/or overview geometry
but not turn-by-turn instructions will also benefit from this,
although there is some interdependency with the step instructions
- a call to GetTurnInstructionForEdgeID is still required.
Requests for OSM annotations will understandably still need to
call GetOSMNodeIDOfNode.
Making these changes unlocks the optional loading of data contained in
the following OSRM files:
- osrm.names
- osrm.icd
- osrm.nbg_nodes (partial)
- osrm.ebg_nodes (partial)
- osrm.edges
The internal representation of turn restrictions expects only one
`from` way and only one `to` way.
`no_entry` and `no_exit` turn restrictions can have multiple `from` and
`to` ways respectively. This means they are not fully supported by
OSRM's restriction parser.
We complete support for these turn restriction types by parsing all
ways and converting a valid restriction with multiple `from`/`to` members
into multiple internal restrictions.
Currently /trip supports finding round-trip routes where only the
start or end location is fixed. This PR extends this feature to
non-round-trip requests.
We do this by a new table manipulation that simulates non-round-trip
fixed endpoint requests as a round-trip request.
The data facade interface contains numerous methods for looking up
datapoints by identifiers.
Many of the parameters use the NodeID or EdgeID types. However, these two
identifier types are used for representing three different contexts:
1. Node-based graph edges and nodes
2. Edge-based graph edges and nodes
3. Packed geometries
Consider the use of identifier parameters in these examples:
---
GetWeightPenaltyForEdgeID(const EdgeID id) <- edge-based edge
GetUncompressedForwardWeights(const EdgeID id) <- packed geometry
IsLeftHandDriving(const NodeID id) <- edge-based node
GetBearingClass(const NodeID node) <- node-based node
---
This mixing of contexts within the same interface makes it
difficult to understand the relationships and dependencies between
the OSRM datasets.
For 1. and 2. we continue to use the NodeID and EdgeID types, but
change the interface parameter names to identify them as
edge-based or node-based graph properties.
For 3. we define a new type definition, PackedGeometryID.
These changes are to aid with readability. A next step would be
to strongly type these definitions, leveraging the Alias template
already used for OSM identifiers.
It is quite difficult to maintain current Windows CI, because it uses pre-compiled dependencies stored on wolt.com server and there is low chance to find someone who is able to update it.
* Remove highway=bicycle safety bonus
This removes a bonus for a road class that doesn't exist (cycleway would
be correct), but the code was buggy since safety_bonus is nil and caused
an arithmetic exception. We only caught this 4 (!) years later since
recently a way was tagged with highway=bicycle and made it in our OSM
data leading to preprocessing failures.
NodeJS API docs are out of sync with NodeJS C++ wrapper documentation
due to the doc build breaking back in #4043.
The commit fixes the Node dev dependencies such that `npm run docs`
works again and re-enables the check in CI.
- Fix typo in util function name for_each_indexed.
- Use the overloaded functions for_each_indexed and for_each_pair
with a container argument where possible to improve readability.
A recent change to the Ubuntu Focal CI worker - either a CMake upgrade,
or default installation of the libexpat-dev library - leads to the
32-bit expat library to not be found by CMake.
FindPackage(EXPAT) finds the library via pkg-config, so the fix is
to explicitly include the i386 pkg-config directory in the
PKG_CONFIG_PATH environment variable list.
During the CI migration to Github Actions, a bug was introduced
such that Mason CMake is not being added to the PATH environment
variable correctly, so it defaults to the CMake installed in the
OS environment.
Simple fixing the typo fails as the Mason CMake version requires
libssl 1.0 as a dependency, whilst the Ubuntu Focal runners are
on the newer libssl 1.1. Therefore, we also bump the Mason
CMake version to 3.21.2.
This is a workaround for discrepancy between MSVC 19.27 and 19.28
about static const member definition
https://developercommunity2.visualstudio.com/t/discrepancy-between-msvc-1927-vs-1928-about-static/1255338
We can not use C++17 inline variable as a workaround suggested
in the issue report linked above, because the sol2 does not
seem to compile in C++17 mode:
third_party/sol2/sol2/sol.hpp: error C2039: 'object_type': is not a member of...
* Add missing profile name to library extract test.
* Support both tzid and TZID properties on timezone geometry. Improve validation of timezone polygons.
* Missing tzid property wasn't a geojson validation issue, shouldn't have been tested there.
* Use filesystem glob to loop over all test executables so we don't miss any in the future.
Co-authored-by: Michael Bell <michael@mjjbell.com>
Moves Linux CI builds to the latest Ubuntu LTS.
- Bumps the GCC matrix to versions {7,8,9,10,11}, making 9 the default
for testing non-standard builds.
- Bump Node matrix to {12,14,16,LTS,latest} now that 10 is EOL.
- Fixes to CI builds due to library changes on newer distro.
A request to osrm-routed can be assigned to a thread which
is currently busy processing another request, even when there
are other threads/cores available. This unnecessarily delays
the response, and can make requests appear to hang when
awaiting CPU intensive requests to finish.
The issue looks like a bug in Boost.Asio multithreaded
networking stack.
osrm-routed server implementation is
heavily influenced by the HTTP server 3 example in the
Boost.Asio docs. By upgrading to Boost 1.70 and updating the
server connections to match the example provided in the 1.70
release, the problem is resolved.
The diff of the changes to the Boost.Asio stack are
vast, so it's difficult to identify the exact cause. However
the implementation change is to push the strand of execution
into the socket (and timer) objects, which suggests it could
fix the type of threading issue we are observing.
* Fix test cache to consider MLD executable changes
Currently the test cache is not invalidated if changes to
osrm-partition or osrm-customize executables. This is problematic
when these executables make breaking changes to the data format.
We fix this by including both in the list of executables that
can invalidate the test cache.
* Executables use hyphens
Each MLD cell has source and destination nodes.
MLD is keeping a |source| x |destination| sized table
for various metrics (distances, durations, etc) from each
source to all destinations in a cell.
It stores all of the values for a metric in one large array, with
an offset for each cell to find its values. The offset is currently
limited to 32 bit values, which overflows on very large graphs
(e.g. Planet OSM).
We fix this by changing the offsets to be uint64_t types.
The generation of level masks for compactly storing partition cells
supports sizes that can be stored in 64 bits.
The current implementation fails if the total bit sum is 64 bits
exactly. A bit shift mechanism is used that is undefined when the
shift size is equal to the bit size of the underlying type. This
generates an incorrect mask value.
We fix this by adding a special case for a 64 bit offset. Given this
code is called at most |level| times, there will be no effect on
performance. We also update the assertions to reflect 64 bit masks
are now supported.
osrm-routed does not immediately clean up a keep-alive connection
when the client closes it. Instead it waits for five seconds
of inactivity before removing.
Given a setup with low file limits and clients opening and
closing a lot of keep-alive connections, it's possible for
osrm-routed to run out of file descriptors whilst it waits for
the clean-up to trigger.
Furthermore, this causes the connection acceptor loop to exit.
Even after the old connections are cleaned up, new ones
will not be created. Any new requests will block until the
server is restarted.
This commit improves the situation by:
- Immediately closing connections on error. This includes EOF errors
indicating that the client has closed the connection. This releases
resources early (including the open file) and doesn't wait for the
timer.
- Log when the acceptor loop exits. Whilst this means the behaviour
can still occur for reasons other than too many open files,
we will at least have visibility of the cause and can investigate further.
In newer versions of cmake, FindBoost uses Imported Targets for library
component variables, rather than file paths to the Boost libraries.
cmake uses these targets when linking (e.g. target_link_library) and
knows how to correctly substitute the values. However, the OSRM
pkg-config file that we generate doesn't do this, and ends up writing
the actual target symbols, hence the errors trying to link Boost::<component>.
To fix this for newer cmake versions, we create an intermediate configure step
that references the linker files for the imported targets. This is followed
by a generate step that performs the correct substitution.
See this thread for more details: https://cmake.org/pipermail/cmake/2018-December/068812.html
This is backwards compatible to the existing min cmake version (3.1).
However, building using cmake 3.1 fails with a package.json parsing error,
so this commit also bumps the min version to 3.2.
Duplicate restriction nodes in the edge-based-graph are currently
not in included in a mapping (.osrm.cnbg_to_ebg) from
node-based-graph edges to edge-based-graph nodes.
This mapping is used by the MLD partitioner to assign EBG nodes
to partitions.
The omission from the mapping means all restriction nodes are
included in a special 'invalid' partition. This special partition
will break the geolocation properties of the multi-level hierarchy.
The partition and its super levels will have a large number of
border nodes and very few internal paths between them.
Given the partitioner is the only consumer of the mapping, we fix
the issue by including the duplicate restriction nodes in the mapping,
so that they are correctly assigned to a partition.
This has measurable improvement on MLD routing.
For a country-sized routing network, the fix reduces routing and table
request computation time by ~2% and ~6% respectively.
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.
* Handle maxspeed tags before surface and smoothness tags
Let's say we have a tertiary road with the following tags:
highway=tertiary
maxspeed=60
surface=gravel
smoothness=intermediate
While the maxspeed tag tells us the legal speed limit, the surface and
smoothness tags have much more effect on the real-world speed of a car.
We should process the maxspeed tags first, and then update the road's
forwards/backwards speeds according to any surface and smoothness tags.
For our hypothetical road the process in the car.lua profile now goes
like this:
1. Get default speed from profile (tertiary = 40 on line 150 of car.lua)
2. Change speed to 60 using maxspeed tag (WayHandlers.maxspeed function
in way_handlers.lua, lines 434-447)
3. Change speed to 40 using surface tag (WayHandlers.surface function
in way_handlers.lua, lines 360-363)
4. Check speed according to smoothness tag --- but because it's higher
than the speed according to the surface tag, leave the speed
unchanged (WayHandlers.surface function again, lines 368-371)
<ec36319232/profiles/car.lua (L150)>
<ec36319232/profiles/lib/way_handlers.lua (L354-L372)>
Note in step 3 above the speed's only changed from 60kph to 40kph
because it's a lower value. If the surface speed was higher than than
the previous value, the speed would remain unchanged. Another example:
highway=tertiary
maxspeed=60
surface=compacted
smoothness=intermediate
Here, although the profile's speed for compacted is 80, it would stay at
the lower value of 60 (see way_handlers.lua, lines 360-363).
<ec36319232/profiles/lib/way_handlers.lua (L360-L363)>
* Use Github Releases for hosting node binaries
Replaces S3 hosting of node binaries with Github Releases.
`node-pre-gyp publish` works exclusively with S3, so upload step
is now performed by the Travis deployment provider.
The behaviour for the package user should not change.
When building a new version tag, Travis will create a release for the
tag if it does not already exist.
* Switch to the osrm-release-automation machine account rather than personal credentials.
Co-authored-by: Daniel Patterson <danpat@danpat.net>
OSM node 2^33 was created in early April 2021. This and all
subsequently created IDs will be overflowing OSRM node storage
which only support 33 bit IDs.
Bump the number of bits to 34 to double node ID capacity. This
is a breaking change to the data format as it alters the layout
of .osrm.nbg_nodes.
When using process memory, MLD cell metrics are loaded twice from
.osrm.cell_metrics - once when loading static data, and again when
loading updatable data. The former appears to be the mistake,
as .osrm.cell_metrics is only listed in `GetUpdatableFiles`.
OSM data contains many mistakes that tag kerbs as highway barriers
when instead they are only describing highway crossings.
This PR updates the default car profile to handle these mistakes
and unblock routing on the affected highways.
Bundling node-pre-gyp was only needed for node v4 and earlier.
Remove it to avoid errors like:
> npm ERR! enoent ENOENT: no such file or directory, rename '/home/circleci/project/node_modules/node_or_tools/node_modules/abbrev' -> '/home/circleci/project/node_modules/node_or_tools/node_modules/.abbrev.DELETE'
More context: https://github.com/mapbox/node-pre-gyp/issues/260#issuecomment-407222286
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.
When using non-default constructors for the API parameter classes,
vector arguments like coordinates and hints are copied at least once
(twice when passed as lvalue arguments).
Enable perfect forwarding of BaseParameter arguments and
pass-by-value in the constructor that uses the argument. This
ensures we copy at most once (zero for rvalue arguments).
Regardless of any copy elision on the returned pair value, the
duration and distance results are always copied.
Fix this by passing rvalue references to std::make_pair.
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.
* Use Nan:: getters and setters for node 12/14 compatibility
* Drop support for publishing node 8 bindings, add publishing support for node 12, 14
Co-authored-by: Daniel Patterson <danpat@danpat.net>
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.
For very large graphs, generation of MLD level masks fail on Windows
due to bit shift overflow of unsigned long values.
Correct by using unsigned long long literals, which are 64 bit on
all major systems.
In situations where there is not a valid source or target phantom
node (e.g. when snapping to an edge with a zero weight), a
heap assertion will fail in the MLD alternative search code.
We fix this by checking for empty heaps before proceeding with
the search.
Fixes#5788
Table queries where source and destination are phantom nodes
on the same one-way segment can fail to find valid routes.
This is due to a bug in the MLD table generation for the
special case where the query can be simplified to a
one-to-many search.
If the destination is before the source on the one-way segment,
it will fail to find a route.
We fix this case by not marking the node as visited at the start,
so that valid paths to this node can be found later in the search.
We also remove redundant initialization for the source
node as the same actions are performed by a search step.
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.
Replaces references to
`include/extractor/guidance/road_classification.hpp` with
`include/extractor/road_classification.hpp`.
The latter is included in the project.
The query if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug) only works if you call CMake explicitly with the build configuration Debug. But if you generate Debug and Release all libraries are linked to the release version.
In Lua 5.4 the function lua_resume now has an extra parameter. This out parameter returns the number of values on the top of the stack that were yielded or returned by the coroutine (in previous versions, those values were the entire stack.). The constant LUA_ERRGCMM was removed. Errors in finalizers are never propagated; instead, they generate a warning.
After run `lua5.1 profiles/debug_example.lua`, I got result:
```
lua5.1: debug_example.lua:41: attempt to call field 'way_function' (a nil value)
stack traceback:
debug_example.lua:41: in main chunk
[C]: ?
```
This is because Debug has not way_function in the module. This changes
change it to process_way and it's works!!
In the case of a shared object compilation, the resulting binaries need
that library. It was not installed along the others, leading to failures
when running osrm-extract.
Fixes#5603
It actually makes no sence, as the only output on the 'Nearest' service
is a list of wypoints. On the other hand it can be used now as a simple
health check.
* Replaced Response union with nullable fields
* "Ok" code replaced with a boolean and a separate structure for a error code and message.
* Inlined geometry, thus removing one layer of indirection.
Same as for Route service, you can now specify either json or flatbuffers
as output format for the other services (except Tile service, where it
makes no sense).
In file included from /home/travis/build/Project-OSRM/osrm-backend/include/storage/shared_data_index.hpp:4,
from /home/travis/build/Project-OSRM/osrm-backend/include/engine/datafacade/contiguous_block_allocator.hpp:4,
from /home/travis/build/Project-OSRM/osrm-backend/include/engine/datafacade/contiguous_internalmem_datafacade.hpp:5,
from /home/travis/build/Project-OSRM/osrm-backend/include/engine/plugins/nearest.hpp:5,
from /home/travis/build/Project-OSRM/osrm-backend/src/engine/plugins/nearest.cpp:1:
/home/travis/build/Project-OSRM/osrm-backend/include/storage/shared_datatype.hpp:102:26: warning: inline function ‘virtual void* osrm::storage::BaseDataLayout::GetBlockPtr(void*, const string&) const’ used but never defined
virtual inline void *GetBlockPtr(void *base_ptr, const std::string &name) const = 0;
osrm-backend/src/storage/io_config.cpp:18:89: error: call of overloaded ‘is_regular_file(<brace-enclosed initializer list>)’ is ambiguous
if (!boost::filesystem::is_regular_file({base_path.string() + fileName.string()}))
^
In file included from /usr/local/include/boost/filesystem.hpp:17,
from /home/premy/packages/osrm-backend/include/storage/io_config.hpp:8,
from /home/premy/packages/osrm-backend/src/storage/io_config.cpp:1:
/usr/local/include/boost/filesystem/operations.hpp:473:8: note: candidate: ‘bool boost::filesystem::is_regular_file(const boost::filesystem::path&)’
bool is_regular_file(const path& p) {return is_regular_file(detail::status(p));}
^~~~~~~~~~~~~~~
In file included from /usr/local/include/boost/filesystem.hpp:17,
* In Belgium the maximum speed in rural areas is 70 in the region Flanders
* parse maxspeed using source:maxspeed and maxspeed:type tags
* add changelog
* make maxspeed:advisory more important than maxspeed
* add test for source:maxspeed
Upgrades the build environment to Node 10, which let's us pull down some security fixes in package dependencies that were unfixed in Node 4.
Also removes Node 4 and 6 binary publishing which were almost never used (20 downloads out of 50,000).
Fixes https://github.com/Project-OSRM/osrm-backend/issues/5312
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.
* Revert "Remove estimated_cells value in the response."
This reverts commit 364e35af06.
* Update changelog.
* fix linting
* adjust fallback_speed check
* change [].includes to [].indexOf !== -1 for compatibility with node 4
* change param name
* more cuke tests
* fix formatting
* 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
* Prepare RC.1
* Bump version.
* remove destination/sources length <= coordinates length check (#5289)
* Add node 10 builds to travis (#5246)
* Add node 10 builds to travis
* Add changelog
* bump version to rc5
* Fix fallback_speed vector access (#5291)
* add failing cuke test
* correctly access durations vector
* changelog
* one more cuke test
* bump rc version
* 5.20.0
* remove line from changelog about commit that isn't actually in here
* update CHANGELOG and osrm version in package.json for v5.20.0
* bump to restart appveyor
* Revert "Update changelog"
This reverts commit 9b779c704f.
* Revert "Fix formating"
This reverts commit 5bd7d04fe3.
* Revert "Fix bug in computation of distance offset for phantom node"
This reverts commit 0f78f7b2cc.
* Revert "Adjust text cases for flightly different matching due to rounding"
This reverts commit 8473be69d2.
* Revert "Round network distance to deci-meter to retain previous behavior"
This reverts commit c0124f7d77.
* Revert "Preserve heap state in map matching"
This reverts commit b630b4e32a.
* Revert "Use distance functions from many to many"
This reverts commit 89fabc1b9c.
* Revert "Use FCC algorithm for map matching distance calculation"
This reverts commit a649a8a5cf.
As I mentioned in the issue #5156, I met below issue on my Win10+WSL(Ubuntu) env:
The remote debugger (VSCode on Win10, gdb on Ubuntu 18.04 LTS) works well from the beginning of the main() function. But when I step over the code pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask); (src/tools/routed.cpp(289)), below breakpoints can not work and displayed unverified breakpoint.
Then I found that gdb breakpoint need at least SIGTRAP, SIGSTOP to work (Please refer to [how debugger works](http://www.alexonlinux.com/how-debugger-works) for more details), but all signals are blocked in the source code until server initialized done.
In my understanding, block all signals DO NOT make sense for this osrm-routed process. Only several signals (SIGINT, SIGQUIT, SIGTERM) are expected to wait. So I made the change and it works well for me then.
* fix incorrect parameter parsing for node osrm and add tests
* fix boost spirit grammar parsing for annotations
* return NotImplemented when distance annotation is requested for MLD in table plugin
* update docs
d2c1d872b Release v2.14.0
9c9aedd50 Update embedded catch.hpp to version 1.12.1.
f94e70d32 Change comment on namespace closing brace to make clang-tidy happy.
ad9f03afc Prefer prefix increment operator.
a141b9c0c Update change log.
363fc7a15 Add more XML tests.
303a3090f Refactor XML tests.
a1ee5dd56 Make util namespace inline.
6f1709a83 Cleanup progress bar code.
1b02b65e0 Use Location setters taking a string in osmium_tiles example.
7ffdc7618 Disable clang-tidy warning.
882631085 Better implementation of str_to_int.
4cbf53725 Fix another bitwise op on signed integer.
903bfac9d Disable clang-tidy warning.
01de3f518 Don't change location if set_lon() or set_lat() functions throw.
9a27e899d Fix bitwise operation on signed integer.
61650224f Disable some clang-tidy warnings.
9dfa8437e Provide a way to better mock the getenv function in tests.
ae2c172a2 Explicitly set integer type for integers in test code.
878850068 Simpler implementation. We don't need to look at errno at all.
8f9b886f5 Formatting
cf4760cb0 Use bit operations on unsigned where possible.
c7cb4cde8 No conversion needed later if we declare it this way.
01357a540 Add missing inline for free function.
3feef81ee Disable clang-tidy warning in place we can't do anything about.
bf083b8ee Avoid binary bitwise operations on signed integers.
f70b1c803 Move content of osmium::util::detail namespace into osmium::detail.
caf2f0033 Remove use of atoi and atol from code.
f564cef07 Formatting.
f0885fc73 Disable travis build with sanitizers.
858c58444 Use explicit asserts and then casts, not static_cast_with_assert.
a613b1b0a Disable clang-tidy warning.
50e327677 Always build and run data tests on travis.
20d7a09b0 Update submodule to add more XML tests.
6c8f652bf Merge pull request #250 from Nakaner/object-comparison-without-timestamp
38ea437c0 Make XML parser more strict.
7788f5108 Remove object_order_type_id_reverse_version_without_timestamp
fe2223d25 Ignore timestamps if only one object has a valid timestamp
a4515161a Code cleanup.
eb5ea1a0e Use explicit conversions.
105905c45 Only disable warning on non-MSVC compilers.
80fc1b35d Change the way IDs are parsed from strings.
78aedf91e More tests for StringMatcher and disable a clang-tidy warning.
644a00752 Move catch.hpp into its own directory.
19842756c Update to newest osm-testdata submodule.
0402f64d7 Fix the problem with "git submodule" in appveyor.
ec4095d32 Cleanup metadata_options code.
d7390741e Add static_cast to avoid conversion warning.
dd16be1c3 Remove else after throw.
ef4d618de Remove unused variable.
0fdb58d13 Check out submodule in appveyor builds.
6406282d3 Merge pull request #248 from Nakaner/metadata-options-more
eb138a902 make clang < 3.9 work
e703b0d1d make sections their own independent test cases
f68888006 detect_available_metadata must be inline
b53224588 move metadata_options into osmium namespace
edd363cfa make const what could be const
302a485e5 remove unnecessary include, add missing include
93a76e07e give osmium::io::metadata_from_object a better name
91dfbc427 update documentation
453cd6395 replace REQUIRE(!foo) by REQUIRE_FALSE(foo)
247c3b021 replace friend function by setter methods
0a62e589c performance improvement: check first character instead using std::strlen()
73568bbff move ctor of metadata_options which taks an OSMObject out of class
1879c9e47 restore metadata_options::to_string
71a303608 add more unit tests for osmium::io::metadata_options
843cdc89c replace osmium::io::metdata_options::to_string fully by operator<<
6402a8793 Fix bug in code which determines if an OSM object has a valid user.
a6d8143ae Move metadata_options out of "detail" subnamespace
61e32df10 add metadata_options::operator|=
d5f7cc0ab Use newest osm-testdata submodule.
31e34f10c add operator&=, operator<< and a to_string method to metadata_options
77d507172 Formatting fixes.
1c38b2a61 Update some URLs. Use https where possible.
10066cb3e Merge pull request #247 from Nakaner/issue-245
3c938ce82 Allow version=-1 and changeset=-1 for PBF input.
9a542c133 Add ReaderWithProgressBar class.
49839a1ce Replace strftime by our own implementation.
b32b90942 Update osm-testdata version used.
f88b6e548 Add more tests.
cb7e778f6 Handle NULL geometries in test cases.
1961a9c95 Clean up some test cases.
d7f45e071 Update osm-testdata submodule.
73a2ef18f Remove check for lost ways in multipolygon assembler.
1244e498a Update submodule also in msys2 build.
229fc2453 Revert "Make util namespace inline."
9f942d2e9 Revert "Add inline declaration to one util namespace we forgot."
40d4835ea Really fix appveyor build (I hope).
5ae071135 Add inline declaration to one util namespace we forgot.
e0916257c Clean up debug message.
2ddc474cc Make util namespace inline.
4b4e25f87 Travis config: Do not install clang-tidy, we are not using it.
5a608fba1 Fix travis build.
a075cc323 Fix appveyor build.
41ee9920b Add submodule with osm-testdata repository.
4d42245c0 Revert "Add clang-tidy build to travis."
9df355b64 Fix issue on some compilers.
c8a3c00d6 Add clang-tidy build to travis.
2fc80ad17 Fixed clang-tidy config file order.
2adf05267 Fix various clang-tidy warnings
1dca92459 Use the right syntax to override clang-tidy settings in the code.
25baecb46 Fix some issues found by clang-tidy.
54a8de6c0 Disable more clang-tidy tests.
de46d562e Also look for clang-tidy-6.0 in CMake config.
2172553d8 Add build with sanitizers on travis.
7e4e45562 Add object comparators ignoring the timestamp.
92fb231a1 Fix test code.
e541df0fc Cleanup test code.
5640269da Add comment in appveyor script about unusual parameter.
acb872376 Workaround for failing appveyor MSYS2 build.
0634bcf70 Set default value for m_file_size member.
3a2fe5781 Set default values on output options.
43d289fda Make metadata_options constructor explicit.
6e54992b4 Update change log.
e54b955cf Update included `catch.hpp` to version 1.12.0.
e50b40d53 Update copyright date.
0d8b401b6 Merge branch 'metadata'
c7da3a3b6 Remove superfluous has_visibles boolean.
7f74d33d3 Some cleanups of metadata code and fixes test.
5b3c34990 Output XML attributes uid and user independently of each other.
384167334 Merge pull request #243 from Nakaner/metadata_other
733f1916c Change path of nuget installs in appveyor config.
e48672999 Debug output from FindOsmium.cmake script is better formatted now.
79663be5d Change appveyor scripts to work without deprecated prebuilt libs.
443f7a9e4 Remove dependency on (win)getopt completely.
c133b8b14 Fix osmium_convert: Long options with = syntax.
b55daf00a Remove dependency on (win)getopt from area_test and convert examples.
92f7275a9 output visibility directly after the object ID in debug format
a771279f0 deprecate format option pbf_add_metadata
18e3f6005 The value "no" should be treated as "none" by metadata_options
c8b0b2e28 re-assign metadata_options instead of calling a public method of it
15bc4a200 Add more flexible metadata handling to PBF output
b085632b7 add more flexible metadata handling to OPL and debug output
a12c65974 Remove now wrong check.
767ad883a Allow PBF DenseNodes with only some attributes to be read.
fd5a7eb6c More flexible metadata encoding in OSM files.
d16c18581 Add instructions for bug reporting.
db52591ab Use __COUNTER__ instead of name for internal dummy name.
89e634dfc Cleanup.
931ec30ca Marks some false positives for clang-tidy google-runtime-int warning.
b59ef02a2 More rule of zero/rule of five fixes.
1b72b3386 Pass by value and use std::move.
b7d7017cc Handle some clang-tidy google-runtime-int warnings.
c043ca016 Fix special functions.
41d9f0795 Use fixed sized ints where possible.
0899a66a7 Revert some changes older compilers don't like.
41e05989a Fix several rule of zero/rule of five issues.
4e78a828f Various fixes based on clang-tidy reports.
636bda372 Default initialize arrays.
466e5aa6a Handle various clang-tidy warnings.
9f47aa07d Disable clang-tidy misc-forwarding-reference-overload warning.
5e97bf29f Mark Reader and Writer non-movable.
3a2221b27 Add minimal tests for thread-safe queue class.
affdeed6f Add some tests.
5ed055d50 Handle some warnings regarding "explicit".
b9d4c9bf5 Disable clang-tidy cert-err58-cpp warning.
254c25349 Make ADL work for begin()/end() of InputIterator<Reader>.
b64cb32ae Disable clang-tidy android-cloexec-* warnings.
6d6934ffc Fix various warnings reported by clang-tidy.
30dcabaed Another travis build fix.
88c59e669 Fix travis build.
2facb461f Fix travis and appveyor builds.
bba631a51 Remove protozero from repository.
aebe4a914 Use pass by value and std::move in some constructors.
c8c24c8fd Name unused parameters in comments.
9c2e321f9 Make deleted special functions public.
265c16284 Fix some problems with older compilers.
174e95211 Modernize class initialization code for some classes.
4e3e584f8 Disable more clang-tidy warnings.
6b53981bb Fix some class initializations.
fe1405ef8 Add/remove special functions for some classes.
c6dd930d9 Disable cppcoreguidelines-pro-type-static-cast-downcast warning.
0d09210ec Disable misc-unused-parameters warning in clang-tidy.
1dbc43112 Refactor to avoid misc-suspicious-string-compare clang-tidy warning.
91262cc86 Merge pull request #232 from worace/wkt-geojson-polygons
438076b09 Cleanup: Avoid else after return/break.
e0368e92c Disable modernize-raw-string-literal and hicpp-no-assembler check.
c822888fc Mark C style cast in macro from a library as NOLINT.
662d4a641 Moving a TypedMemoryMapping is noexcept.
aec1c4526 Use auto (clang-tidy check modernize-use-auto).
64857589d Consistent include order.
d1ce8de00 Disable hicpp-invalid-access-moved clang-tidy check.
0d3902420 Refactor test without SECTION.
32e9e9e1e Rewrite test avoiding nested sections.
eeb532902 Reorder includes according to best practice.
249e7b553 Revert "Add build with sanitizers to travis."
362cb419a Set CC env var in travis config.
9f520eca3 Add build with sanitizers to travis.
cfc18fef0 Travis config cleanup.
212c6cd42 Remove tests that triggers undefined behaviour in the std lib.
f30985884 Bugfix: Avoid undefined behaviour.
90191619a Make test work even if unused memory isn't returned to OS.
876867e68 Make older compilers happy.
925d1a797 Add names for unused parameters.
014b3a056 Avoid repeating the return type from the declaration
c4e705f92 Disable hicpp-invalid-access-moved clang-tidy warnings.
8c03b3827 Disable some warnings.
c49962ffe Refactor test to avoid spurious use-after-move warning.
04a0afbba Sort includes.
2aaab9a89 Use auto where possible.
e2d84109b More changes for old compilers.
5364ca2a8 Changes for old compilers.
098fc1fa2 Move initializations of class members to the declaration.
eea463026 Fix buffer overflow in o5m parser.
5dc74f2d5 Remove check from static cast (and document why).
7a2dfdcdc Add NOLINT for using namespace osmium::builder::attr.
01fa05f1e Clang-tidy config cleanup.
5e8f8df3f Order includes.
6b78d9b24 Various small fixes for problems detected by clang-tidy.
b815f71b7 Fix gdal check in CMake config.
d47487093 Fix integer type error.
dec9de9ec Bugfix: Throw if elemens in XML file are nested too deep.
85e37723b Various small cleanups.
5f40d726a Additional checks in o5m parser.
b59b4b6a6 Check before static cast and throw.
e57b15700 Disable compiling some header files if gdal lib is not available.
1d3056646 Better checking that PBF data is in range.
c586521d3 Add some consts to the code.
df17e8189 Trying to get the types right...
8e9b759e0 Check read and write system call for EINTR.
28c676054 Rename license file so that Github finds it.
be29e9a52 Remove duplicate space character.
36c14136f Update protozero to newest version (1.6.0).
a19181998 Make libosmium work with different protozero versions.
5c5d9fb36 Use tag and type from protozero to make PBF parser more robust.
03f894400 Add repology.org badge to README.md.
1840739dd Merge pull request #234 from AMDmi3/patch-1
d8e737196 Add support for DragonFly BSD
8de181c8d Revert "Return const object from postfix ++ operator."
0dfb1d649 Add polygon implementation for WKT and GeoJSON Geometry Factories
150e05aea Fix indentation.
6fdee974a Merge pull request #229 from alex85k/no-winsock
f302f08ce Merge pull request #228 from alex85k/fix-test-win
bfb60c888 remove ws2_32 from needed libraries
ef187851c no winsock2 on windows: replace htonl with protozero::detail::byteswap_inplace
9343f8453 Fix testdata-multipolygon test on Windows (executable path differs)
381cf9272 Do not return const from postfix increment operator.
46ec985e9 Add const version of OutputIterator::operator*.
c67de374f Disable clang-tidy test for const params.
f5eda165f Make functions noexcept and return const value from post increment op.
1e4e3160f Use {} when calling constructors. Use .empty() to check empty strings.
8893d16be Mark some tests using size() with NOLINT.
f8a74a8aa Make functions noexcept.
45c1e072c Use REQUIRE_FALSE(...) instead of REQUIRE(!...) for readability.
fc173dae7 Merge pull request #227 from alex85k/msys2-appveor
0a281c064 Add MSYS2 building to Appveyor
c93f73120 fix FindGem for Windows Ruby distributions
8bf6702b3 Merge pull request #226 from alex85k/master
e8dad731d gmtime_s should be used on both MSVC and GCC from MinGW64
d0d98e9c1 remove "osmium::util::MemoryMapping::" from class body
6830ee9bd ftruncate is not available only on MSVC (MinGW has it)
c0597584f Disable some clang-tidy checks.
578db8e4a Use empty() instead of size() or == "" to check for empty collections.
53c8f3a21 Return const object from postfix ++ operator.
bd5e4d109 Use emplace_back() instead of push_back().
0a0a4f24c Use correct C++ header.
35226ea86 Remove unused move.
df843a9cf Fix header guard.
759e76131 Avoid default argument on virtual function.
db4f1bdb9 Update included catch.hpp to version 1.10.0.
59e70e5c6 Pass constructor arguments by value and std::move() into members.
ee9b598ed Add tests for thread_handler.
ac661209a CMake config: Update list of clang-tidy versions we look for.
d7281215c Add comment to unusual code.
cbb4c09fb Split up some overlong test functions.
9870a6b90 Fix noexcept specification.
5e27c37d0 Use array instead of map to store input/output format creators.
987d12922 Mark some constructors noexcept.
17f4d8b7e Avoid static variable only needed as constant value.
fe705cef0 Avoid else after return in several cases.
d4a85878e Beautifying travis config.
f07d1e375 Make some special functions noexcept.
4bb0f7f22 Do not declare special functions on some classes.
bc6c5943d Disable some clang-tidy checks that produce false positives.
6b6598a5b Remove superfluous std::move() of POD type.
71c3f5e16 Make some special functions noexcept.
1cb32778c Remove explicit true/false in tests.
929ba89cf Always catch by const ref.
a9a255820 Code readability: No else clause after return.
f14364bd3 Code formatting fixes.
f41feb6a5 Simplify code.
727f6eff4 Mark dummy includes for IWYU.
72d20f835 Switch travis build to 'trusty'.
c480e6808 Do not run gcov from codecov script.
d16c6e90a Clean up lambda captures in xml_input_format.hpp.
git-subtree-dir: third_party/libosmium
git-subtree-split: d2c1d872bc915d9579350007383ce1ebfea3665f
For the MLD algorithm we can partition the NodeID range into boundary
and non-boundary nodes. Since there are only we boundary nodes we can
use the ArrayStorage for those yielding much faster query times.
* Added post process logic to collapse segregated turn instructions
* format updates
* Fixed coordinates to reflect reality
Updated left turn road name
* fixed coordinates to fix test
* Skip last step when processing segregated steps
* updated segregated turn test
* Updated segregated test
* Updated test: Segregated Intersection, Cross Belonging to Correct Street - features/guidance/collapse.feature:79
* Fixed all but one for features/guidance/collapse.feature:124
* Fixed Scenario: Partly Segregated Intersection, Two Segregated Roads, Intersection belongs to Second - features/guidance/collapse.feature:219
* Fixed 7 of th 9 failures for Scenario: Partly Segregated Intersection, Two Segregated Roads, Intersection belongs to Second - features/guidance/collapse.feature:219
* Fixed 7 of the 9 failures for Scenario: Segregated Intersection, Cross Belonging to Mixed Streets - Slight Angles (2) - features/guidance/collapse.feature:318
* Fixed Scenario: Segregated Intersection into Slight Turn - features/guidance/collapse.feature:581
* Updated Scenario: U-turn after a traffic light - features/guidance/turn-lanes.feature:1220
* Updated how we combine segregated steps
* Added test to Verify end of road left turn across divided roads
* Fixed divided highwat tests
* Fixed test failure
* fixed Scenario: Partitioned turn, Slight Curve - maxspeed - features/guidance/turn-lanes.feature:936
* Fixed Scenario: Partitioned turn, Slight Curve - features/guidance/turn-lanes.feature:961
* Added strategies to combine segrgated intersections
* Added setModifier alias for readability
* Added strategies to combine segrgated intersections
* Format updates
* Fixes segregated indentification to not mark `circular` edge as segregated
* Added intersection prior to turn so we still call out end of road
* updated expectation to be turn instead of continue
* Confirmed with @oxidase that the lane information if correct - updated the expectation
* Added logic to handle wider straights
Fixed tests
* Update CHANGELOG.md
Added #4925
* Removed TODO
* Process straight step prior to wider straight step
* upgrade to api version 4
* set bike pushing speed to 4km/h and add mode change penalty
* set cycleways for two-way and one-way roads according correctly
* add changelog
* adjust tests according to change of the walking speed
* adjust tests according to new behaviour of opposite, track and lane in one-ways
* refactor the cycleway identification
* comment to understand weird counterintuitive testcase
* adjust sliproad test because walking speed is now slower
* Initial internal intersection updates
paired with @oxidase and @kdiluca
TODO fix tests and add in new ones
* Added Internal Intersection Model
* removed debug info
* updates per PR 4845
* fixing build errors
* fixing all compile errors
* fixed EdgeID param
* Added is_internal_straight lambda
Added/Updated constexpr names and values
* added rejection case turn degree logic
* debug logging
* added turn angle logic to reject if there are incoming edges that have opposite turn degrees than outgoing edges or if the outgoing edges have opposing turn degrees; also merged with master v5.16
* fixed formatting
* fix to decrease tile size based on latest turn angle internal intersection updates
* Removed breaks
Breaks in code were a mistake and caused a change in the internal intersection identification.
* Update segregated_intersection_classification.cpp
* Update CHANGELOG.md
Added CHANGED #4845: Updated segregated intersection identification to Unreleased
Some compilers (eg. MSVC) still require inclusion of <ciso646>
in order to import named operator keywords.
It is easier to stick with traditional punctuators.
Make entry points of individual pipeline stages responsible for
configuring the task scheduler with requested number of threads
passed in corresponding configuration bundle (ie. follow extractor).
Rename module partition to partitioner.
This cultivates naming used in existing modules like extractor,
customizer, etc. - noun vs verb (word partition is both though).
* 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
As a form of smoothing we use the previous speed value instead.
This makes sense because the zero duration segments have to be very
short, potentially also zero length.
Pool instance has been removed from Reader ctor parameters
list in PR #4438, presumably unintentionally.
It is required to prevent potential deadlock during
Pool shutdown as explained in PR #4452.
For intersection at https://www.openstreetmap.org/node/65299217
`are_parallel` in MergableRoadDetector::HaveSameDirection is false
for South Van Ness Avenue with 150 meters
When doing the new Lua version refactor we changed the expectation to
use `continue uturn` instead of making a whole circle in the roundabout
as the original test case. This was only the shortest path since there
was no roundabout penalty.
- separates node-based graph creation and compression from edge-based graph creation
- moves usage of edge-based node data-container to pre-processing as well, unifying access to node-based data
- single struct instead of separate vectors for annotation data in engine (single place of modification)
There is no possibility until multiple-weights are implemented
to break tie in the contraction and the direct shortest path plugin
as duration is not computed during contraction.
This must be fixed after multiple-weights implementation
by using `std::tie(weight, duration)` pairs everywhere.
Advantages:
* Allows to use Pool configured with user-preferred number of threads.
* If libosmium used in a shared library, this helps to prevent potential
deadlock during Pool shutdown at (after) shared library unloading.
See https://github.com/osmcode/libosmium/pull/214
Requires libosmium 2.13.0
Default-constructed objects of (boost::heap) handle_type are singular,
including the wrapped handle_type::iterator.
Apparently, MSVC iterator debug facilities strictly require that
one singular instance is compared to another singular instance.
It is not possible to get check-comparabe iterators of non-singular
and singular instances as owning container will always mismatch.
This reverts commit 4686272f87.
Unfortunately, this doesn't work alongside `node-pre-gyp` - in fresh installs, the binary
files are not yet downloaded when npm tries to create symlinks, leading to an error.
- refactor conditional restriction handling to not use external data (first OSM nodes on ways)
- BREAKING: changes internal file format of osrm.restrictions
- add support for general conditional penalties based on edge-based nodes (requires unique edges between nodes)
Unify CMAKE_CXX_COMPILER_ID tests without quoting/bracketing
the variable to use implicit expansion.
Replace STREQUAL with MATCHES to avoid policy warning about
attempt to expand "MSVC" variable, where it literal is intended.
If Visual C++ _ITERATOR_DEBUG_LEVEL > 0, then
accessing std::array<char[N], M> elements via reference to const
causes compilation error:
...\msvc\14.10.25017\include\array(181): error C2440: 'return': cannot convert from 'const char *' to 'const char (&)[256]'
Alternative workaround is to remove const qualifier from the GetClassName method.
Makes turn restrictions into dedicated structures and diferentiates between them via a variant.
Ensures that we do not accidentally mess up ID types within our application.
In addition this improves the restriction performance by only parsing all edges
once at the cost of (at the time of writing) 22MB in terms of main memory usage.
The viaroute plugin always expects a route to be there potentially
with invalid edge weight to represent no-route-found. By switching
to the many-route-result for the mld alternatives algorithm we might
return an empty many-route-result invalidating the post-condition.
9fd2348c6 Release v2.11.3
ed708286e Fix namespace.
835df8a7f Fix multipolygon assembler.
0979ab529 Fix areas assembler algorithm.
801f84c62 Bugfix: Invalid use of iterators.
f85653820 Read OPL file correctly even if trailing newline in file missing.
a31571c0f Release v2.11.2
a3903b368 Use minimum size of 64 bytes for buffers.
b86bafefe Release v2.11.1
32ebf736c Updated change log.
632ea5198 Bugfix: Call get_creator_function() in main thread.
ddc79eee7 Add test for not correctly handled unsupported_file_format_error.
86197a14f Bugfix: Terminate called on full buffer.
4340be8ad Fix the Filter::count() method.
git-subtree-dir: third_party/libosmium
git-subtree-split: 9fd2348c6956b6e1b930b50850e99eb31207ed50
Building `node-osrm` from source requires nan, node-cmake and
node-pre-gyp npm packages already \*. In order to bootstrap we
bundle these dev packages in the bundle we publish to npm.
\* See `src/nodejs/CMakeLists.txt`
Check `npm pack` - we now expect to see a `node_modules` directory
with nan, node-cmake, and node-pre-gyp already there.
This adds the ability to mark ways with a user-defined
class in the profile. This class information will be included
in the response as property of the RouteStep object.
Add the good default options as recommended by GitHub.
Helps to work around issues when using hybrid environments like
the Bash On Windows (see #4228).
PR uses TBB internal atomic's for atomic CAS on non-atomic data
Corresponding PR https://github.com/Project-OSRM/osrm-backend/pull/4199
Other options:
* use sequential update
* use an internal packed vector lock -> makes packed vector non-movable
* use boost.interprocess atomics implementation -> outdated and only 32 bit version
* use glib atomic's -> requires new dependency
* wait for https://isocpp.org/blog/2014/05/n4013 as_atomic
* use c11 _Atomic and atomic_compare_exchange_weak -> not possible to mix c++11 and c11
* use builtin functions gcc __sync_bool_compare_and_swap and msvc _InterlockedCompareExchange64 -> possible, but requires proper testing
boolean CompareAndSwapPointer(volatile * void * ptr,
void * new_value,
void * old_value) {
if defined(_MSC_VER)
if (InterlockedCompareExchange(ptr, new_value, old_value) == old_value) return false;
else return true;
elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
return __sync_bool_compare_and_swap(ptr, old_value, new_value);
else
error No implementation
endif
}
* use Boost.Atomic -> requires new dependency
WordT local_lower_word = lower_word, new_lower_word;
do
{
new_lower_word = set_lower_value<WordT, T>(local_lower_word,
lower_mask[internal_index.element],
lower_offset[internal_index.element],
value);
} while (!boost::atomics::detail::operations<sizeof(WordT), false>::compare_exchange_weak(
lower_word,
local_lower_word,
new_lower_word,
boost::memory_order_release,
boost::memory_order_relaxed));
- template function for tile functionality with edge finder operator
- refactors unit tests into single function (reduce code duplication)
- adds unit tests for core-ch
The alpha constant is for the local optimality T-Test threshold.
Before we used epsilon for the T-Test threshold, but the epsilon
constant is meant to be used for the stretch test(s) only.
This changeset fixes the local optimality T-Test and uses the
epsilon constant for the two stretch tests:
- We test the stretch for the total route against epsilon and
- We test the detour against the epsilon now, too
We can discuss if the second stretch test should actually use
epsilon, too, or a adapted value of it - but definitly not alpha.
The new numbering uses the partition information
to sort border nodes first to compactify storages
that need access indexed by border node ID.
We also get an optimized cache performance for free
sincr we can also recursively sort the nodes by cell ID.
This implements issue #3779.
- 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>
(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)
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.
* 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
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
```
this allows to keep a single Algorithm template parameter in internal
interfaces as
template <typename Algorithm>
search(SearchEngineData<Algorithm> &,
const datafacade::ContiguousInternalMemoryDataFacade<Algorithm> &, ...)
Does not run the nodejs tests in sanitized builds. We'd have to
export LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libasan.so.2'
the asan lib. But it seems like our Clang from mason does not like the
system's libasan. Also we'd need a suppression file for v8 and node.
for edges with the split flag false and in_backward_direction true
if in_forward_direction is also true backward segments can be incorrectly duplicated
Recent improvements to OSRM have led to a lot of changes to the Lua scripting interface, and refactoring of the default profiles makes them slightly more abstract and difficult to grok for those writing profiles from scratch.
This is therefore an attempt to fully document the attributes that can be read and set from Lua profiles. I've done it from my own understanding and from reading the source, but I may well have missed things or mistaken them!
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!
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|.
Leaving log files opened was intentional to avoid missing output
that can appear `child.on('exit',...)`.
With this approach cucumber tests hit locally maximum number
of opened files, because node.js keeps all log files opened.
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.
By default, ExtractorConfig::requested_num_threads is Zero,
which is an invalid value for tbb task scheduler.
If user does not specify value greater than Zero, then
use tbb::task_scheduler_init::automatic.
Here's all I could get out of a instrumented `osrm-partition`; debug build,
with all the bells and whistles I could think of to make it more verbose:
```
==17928==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1560 byte(s) in 3 object(s) allocated from:
#0 0x7f4244185b30 in operator new[](unsigned long) ../../../../libsanitizer/asan/asan_new_delete.cc:62
#1 0x7f4242a788b3 (/usr/lib/libtbb.so.2+0x208b3)
SUMMARY: AddressSanitizer: 1560 byte(s) leaked in 3 allocation(s).<Paste>
``
Symbolizing the address results in
```
echo "/usr/lib/libtbb.so 0x7f4242a788b3" | llvm-symbolizer
_fini
```
Looks like a crt finalizer => static global dtor "leaking" from tbb.
Which turned out to be a missing `tbb::task_scheduler_init` on our end:
> Using task_scheduler_init is optional in Intel® Threading Building
> Blocks (Intel® TBB) 2.2. By default, Intel TBB 2.2 automatically creates
> a task scheduler the first time that a thread uses task scheduling
> services and destroys it when the last such thread exits.
https://www.threadingbuildingblocks.org/docs/help/hh_goto.htm?index.htm#reference/task_scheduler/task_scheduler_init_cls.html
Without an explicit instanz the first call to a tbb algorithm seem to initialize
a global scheduler singleton which then "leaks" until the program exits.
Phew.
Implements parallel recursion for the partitioner
Fixes osrm-extract's -dump-partition-graph: accept no further tokens
References:
- http://www.boost.org/doc/libs/1_55_0/doc/html/boost/program_options/bool_switch.html
Pulls parameters through to make them configurable from the outside
Defaults are equivalent to:
./osrm-partition \
berlin-latest.osrm \
--max-cell-size 4096 \
--balance 1.2 \
--boundary 0.25 \
--optimizing-cuts 10
Fixes parallel_do call for Intel TBB 4.2 (Trusty): no range-based overload
Extends explanation for recursive bisection ids
Cleans up Bisection State
Removes license boilerplate from partitioner config
Sorts Spatially and picks Sources and Sinks
Uses sets for sources and sinks for now; see how large they will get
Runs n cuts in parallel changing the slope and uses the best
Clarifies balance <-> ratio naming
* Implements Random Access Iterator Facade for EdgeIDIterator
* Makes StaticGraph Node and Edge requirements explicit
* Cleans up Bisection Graph, Node and Edge
* Cleans up GraphView
- moves collapse into a dedicated set of functions / files
- make collapse scenarios distinct (slight performance cost)
- reduce verbosity for short name segments (now actually working, was supposed to do so before)
start assigning turn locations to test / further locations
add locations/make roads not overlapping - staggered
larger grid size for utf tests (new name)
This commit fixes issue #3588 "OSRM uses man_made=bridge lines to
route?" with exclusion of 'brigde' tag analisys from all profiles to
disable routing on bridges countours (with no highway tags)
Quick follow up for https://github.com/Project-OSRM/osrm-backend/pull/3570:
there is no reason not to build the `osrm-components` tool by defualt.
Backwards compatible. Users still specifying the option will see:
> Manually-specified variables were not used by the project:
> BUILD_COMPONENTS
c1f34c4 Release v2.11.0
d3b72e0 Updated change log.
2982b8d Update embedded Protozero to version 1.5.1.
cc1ab2a Add non-const WayNodeList::operator[].
3da372e Add missing example to examples/README.md.
30604ba Add OSMIUM_USE_SLOW_MERCATOR_PROJECTION define.
47a92e0 Clearer CheckOrder handler doc.
f11106d Formatting fixes.
a870737 Use faster implementation of web mercator projection.
041bb42 Test cleanups.
8933bc5 Cleanup *Map::get() functions.
6b989ca Document that (Multipolygon)Collectors only work with unique Ids.
8fb5bd2 Updated included Protozero to version 1.5.0.
76e153d Removed Makefile.
35d7ec9 Update copyright date.
a7f8126 Rename guard define to common scheme.
a923c69 Cleanup I/O tests.
d353993 Add Map::get_noexcept() method for all index maps.
94fa5ac Add const overload for mmap_vector_base::operator[].
3cf9184 Add default constructed "invalid" Coordinates.
358f170 Add Tile constructor from web mercator coordinates.
006aa4c Add index::RelationsMap(Stash|Index) classes.
9cc842e Updated catch to v1.5.9.
bd8c3b6 Use initializer_list trick instead of recursive template.
2c82a6f Merge pull request #183 from daniel-j-h/rvalue-apply
0bf5404 Implements rvalue handler support for apply, resolves#180.
ccaab08 Merge pull request #182 from AMDmi3/freebsd-endianess
bffe626 Handle endianess on FreeBSD properly
7250222 Code formatting and test cleanup.
6652436 Merge pull request #179 from oxidase/add_match_key_std_regex
afadf5b Rename centroid variables and function in example.
8355284 Add envelope() functions to NodeRefList, Way, and Area.
fc83d2e Remove unnecessary include.
9ddd00e Add match_key<std::regex> tag
9c54a53 Update README. Moved some infos to manual.
89a90a6 Update readme and developer docs.
c3446ec Simplify subitem iteration code and made it more flexible.
542b07c Add some static_asserts.
f0fd690 Memory reporting on M68k doesn't work properly.
e8957c6 Compare doubles in test using Approx().
58ae4a6 Add amenity_list example.
53783f8 Fix doxygen config for reproducible builds.
de4e52d Release v2.10.3
0cc42a2 ObjectPointerCollection constructor can't be noexcept.
4472dfb Round out ObjectPointerCollection implementation and test it.
28cb35d Build with XCode 8 and GCC 6 on travis.
03e3e66 Upgrade to new protozero version 1.4.5.
2102c2f Add assertion in queue handling code.
git-subtree-dir: third_party/libosmium
git-subtree-split: c1f34c45507e233a2b9028663906679c610fe179
If originalEdges gets initialized with 1 << 28, it will overflow and
thereby be set to 0.
Which defeats the point of checking for overflows in the first place.
LLVM 3.9.1 is now packaged in mason: https://github.com/mapbox/mason/issues/308
Upgrade our Clang compiler to the latest stable release.
Keeps clang-format at 3.8.1 for consistency.
This disables the `-flto` LTO flag by default since we're seeing
segfaults in compiler lto plugins, binutils and linker errors again and
again for various clang / gcc / binutils combinations.
Pass `-DNEBALE_LTO` to `cmake` in order to re-enable LTO.
LTO situation in short:
- LTO does not work at all for gcc<4.9
- With gcc>=4.9 the "slim" LTO format is getting used dumping IR
- Older binutils need LTO plugins which know how to read this IR
- Recent binutils handle this format all by themselves
- LLVM is more or less the same with some Clang versions segfaulting
If you need the performance benefit of LTO, make sure your compiler and
binutils are up to date and see for yourself if LTO builds work for you.
References:
- https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ
- https://github.com/Project-OSRM/osrm-backend/pull/3481#issuecomment-270618997
- https://github.com/Project-OSRM/osrm-backend/issues/3501
- https://github.com/Project-OSRM/osrm-backend/issues/3441
(and a ton of other LTO tickets if you search for them)
Lane Anticipation currently triggers on quick steps with lanes. This
changeset makes the "quick" part more dynamic by taking lanes left and
right of the turn into account. The reasoning for this is as follows.
The user can drive on the leftmost or rightmost lane and has to cross
all lanes left or right of the turn, respecitvely.
We scale our threshold appropriately, which now means the threshold
describes the duration the user needs for crossing _a single lane_.
Note: this is a heuristic and assumes the worst case. Which in my
opinion is fine to do since triggering Lane Anticipation in complex
scenarios is desirable.
This keep the metadata reader flag disabled by default unless explicitly specified.
Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
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
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
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.
This change fixes two bugs:
1. A dead-lock that occurs between osrm-datastore and libosrm when an
old dataset is free during a data update. This happened because the
mutexes where acquired in a different order.
2. A region is deleted eventhough it is still in use. This happens when
libosrm gets overtaken by osrm-datastore, so the new dataset is in
the same region the old one was.
instead of artificially removing lanes from a roundabout, we don't assing them in the first place.
this also prevents a problem where we would end up collapsing turns with lanes in a roundabout
These kind of roundabouts came up during Lane Handling for roundabouts.
They're called Turbo-roundabouts or Turbine-roundabouts and are very
popular e.g. in Germany and the UK.
Seems like our roundabout handler sometimes is getting confused.
Trying to figure out why, and codifying some scenarios for cucumber.
References:
- https://github.com/Project-OSRM/osrm-backend/pull/2693
removes duplicated includes
removes unused includes
eliminates dedicated toolkits that resulted in circular dependencies
moves functionality close to data, where possible
Usage:
struct MyIntersection : EnableIntersectionOps<MyIntersection> {
};
Done.
We require MyIntersection having at least the member attributes from
IntersectionViewData but don't enforce a inheritance hierarchy.
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.
d5ecf4d Release v2.10.2
7c04564 Update embedded protozero to version 1.4.4.
e209d81 Write code for 64bit systems, so it compiles on 32bit w/o warning.
640217c Fix buffer overflow.
8b4620f Release v2.10.1
38bf3ab Update protozero to 1.4.3.
f81b3c6 Fix IdSet on 32 bit.
5ff4753 Workaround so the test works on 32bit systems.
7542694 Include our endian.hpp before using the endianness test macros.
git-subtree-dir: third_party/libosmium
git-subtree-split: d5ecf4df90e2995c816886d2a002c3d3de7062ee
40c4a48 Release v2.10.0
6addb2e Search for protozero also in the place where libosmium was found.
9c0d4bb Consistently use lhs and rhs as parameter names in operators etc.
6179759 Update change log.
894eb7d Explicitly use size_t to get no narrowing conversions.
e549e73 Fix CMake config for index_lookup.
ccf0bc2 Fix bug where some compilers deduce the wrong type.
fc3507d Cleaned and documented index example and renamed to osmium_index_lookup.
d3c3036 Rename serdump example to dump_internal and document it.
0e9822e Also forward set_uid_from_signed() function.
29ef95c Rename build_taglist function because it was to similar to build_tag_list.
c088dd0 Move static constant out of class so clang will compile it.
606cdc4 Fix CMake build script: Path for finding libosmium.
65f91fe Removed unused typedef.
07174f5 Use condition_variable to tell producer when thread queue is not full.
b35e957 Some code cleanup in XML parser.
c703dff Fix problem with MemberMeta.
1ccbbef Refactoring CompressionFactory.
6561bd6 Use our own exception type for map factory errors.
56e31fa Throw not_found error directly instead of using helper function.
28230c3 Test empty value for node location store, reorganize tests.
2ba316c Reorganize and fix projection tests.
f949485 Don't run quite as many tests with projections because they are slow.
1bad16d Add information about build environment to benchmark output.
99617bb Change proj_geojson benchmark into mercator benchmark.
553b946 Allow optional parameters on Reader in any order.
dcc3d8f Factor out some common code.
004d8cd Fix forwarding constructor.
9702978 Fix metadata check.
6cfb6c4 Faster implementation of decode_dense_nodes without reading metdata.
4ba4638 Add additional read_metadata parameter to other Reader constructors.
d005937 Optionally ignore metadata when reading file.
63961da Mark all CRC32 update functions as noexcept.
cc4ca75 Refactor set_user() function to speed it up.
38d19dc Update comments with file sizes. OSM has grown...
f7d0824 Add new benchmark that shows performance when main thread is busy.
25070dc Use const ref params.
88e8d96 Mark add_user() as deprecated.
f58d9db Refactor some low-level collection code to clean up code.
4680def Add example showing how to create OSM data out of thin air.
d42fd50 Add an example showing how tags in OSM files can be changed.
49bf5bc Add additional constructors to Builders taking a reference to parent.
7b91d63 Change Builder::add_item() to take a reference instead of pointer.
2957e48 Some cleanup of examples.
d0b458d Calculate size of object at compile time.
3fbb6e7 Use explicit cast.
1851f3d Remove a test that depends on math details.
f6a0802 Various cleanups of example programs.
ba4921f Rename add_user() to set_user().
d7637c9 Various cleanups related to builders.
07827bc Fix add_user().
9a5b395 Also refactor OSMObjectBuilder like ChangesetBuilder before.
b1f423c Use call chaining on the builder.
e49473d Get rid of ObjectBuilder class.
67d70b9 Refactor ChangesetBuilder::add_user().
8199c33 Make ChangesetBuilder derive directly from Builder.
61d1b67 Simplify some code.
d38467a Change derivation hierarchy of some builder classes.
b52f8af Refactor Builder code.
d012bfa Refactored some code setting attributes on objects using builder instead.
6a05f60 Also forward set_removed function from builders.
8d63b7d Return *this from Builder setter functions and test it.
72a1266 Update catch.hpp to newest version.
3424a74 Check GEOS version is <= 3.5.
aee9f9d Cleanup test code.
aef198c Improved asserts in Buffer.
a98b9bf Code cleanup in tests.
a150466 Use GDAL/OGR instead of GEOS to test our WKB implementation.
b04a525 Refactor test.
39aa932 Refactored test_factory_with_projection so it works without GEOS.
648f43a Remove unused dependency on geos from tile test.
f1748ae Add setters to Builder classes forwarding to underlying objects.
8166879 In debug mode check that Builders are correctly called and destructed.
1c4257e Call commit() on buffer only after all builders are destructed.
2618636 Add functions to check availability of relation members.
b45a4d9 Mark RelationMember::set_ref() as deprecated.
7886771 Move "basic" and "buffer" tests to "osm" and "memory", respectively.
b664685 Use functions instead of macros in location test for faster compile.
b4929ac Add more tests for number parser.
02662a7 Merge pull request #171 from lonvia/fix-long-exponentials
5344a6c fix parsing of numbers in e-notiation with many post-comma digits
3aeaff3 Add some typedefs to NodeRefList and memory::Collection.
e750665 Add iterators to IdSetSmall and add docs and tests to IdSet classes.
50ecb2a Add more features to IdSetDense, including unset and iterator.
e3dec78 Make IdSet virtual base class with two implementations.
8ea0153 Use C array instead of std::array in IdSet and clear explicitly.
3ba9905 Deprecate osmium::index::BoolVector in favour of new IdSet.
453d1ca Add osmium::index::IdSet.
c78254e Add function to (temporarily) disable the progress bar.
4d88a9f Better document osmium::io::Header class.
320e3af Look for protozero includes in CMake config.
838d25e Allow optional checking for libosmium version number in CMake config.
6ce60c1 Fix entity_bits static_assert() tests.
f054731 Update change log.
77ac4c2 Make sleep duration for full queues much smaller.
7e39c01 Make some entity_bits functions constexpr.
69ea72f Fix ~ operator on entity_bits and more tests for entity bits.
dafe4cf Update embedded Catch unit test header to version 1.5.7.
a41c832 Fixed parsing of location coordinates starting with decimal dot.
6523bae README cosmetics.
229acac Add tests for some examples.
f1e753d Merge pull request #163 from sebastic/executable-not-elf-or-script
ccea2d5 Remove executable bit from .cpp files.
af77fb4 Changelog formatting fixes.
git-subtree-dir: third_party/libosmium
git-subtree-split: 40c4a48f88d25edace6f0b9e079c306308c7760b
58ae447 bump to v0.1.1
c5ef33f rename llvm 4.x to 4.0.0 [skip ci]
5d5d26b add llvm 4.x based sub-packages
9708680 only set LIBCXX_ENABLE_STATIC_ABI_LIBRARY for linux [skip ci]
6918fb0 install LLVMgold.so on linux [skip ci]
ab20ff7 binutils: using 'all-gold' breaks make install on linux [skip ci]
cb8b15f fix binutils install [skip ci]
df77b02 properly set LLVM_BINUTILS_INCDIR value [skip ci]
295d4db binutils gold fixes [skip ci]
ac85676 enable LLVMgold.so for linux [skip ci]
acc4249 add binutils 2.27
16d4452 add lldb and llvm-cov 3.8.1 packages
757b908 remove patching no longer needed [skip ci]
69415b5 better fix for statically linking/linked libc++ with llvm 3.8.1 [skip ci]
43933ed Added mesa-13.0.0-glx (non-CXX11ABI)
2bb81cc Added mesa-13.0.0-glx
d70e3ef LLVM_EXTERNALIZE_DEBUGINFO is osx specific
ba737bf llvm 3.8.1 linux build fixes
4279f58 Updates for mesa 13.0.0
d544278 Revert typo in mason.sh
03ecb2c Add mesa 13.0.0 (Gallium-OSMesa)
0997905 Add expat 2.2.0
f41eb6d mason.cmake: multiple static libs also need to be split
c9fcd1a add lldb to llvm 3.8.1 [skip ci]
6d8e16c minor llvm/clang++ improvements
b2bdb33 Add note that we need to create a github release [skip ci]
git-subtree-dir: third_party/mason
git-subtree-split: 8df14782dda0c2c7314b5c6dba98e9e36a67eedc
# The first commit's message is:
Add support for building against mason-provided deps
# This is the 2nd commit message:
back to just one travis job: linux/release
# This is the 3rd commit message:
remove pkg-config debugging [skip ci]
# This is the 4th commit message:
use clang++ 3.8.1 for mason builds since 3.8 is what we have been using
- 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)
From stxxl FAQ: "you should not share a data structure between
threads (without implementing proper locking yourself)."
The access to name_char_data can be implicitly parallelized
if _GLIBCXX_PARALLEL is defined and invalidate local-thread iterators.
- 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)
Removes CompressedEdges from the extractor and shared data format by
directly serializing vectors of node ID's, forward weights and reverse
weights for each node-based-edge
Refs #2575
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.
* cucumber test scenarios, #3027
* post review comments
* two tests are still failing
* fixed one test
* passing tests
* cleaner code refactor
* possible sceanrios for destination:ref:forward/backward
* added code for direction:ref:forward/backward, tests pass
* changelog
* store direction in variable
* added tags to taginfo
* fixed dumb error
* use boolean flags
* null pointer checks
* hopefully better null pointer checks
This switchtes the data even if there are requests still running on the
old data. osrm-datastore then waits until all of these old requests have
finished before freeing the old regions.
This also means that osrm-datastore will return with an error if there
is a data update currenlty in progress.
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
Technically speaking we're changing the `libosrm` API.
But since we're only lifting restrictions by marking the API threadsafe,
we should be fine here.
80df1d6 Release v2.9.0
110dc5c Update change log.
6ad5829 Better handling of areas with duplicate segments.
f5985ed Better exception message for invalid areas.
fa09300 Explicit cast to make intent clear.
6f9b522 Fix name of struct stat on Windows.
6b0a47b Clean up code in data tests.
aa1226c Fix progress bar.
3663a19 Extend ProgressBar class so that it works with multiple files.
40c4d5a Add version of file_size() taking a file name.
43a2fac Merge pull request #162 from osmcode/windows-build-scripts
cc2305d [skip travis] 1st iteration of new build scripts
7abe4e1 Clean up disk location cache examples.
48841d5 Update change log.
cf854e9 Change timestamp parser.
01aa8c7 Add examples osmium_pub_names and osmium_road_length.
483c9f2 Benchmark code cleanup.
3ffea2d Cleaned up some test code.
80f0ff7 Explicit conversion from int to bool.
0ba5918 Write space after progress bar to defend against glitches in output.
8584423 Change progress bar to take max_size on construction.
d2c7585 Only call gzoffset when compiling with zlib > 1.2.4.
1b417e5 Add support for a progress report in osmium::io::Reader().
3b4c8c8 Minor cleanup of appveyor config.
d787e25 Fix OPL parser: Relation member without role at end of line.
53ca080 Make lots of variables const.
d776ab2 Add to change log.
eec3b62 Properly initialize m_data field.
cc607e1 Take argument by const ref.
be1e346 Remove unused function.
2a356ee Make lots of one-argument constructors explicit.
adca74f Add comments to and cleanup up examples.
381e535 Simplify WKB code.
b49efd8 Fix opl_parse_changeset_id() return type.
bb52e57 Use uint64_t for line count and column to be on the safe side.
243f6a7 Use parentheses to make sure the right precedence is used.
5a7648e Consistently catch by const ref unless var needs to be non-const.
e3be990 Avoid some warnings.
c436d92 Do not include unistd.h on Windows.
95b228c Add dummy function to avoid warnings.
f276ca3 Fixed includes and changelog update.
8c54bd9 Change timestamp error message.
27e1d5c Add OPL parser.
1d2caab Add more includes to osm.hpp to make usual osmium use simpler.
9d88361 More tests for area CRC.
4f8964d Initialize Item::m_diff member on construction.
f2b648b Parse coordinates in scientific notations ourselves.
b01323f More include fixes.
69f39d4 Fix some includes.
156536d Make padded_length a plain function, not a template function.
65cd1dc Extend functions to set Location lon/lat.
98b7b17 Update to protozero 1.4.2.
a6420cf Add diff indicator to items and use for diff opl and debug output.
0ef02a3 Add workaround for YCM.
3a986f4 Update protozero version.
5245c5b Document osmium_count example program and add memory usage output.
796ca13 Document handler class.
2ba1c1f Add example for mercator projection and tiles.
201f744 Restrict tiles to zoom <= 30.
202291d Add member_type_string class.
494ed6e Cleaned up Tile tests.
af13a8b Add documentation and range checks to Tile struct.
9df5d91 Some small changes to avoid conversion warnings.
afac031 Explicit cast to avoid warning.
8188f66 Better contribution info.
fa89d1d Fixed a problem limiting cache file sizes on Windows to 32 bit.
23a89df Remove obsolete info about versioning from CONTRIBUTING.md file.
115ae23 Release v2.8.0
4174b3c Style fix.
1795dcb Function wait_and_pop_with_timeout() is not needed any more.
4a3a71b Fix for possible threading problem.
cc85925 Updated change log.
67bc8b1 Use unordered_map instead of map in PBF string table code.
18b7b66 Set better default for string table chunk size and document it.
e6d7410 Remove dependency on sparsehash and boost program_options for examples.
14d92d6 Fix regression: Debug output of invalid location works again.
ef91ce1 Bugfix: PBF String table corruption when there are many strings.
649af78 Remove DeltaEncodeIterator completely.
56e5ac2 Function getting queue sizes from environment uses default when getting 0.
bfaab7d Add change log.
d260339 Remove use of PROTOZERO_STRICT_API macro.
c61722d Remove use of DeltaEncodeIterator simplifying code.
f7c60b6 Updates for new protozero.
0bdfb9d Updated change log.
bb56cbb Switch to newest protozero 1.4.0.
9e19a82 Add ccache support to CMake cnfig, better travis builds.
00d8868 Make I/O max queue sizes configurable via environment.
dc7e504 Remove unused debugging code.
13f66a0 Track pop() calls and queue underruns when OSMIUM_DEBUG_QUEUE_SIZE is set.
5c2e367 Add EWKT support.
8f7c7d3 Automatically set correct SRID when creating geometries.
ff11893 Better check of optional components in CMake config.
4562429 Use fallback implementation for coordinates given in scientific notation.
3bdf46e Mark enable_debug_output() as deprecated.
ea1093e Update catch unit test framework.
8623f1e Release v2.7.2
e135dd8 Fix data corruption regression in mmap based indexes.
adbd3b0 Do not output empty discussion tags in changeset XML output.
8126fbb Formatting.
c6970fd Fix coordinate output.
3471b4b Resize output string once in output_int().
0ddf0e7 Use our own function to convert integers to strings instead of printf.
f9a1dd3 Reading and writing coordinates is now independant of locale.
8104294 Use hand-crafted function for hex output (faster than printf).
0bb452a Fix links in change log.
1862d06 Release v2.7.1
8bfe2ba Release v2.7.0
c3604f3 Use 64bit counter in area stats.
9e589b3 Update gdalcpp.hpp from upstream.
fd55d9b Cleanup of OGR-related code.
d0c53e0 Fix bug: Relation wasn't found correctly from member.
24145f9 Use make_iterator helper function.
a8a287d Refactor count_not_removed function. (No template necessary.)
389332a Also print removed flag from member_meta.
5e7c5d0 Remove unnecessary overload of begin() and end() function in iterator_range.
2ec007f Do not add rings to invalid area, even if create_empty_areas is set.
fee8b73 Optionally keep type tag in area assembler. Better doc for config.
c7e1f8a Fix timer output in assembler code.
032ab40 Update change log.
dcfa439 Node location store keeps track of whether node ids are ordered.
54d5eb8 Add tests for new file based index code.
4fe5b30 Use correct empty value when initializing index.
40b5c79 Static or not static, that is the question.
aaa9b46 Open index file with minimum size, because zero-sized mmap is not allowed.
fea2337 Fix for disk-based indexes.
428a413 More tests of corner cases for id to location index.
9d2a31b Add config option to areas assembler for only creating some areas.
d11bf8d Count and report inner rings with the same tags as relation/outer rings.
bde10c4 Speed up copy of tags.
e4c9f87 Revert "Consistently remove some tags from area."
9cd7a03 Set areas assembly config setting create_empty_areas to true by default.
660fb63 Better ordering of OSMObjects.
b4199c2 Use std::strcmp instead of just strcmp.
579c34b Better field width/precision in problem reporter.
a2ebeeb Use field names with 8 characters or less in OGR problem reporter.
ef523fe Switch remaining "typedef"s to "using".
19425f8 Switching from "typedef" to "using" in geom code.
b13c2be More cases of switching from "typedef" to "using".
7f53977 Refactoring iterators: Not derived from std::iterator any more.
1922224 Consistently remove some tags from area.
295495f Fix check for detecting wrong role.
9aa6d46 Report more IDs in problem reporters.
d7a5da7 Remove now unused spike segment reporter.
0666d66 Only report duplicate segments if they belong to the same way.
9e17f89 Improved error reporting for area assembler.
e983a48 More code cleanup and docs.
927eeda Replace awkward std::pair construct by real class.
d0543b9 Various area code refactorings.
0ae8f07 Do not build areas for ways with tag area=no.
d4cabe7 Add some convenience functions to check for tags in TagList.
99f4be9 Add missing include.
a8dda78 Travis: Only run tests if build succeeded.
9db3034 Add missing "nodes" fields.
50e9fcb Report ways that are in multiple rings as errors.
58a3669 Add some paranoia asserts.
3958c1d Use iterator_range to make equal_range results easier to use.
c12c710 Add for_each_member() function to iterate over members of an mp relation.
ca35452 Change argument order in create_area() functions.
4473ae1 Keep stats on multipolygons with no tags on the relation.
12c5335 Bugfix: Check that there is a problem reporter before using it.
ec2afce Update change log.
5af2ec9 Use new area assembler interface in multipolygon collector.
73e3440 Some code cleanup in area code and new interface for calling assembler.
7737479 Add the number of nodes in area to problem reporter.
b4f9343 Use const_iterator where possible.
02372b2 Simplify code that checks for open rings.
8d6099e Pull out location_to_ring_map into details ns and add == and < ops.
1a05042 Mixed code cleanups and added comments.
4b8d1be Ignore empty role when checking inner/outer roles on multipolygons.
e22f573 Now GCC is complaining about the clang pragma...
48000c0 Add some missing includes and forward declarations.
ba9504a Workaround for bug in old libc.
a138265 Completely new algorithm for assembling multipolygons.
74054bd Add specialization of std::hash function for Location.
5ed4c90 Use newest gdalcpp.hpp with implicit transaction support.
676949e Add "locations_on_ways" support for OPL format, too.
ce05c19 Add support for reading/writing XML/PBF files with locations on ways.
62b2ee4 Fix checksum test.
bd512a8 Added "add_crc32" file option for adding CRC32 checksum to debug output.
3a100fa Incorporate locations in NodeRefs into CRC32 checksum.
ac02f86 Update catch.hpp to newest version. Removed outdated info in README.
481f48b When assembling areas ignore ways containing no or only a single node.
a0ae33a Fix unsigned overflow in pool.hpp.
91b8adf Fix undefined behaviour in WKB writer.
697f460 Check results of dynamic casts.
f1e4571 Fix from_item_type() implementation so it also works with undefined type.
65df99b Add future_queue_type alias to simplify code.
4340e4d Removed SortedQueue implementation which was never used.
cdd8f8c Add version.hpp with macros defining version of the library.
ff5d42a Update to newest gdalcpp.hpp.
a184f66 Update change log.
0ea76f7 Add osmium::Area::outer_rings() and inner_rings() functions.
b0404b7 New ItemIteratorRange class for iteration over buffers and subitems.
eff8a7c Add default type to string_to_object_id for IDs without type prefix.
e877a6f Clean up code inner vs. outer ring in geometry factory.
9224be5 Disable use of XML entities in OSM files.
9d9fa08 Output operator of location shows full precision of coordinates.
9a8e7c0 Documentation fixes.
git-subtree-dir: third_party/libosmium
git-subtree-split: 80df1d6850bdfa661587839b77dcea0ab8fc814a
Takes a stricter aproach for whitelisting / blacklisting restrictions:
- uses `restriction=`
- uses more specific `restriction:<type>=`
- uses `except=<type>` to invert
Where `type` is the type of transportation to restrict, e.g. `motorcar`.
https://github.com/Project-OSRM/osrm-backend/issues/2833
With @karenzshea's name / ref split (ref. #2857) in master we want to
make use of it and reduce `NewName` instructions when ever possible.
This is a first step towards #2744 by using the already existing name
change heuristic from the extractor now in post-processing as well.
Limitations: at the moment we don't have the `SuffixTable` in
post-processing; this would require us serializing and subsequently
deserializing the table, passing it through from the profiles to the
API.
Before we only worked on subsequent quick turns, as in:
`right, right` keeps the user on the rightmost lanes.
This changeset modifies the logic to work on any subsequent steps
that are "quick" and have lane information we can constrain later.
Because we do not have a from-lane => to-lanes mapping we take the
lanes left and right of the turn lanes into account when heuristically
assigning the leftmost / rightmost lanes.
There are some edge cases where this still does not give us the optimal
solution but it gets close to what is actually possible at the moment
without having a lane mapping in post-processing.
References:
- https://github.com/Project-OSRM/osrm-backend/issues/2625
fix rebase
Issue 2785: check gold binutils version and don't use gc-sections for versions prior 2.25
due to https://sourceware.org/bugzilla/show_bug.cgi?id=17639
readelf --debug-dump=frames build/libosrm_extract.so
Contents of the .eh_frame section:
...
readelf: Warning: Invalid length 0xfff01dd8 in FDE at 0x000020
Currently we don't route over the Golden Gate bridge by default.
This sets the value to false by default. To test the behavior for
tolls when ignored, we would need issue #2781 implemented.
Roundabout Intersections are roundabouts with up to four ways and turn
angles which makes the turns obvious, e.g. as in:
```
*
*
* * * *
*
*
```
but not
```
*
*
* * *
* *
* *
```
For Roundabout Intersections we issue instructions such as
"turn <direction>" instead of "take the <nth> exit".
At the moment we have a limit on the radius for these Roundabout
Intersections of 5 meters. Which fails to classify a wide range of
Roundabout Intersections in the US (with the US-wide streets).
This changeset removes the Roundabout Intersection radius limit:
- if the roundabout is larger than a threshold and is named we classify
it as a rotary
- if the roundabout matches our criteria for Roundabout Intersections
we classify it as a Roundabout Intersection
- else fallback to plain old Roundabout
There is a second issue with determining a roundabout's radius.
But that's for another pull request (tracking in #2716).
References:
- https://github.com/Project-OSRM/osrm-backend/issues/2716
- Clarifying guarantees between patch/minor/major versions
- Consolidating version release flow into one flow for patch/minor/major versions
- Add constraint that all minor/major released code needs to have had a release candidate before
Staggered intersection are very short zig-zags of only a few meters.
They are common in rural and exurban areas, especially in the US.
(In addition, these cases could as well be tagging issues)
We do not want to announce these short left-rights or right-lefts:
* -> b a -> *
| or | becomes a -> b
a -> * * -> b
Here is one example:
- https://www.openstreetmap.org/edit#map=20/39.26017/-84.25182
And here are two edge-cases that we don't handle at the moment:
- http://www.openstreetmap.org/edit#map=20/38.87900/-76.98519
- http://www.openstreetmap.org/edit#map=19/45.51056/-122.63462
and probably should not handle since the distance in between is
quite long (roughly 7-15 meters). For these we want to announce
two turns to not confuse the user.
Thanks to @1ec5 for raising this issue and @karenzshea for
providing additional US examples and cultural insights.
https://github.com/Project-OSRM/osrm-backend/pull/2685/files
fixes an issue where we did
elongate(fstStep, sndStep);
instead of
newStep = elongate(fstStep, sndStep);
we didn't get any warnings.
The only way to trigger a warning here is to use
```cpp
__attribute__((warn_unused_result))
```
This changeset does exactly that: for the new guidance code prone to
these kind of issue we add such an attribute to the declaration.
Why only `hov=designated` and not all access tags, such as `hov:yes`,
`hov=no` and so on? From the Wiki:
- designated: The way is designated to high occupancy vehicles.
- yes: High occupancy vehicles are allowed. This by itself does not imply that other vehicles are restricted from using the way.
- no: High occupancy vehicles are not allowed on the way. This by itself does not imply that other vehicle types are allowed to use it.
The primary use-case is conditionally filtering ways such as:
http://www.openstreetmap.org/way/11198593#map=19/37.82571/-122.30521&layers=D
In addition there is a notion of HOV lanes for lane handling:
http://wiki.openstreetmap.org/wiki/Key:hov#hov:lanes.3D.2A
This changeset does not handle lanes at all, only designated HOV ways.
For HOV lane support, a logic similar to the lane access handling needs
to be implemented. This needs to go hand in hand with the existing lane
handling introduced in:
7d076e9344
References:
- #2711
- http://wiki.openstreetmap.org/wiki/Key:access
- http://wiki.openstreetmap.org/wiki/Key:hov#Values
After half a day of looking at the tagging and the data came to the
following conclusion:
We can't keep the user to the innermost / outermost lanes depending on
the exit the route takes: we found situations where both heuristics were
wrong.
Even on popular roundabouts the tagging is often wrong or in the best
case not present at all.
There are at least two different ways to interpret roundabout
indications: 1/ where e.g. a right arrow on the lane indicates turn
restrictions for the roundabout and the need to take this lane to exit
the roundabout to the right (possibly skipping multiple exits) and 2/
where a right arrow just means this is a lane in a immediate right turn.
Example: Australia marks lanes with arrows that seem to indicate
"angles you can exit the roundabout from", for example, these two ways:
- http://www.openstreetmap.org/way/320941710
- http://www.openstreetmap.org/way/42918021
Whereas Germany marks lanes with "directions you can travel in these
lanes immediately after entering the roundabout":
- http://www.openstreetmap.org/way/52578338
These two different interpretations of how to draw the arrows on the
roads mean we have conflicting solutions to "which lanes can you use to
take exit B from entry A" based on locality.
Continuing to tag ways based on lane markings is no problem, but
unfortunately, we can't reliably resolve good advice for navigation
system users (like "use the inside lane to take the second exit at the
roundabout"), there are too many situations that would generate bad
instructions (instructions that tell users to go into a lane they
shouldn't use).
Before we asserted on unique lane indications per lane. Turns out the
OSM data contains lane strings such as:
left;left|right
Which represents two lanes as in:
<< >
|| |
The two left indications _on a single lane_ look like data issue.
And we can't represent this with our enum-approach at the moment.
We don't want to crash there, so silently swallow this and
generate a single left|right for it.
This changeset implements Lane Anticipation on roundabouts, delimited
by enter / leave step pairs. It does not handle lane anticipation
within a roundabout.
Lane anticipation happens on the granularity of a valid roundbaout:
We discard partial roundabout (enter without exit or exit without
enter) or data issues (no roundabout, exit before enter).
Related:
- https://github.com/Project-OSRM/osrm-backend/issues/2626 for lanes
within a roundabout
- https://github.com/Project-OSRM/osrm-backend/issues/2625 for handling
going straight in lane anticipation
We build `osrm_contract` (the library) linking in libtbb. We then
build `osrm-contract` (the binary) linking in `osrm_contract` (the
library).
Because we're only using TBB's `parallel_invoke` in the code for the
binary, it seems like the linker discards some symbols in the library.
Therefore we have to link libtbb for the binary again. Even worse, the
order now matters: if we first link in `osrm_contract` and then libtbb,
we're still hitting the issue re. discarded symbols.
Therefore we first link in all dependencies (libtbb, libboost*), and
only then `osrm_contract`.
Strictly speaking, we probably have to do this for all of our binary
targets, or we will hit similar issues in the future.
From
> [warn} oops
to
> [assert] /tmp/osrm-backend/src/extractor/extractor.cpp:79
> in: int osrm::extractor::Extractor::run(): false
> terminate called without an active exception
This is more of a hack but looks like the best we can do.
The reason for this is the following:
1/ we require strict mode for our v4 script
2/ v0.10 in strict mode marks 'let' as a reserved keyword,
aborting before execution any code in the script. Thus,
we can't assert e.g. on process.versions['node'] !== '4'.
Aligned blocks prevent bus errors in NEON/VFP instructions.
Block pointers are aligned to 4 bytes, that is guaranteed
by aligned mmaped-pointers, the 4 bytes size of the CANARY block and
aligned sizes of blocks.
Failing test
features/car/traffic_turn_penalties.feature:33
Tables were not identical:
from | to | route | speed | time
| a | h | ad,dhk,dhk | 63 km/h | 11.5s +-1 |
| i | g | fim,fg,fg | 59 km/h | 12s +-1 |
| (-) a | (-) e | (-) ad,de,de | (-) 57 km/h | (-) 12.5s +-1 |
| (+) a | (+) e | (+) ad,de,de | (+) 58 km/h | (+) 12.5s +-1 |
| c | g | cd,de,ef,fg,fg | 63 km/h | 23s +-1 |
| p | g | mp,fim,fg,fg | 61 km/h | 23.5s +-1 |
| a | l | ad,dhk,kl,kl | 60 km/h | 24s +-1 |
| l | e | kl,dhk,de,de | 59 km/h | 24.5s +-1 |
| g | n | fg,fim,mn,mn | 57 km/h | 25s +-1 |
* 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.
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.
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.
candidate_cache is removed because of failing test
make util-tests && ./unit_tests/util-tests --run_test=*/construct_multiple_levels_test
first bad commit: [9692be6f50] Add cache for CandidateSegments to reduce heap worke even more
Now SegmentIndex contains leaf index, object index and fixed_projected_coordinate
In windows native strings in Lua incorrectly
interpreted because native separators must be escaped.
Use of generic strings prevent use of backslashes and
"Generic paths are portable and independent of the operating system.".
Can be used as in:
function way_function(way, result)
for node in way:get_nodes() do
local id = node:id()
io.write(">>> " .. id .. "\n")
end
-- ...
end
Warning: we do not use libosmium's location cache, therefore .location()
on the nodes will crash at runtime. Once we switch to using libosmium's
cache this should work. Until then, you can use the node id now.
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.
* 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 '.'
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.
This increses query performance dramatically for queries with a lot of
coordinates. However it increases the internal memory usage of the
StaticRTree also 4x.
Also, when trimming the last step, we need to copy name values from the new next-to-last step, otherwise
we can still end up with an arrive step on a different road to the last maneuver.
StaticRTree now uses projected coordinates internally. That means we can
use a euclidean distance measure (squared distance) for sorting the
query queue.
Phew, this was painful. Turns out most hints out there on how to use the
Boost serialization iterators are wrong. Here's why:
transform_width<6, 8>
needs an input stream of length: common multiple of 6 and 8.
That is, the padding needs to happen _before_ using the provided
iterators, otherwise the behavior is undefined!
See: http://www.boost.org/doc/libs/1_60_0/boost/archive/iterators/transform_width.hpp
Thanks @mokob for pointing that out to me!
We also need to manually add as many padding chars "=" to the encoded
result as many bytes we had to append to the input to conform to the
rule above.
Decoding then knows the number of padding chars by counting for "=" and
then using it in order to split off the last bytes from the decoded
result.
This is dead code. Using my time machine (which sadly can only go back
in history), I found the introducing commit here:
74cc50f52b (diff-ded22cbfae0ae88f6359ccff1c3355b0R106)
Seems like we no longer use it, and it was still left in the car profile.
The counter for original edges is of type `std::size_t`, but we
serialized `sizeof(unsigned)` number of bytes out to the `.osrm.edges`
file.
We should probably check all writes (analogous for reads) and make the
count parameter dependent on `sizeof(variable)`.
ag '\.write\((.*), sizeof\((.*)\)\);'
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 👍.
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.
Although we check for valid coordinates in the table plugin via
`check_all_coordinates`, we do not check for #srcs > 0 and #dsts > 0.
This would be fine as the grammar parser combines adding coordinates and
setting their `is_source` and `is_destination` property, which makes
adding coordinates without specifying source or destination impossible.
See: route_parameters.cpp, AddSource, AddDestination, and api_grammar.hpp
In contract, the Polyline codepath does not do this! In fact, it only lets
you set coordinates, but not their `is_source` or `is_destination` property.
See: route_parameters.cpp, SetCoordinatesFromGeometry
Therefore, the following queries only set coordinates:
http 'http://localhost:5000/table?locs=s_hhFg{arEgEfEgEfEgEfEgEfEgEfEgEfEgEfEgEfEgEfE'
http 'http://localhost:5000/table?locs=_p~iF~ps|U_ulLnnqC_mqNvxq`@'
but fail to specify sources and targets!
The distance table plugin now assumes `is_course` and `is_destination`
is the same size as `coordinates`.
And happily accesses uninitialized memory.
The need for this is that:
- On OS X if libraries are stored in custom locations (not /usr/lib or /usr/local)
and they do not embed an rpath (which is common to not have) then the developer
needs to set DYLD_LIBRARY_PATH to ensure that osrm tools can find dependent libraries
at runtime (this is normal and common).
- But as of OS X > 10.11 DYLD_LIBRARY_PATH no longer is inherited. While it works in
the main shell when running a command like `osrm-extract` you will find that when
`osrm-extract` is run by cucumber (ruby child process) then DYLD_LIBRARY_PATH
is blocked and the command cannot start.
- So, this introduces the ability to pass in a variable that the cucumber tests will
understand and can manually forward along to ensure that DYLD_LIBRARY_PATH is respected
where it counts.
The intended usage of this is therefore:
# set the environment variable
export OSRM_SHARED_LIBRARY_PATH=${DYLD_LIBRARY_PATH}
# then run cucumber tests
cucumber -p verify
- Otherwise, currently, if osrm-extract crashes at startup then
the tests continue on and will crash many many times.
- This also tests that --help returns an exit code of zero and will
catch if this behavior ever changes or is inconsistent between
the command line programs
Phew, a lot of classes were affected by this. The rationale for the
changes are as follows:
- When a type X declares any constructor, the default constructor is
not declared, so there is no need for X() = delete there. In fact,
there is brutal difference between those two: deleted members
participate in overload resolution, but not-declared members do not!
- When a type X wants to be non-copyable (e.g. to be only movable, like
threads, unique_ptrs, and so on), you can either do it by inheriting
from boost::noncopyable (the old way), or better declare both (!) the
copy constructor _and_ the copy assignment operator as deleted:
X(X const&) = delete;
X& operator=(X const&) = delete;
We had tons of types with deleted copy constructors that were lacking
a corresponding deleted copy assignment operator, making them still
copyable and you wouldn't even notice (read: scary)!
References:
- http://accu.org/content/conf2014/Howard_Hinnant_Accu_2014.pdf
- http://www.boost.org/doc/libs/master/libs/core/doc/html/core/noncopyable.html
Note: I know, I'm quoting Hinnant's extraordinary slides a lot, but
getting the sematic right here is so incredibly important.
And includes the optional header that was transitively included by the
spirit header before. Hopefully this will speed up compile times, as the
RouteParameters header is used in a lot of translation units.
`pow(2, 16)` is not `2 << 16` but rather `1 << 16`.
With this change we cut memory usage in half for the XORFastHash's two
tables. Adapts XORFastHashStorage, memory usage reduction by factor two.
so that proxy server don't try to reuse the connection. Given that
osrm-routed does *not* support keepalive the Connection: close response
header should be set.
- Throwing an assertion exception for proper stack unwinding, making
sure destructors are called
- On in Debug mode, in Release, enable via:
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_ASSERTIONS=ON
Current problem that I'm seeing is that some code is not catching
exceptions or worse silently swallowing them. Would like to check the
whole pipeline before merging this in.
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).
Found with
```
daniel@x1c /t/o/i/util> for header in *.hpp
echo -n $header:
ag -iQ $header ../../ --noheading | wc -l
end
...
fixed_point_number.hpp:0
range_algorithms.hpp:0
...
```
Only two. Surprises me to be honest.
But we're cleaning up for quite a bit now.
The postinst script fails on package upgrade given that the symlink
already exists.
Note that symlinks should *not* be handled in a postinst scripts.
Instead dh_links should be used so that symlinks are compliant with the
Debian policy.
This provides a script to build the libosmium examples such as
osmium_convert (to convert from xml to pbf).
I initially tried a CMake ExternalProject setup, but this was more
complicated than I initially thought; this is the more elegant solution.
The goal is to eventually rip out osmosis, so that we no longer depend
on java for the cucumber tests.
References:
- https://github.com/Project-OSRM/osrm-backend/issues/1788
When you mark free standing functions as `static inline` instead
of just `inline` they can not get merged across TUs and therefore
produce code bloat which is bad for the binaries size, the CPUs
instruction cache, and so on.
Please also see the discussion at:
- https://groups.google.com/forum/#!topic/mozilla.dev.platform/Ulw9HoZbSyQ
- http://stackoverflow.com/a/12836392
Note that non-fully specialized templates (i.e. with a kind of at
least `Template :: * -> *`) are `inline` by default.
0ff2780 Release v2.5.4
3f1583a Remove workaround for MSVC missing constexpr support.
2a6c80b Rewrite expressions to avoid warnings on MSVC.
9b0602a Make two functions non-constexpr that can't be.
ca1e501 Make NodeRef constructor, accessors and comparison ops constexpr.
fb48312 Disable some problematic clang_tidy checks.
d2d2812 Only do clang_tidy checks on files that are configured to be built.
5af55bb Always use braces after while() and if().
aebb6e3 No else after return.
65a3bf6 Better clang-tidy config.
3a965fa Add typedef Buffer::value_type needed when using std::back_inserter.
c20ac26 Add lots of explicits to constructors.
1d12e09 Add clang-tidy make target.
052b1ee Add benchmark programs to files checked with cppcheck.
9ccbb49 Use only "final", not "override final".
0b9df1f User 'override' instead of 'virtual' in overridden functions.
1d0c1c6 Remove unnecessary get() call.
705391b Use consistent namespace closing comment.
25c1f38 Only use "final" on overridden methods, not "override".
8da2553 Setting CMAKE_EXPORT_COMPILE_COMMANDS works only after project() command.
5fec437 Use newest protozero library (v1.2.3).
a3d759b Overloaded version of add_tag() with std::pair of strings.
1b4bcf9 Add function to add tag to tag list from existing tag.
7087e62 Update gdalcpp.hpp header to v1.1.1.
0008e8c Update change log.
39fe3a5 Add conversion and comparison operators to Timestamp.
e6643a7 Update gdalcpp.
650280f Bugfix: Improved segment intersection function.
1b20597 Make operator bool explicit for (Typed)MemoryMapping.
b580b25 Merge pull request #136 from tomhughes/ruby
a7c6737 The multipolygon test only needs the ruby interpreter
4a0a9e7 Make conversion from Buffer to bool noexcept.
7cdabbe Set thread name in o5m input format.
6a17a8d Break out computation of thread pool size into function and test it.
1950853 Allow initializing a Timestamp from any integral type.
4103198 Fix link in change log.
dc2ed89 Release v2.5.3
a2816b7 Fix end_of_time() Timestamp, add constructor taking std::string&.
3f5eb8e Updated changelog.
9b75c14 Cleanup and better docs for DiffObject and related classes.
d0beead Better documentation for NodeRef and NodeRefList classes.
0192292 Cleanup/doc/test osmium::util::Options.
b3db055 Use header with forward declarations.
8b3fe16 Improved documentation.
cd2ce38 Remove unused typedef Buffer::value_type.
87c9b32 Cleanup and test Buffer::add_buffer() function.
e519278 Improved documentation for osmium::memory::Buffer.
d721d43 Deprecate set_full_callback(). Better doc for deprecated functions.
58b5fd1 Remove DataFile class which was never used anywhere.
30b806e Simplify some tests.
62958df Update change log.
a8a2e68 Merge pull request #134 from zerebubuth/buffer-size-checks
987faab Move some code belonging into there into relations::Collector.
da31175 When the buffer isn't big enough, even when empty, to reserve the space that's being requested then it shouldn't reserve it anyway.
5d2f949 Swap the growth flag and any "full" callback as well as all the other members when swapping this buffer object.
1845aa9 The assertions prior to dereference are more strict than the conversion to bool. However, conversion to bool is often used as a predicate for whether dereference is okay, so the behaviour is easier to understand if they match.
abdfee1 Remove unused m_want_types in relations collector.
95b387f "Officially" mark two constructors as deprecated.
1d0da5f Release v2.5.2
31c3eaf Copy iterator around less often.
83c93d0 Do not check the write_future for exceptions on every item.
1c805ea Add counting of push() calls on queue in debug mode.
aa869c0 Release v2.5.1
212578b Fix documentation of Writer constructor.
0445dd8 Add new header file with forward declarations of commonly used classes.
4b6baac Optionally include external library headers.
712a6d1 Update change log.
fc78d04 Update style rules.
b590fe3 Unify use of 'typename' in templates. Unify spacing of ellipsis operator.
8c450ac Move osmium/io/overwrite.hpp to writer_options.hpp.
08eed02 Move DEPRECATED macro into compatibility.hpp.
b72eb8d Release v2.5.0
5aeba6b Better formatting for invalid timestamps on debug output.
6772413 Add valid() function on Timestamp.
7549b05 Update change log.
84119b0 Add option to fsync files after they are written.
db1bd92 Make optional parameters on Writer work in any order.
3482e3e Remove boilerplate. Add explicits to constructors.
cf389c6 Rename the wrap() function to the better ensure_cleanup().
678049e Use reference instead of pointer for decompressor.
7189d28 More consistent use and naming of Function templates.
3d66deb Use const& for parameter that's not changed.
88d65fb Fix warning with a cast.
03e8c9f Fix some misc issues found by cppcheck.
4848676 Options to cppcheck to check everything (--force) and ignore assert.
5f89a8c Add lots of assert() calls to Buffer implementation.
c990b43 Use a wrapper function in Writer for error handling.
04d9e3e Refactor of writer to work properly in all error cases.
6daf2d3 Throw when reading from Reader after eof or error. Use io_error everywhere.
713a189 Rename OutputFormat::close() to write_end().
7905add Refactor Reader/Writer code.
c050a05 Make thread_handler class movable.
8e661a2 Make DeltaEncode/Decode more generic and fix signedness issues.
da712a9 Fixed a few signedness issues.
dc04e67 Avoid possible narrowing conversion.
abd44af Make a variable static that should be.
7039fa6 Avoid global variable.
9e9fc0f Add a noreturn attribute.
a681a2c Do not pass Timestamp class through forwarding.
d37b717 Clean up status handling in Reader and Writer.
3b1f0d8 Add at_end_of_data() helper function to get self-documenting code.
bf3cc8c Add add_end_of_data_to_queue() helper function.
94bdd09 Fix test.
531db80 Use valid() on future instead of an extra bool.
7f328b3 Make RVO work for pop() function.
c1d726d Add some static_cast_with_assert paranoia checks.
5a064f7 Make sure DeltaDecode/DeltaEncode classes work for all integer types.
c69a701 Fix some integer types.
2b2cfc9 Remove extra semicolons at end of function definitions.
2b74aa6 Use workaround for GCC unused variable warning for index::map, too.
f7fb94d Different way of supression unused-variable warning.
c0813e6 Better handling of threads.
963ff8e Move internal buffer from OutputIterator into Writer.
698d027 Update change log.
24270dd Remove unused variables.
64d6363 Remove unnecessarily fully-qualified name.
5ccacc7 Add support for reading o5m and o5c files.
b603904 Fix up includes.
6013a27 Remove pessimizing move.
a19e4cf Use queue_wrapper in Reader, too.
74a5174 Refactor thread creation for WriteThread.
c480b33 Fix test code.
e135597 Do not use promise in two threads at once.
6fa16ca Refactor input format code.
53fc576 More robust implementation of writer/writer_thread.
1285316 Put some queue handling into new wrapper class.
a1e6e6f Rename osmium/io/detail/util.hpp to queue_util.hpp.
f42d6fc New add_to_queue() helper functions.
3db9b49 Simplify read thread handling.
a903561 Move any exception in read thread through queue.
ee977cb Add more tests for reader code.
99aaa45 Factor out input handling in classes derived from Parser.
7afa03c Wrap access to m_read_types in InputFormat.
f6c5971 Wrap sending to output queue in InputFormat.
26f4170 Consolidate header handling in InputFormat.
a0aa3ed Remove unnecessary inline declaration.
894e84a Declare a bunch of destructors noexcept and use consistent comments.
6c49b43 Add hack to append_printf_formatted_string() so it works on Windows.
20c3f20 Remove a move that prevented copy elision.
8192a4c Pull low-level string formatting out of debug output and test it.
190aa46 Move low-level string formatting/encoding functions into own header.
3e35441 Add Option::is_not_false() helper, use and test it.
0a90339 Updated some comments.
a44066f Make naming of output format options more consistent and document them.
a59b60b Run serialization of PBF blobs in worker threads speeding up PBF writer.
18a739f Remove unused m_file attribute from OutputFormat class.
9b5d3b7 Various output option related cleanups.
36772a0 Consistent ordering of methods in *InputFormat classes.
c04a51f Factor out common code in output formats.
ebc53d4 Do not use "explicit" on constructors with more than one argument.
e1dfcfc Make all destructors in io/detail noexcept.
cfd7970 Use consistent handling of output options in all outputs.
c4e71f0 Better implementation for output_formatted() and tests for it.
899a061 Extract common code from output formats.
b226ae4 Factor out common code from *OutputBlock classes.
fe4b287 Cleanup WriteThread class.
af421df Consistent naming of queue typedefs.
e8253c4 Add missing include.
9f71cd3 Refactor management of read thread into its own class.
4c96e16 Refactor Reader/InputFormat.
fa02e6c Refactor input format code.
d14ea27 Extract common code from PBF/XMLParser into new Parser class.
fe7acd3 Better handling of failures when parsing header.
2e3b6cd Remove unnecessary include of <future>.
3bd18b8 Factor out common code in input format.
2915604 Only get promise and future once, even if header() is called multiple times.
cfc980c Make output buffer for XML parser smaller.
4c1ffa7 Orderly shutdown in io::Reader.
8c7aa32 Remember whether the input queue was exhausted.
535bb6a Function call in new thread can be void.
e0d5448 Factor out some helper function for queue cleanup.
5a4c6b5 Use std::thread directly for input instead of std::async.
c1bdf4f Move common code from InputFormat child classed into base class.
89caa6e Report failures in input_format through the queue.
8f4d300 Rename (m_)queue to (m_)output_queue.
8fc1f5b Reorder XMLParser class making check_attributes() private.
df381d7 Make sure we always send end-of-file from PBF parser.
1a178b0 Factor out construction of PBFDataBlobDecoder.
cb34f76 Factor out read_from_input_queue_with_check() method.
21b51cc Factor out parse_data_blobs() method.
dc957a8 Make some variables const.
1c2812c Make methods private that don't need to be public.
81e5625 Refactor out parse_header_blob() function.
f9e5760 Fix test: New signature of XMLParser constructor.
43746d3 Add copy constructor to PBFParser.
8524780 Rename variables and other changes for clarity.
3e9627b Removed now superfluous parameters from InputFormat class.
7eac5cf Simplify input format class.
3ea2ace Set max queue size only in one place.
77ab086 Formatting.
ceee837 Use std::async instead of "raw" std::thread for pbf input.
6cafb45 Move and rename PromiseKeeper class: Now in thread/util.hpp.
06eff29 Set thread name for xml parser thread.
bd485cd Refactoring of threading code for input.
fc03bf6 Make sure (de)compression classes clean up properly.
27af4ea Use special function to shut down pool workers instead of an atomic<bool>.
84297b3 Bugfix: auto and std::minmax() don't mix well.
597ecc4 Always use std::swap() in the idiomatic form.
10dd14f Remove threading test that fails when machine is too busy.
2072786 Use reserve() to spead up dumping indexes.
66a344b Declare some index functions noexcept, especially destructors.
a0586da Use map::find() instead of awkward try-catch block.
d38a7f1 Do not run make tasks in parallel.
cd33daa Do not use clever YAML aliases, instead copy dependencies explicitely
4ad6e43 Integrate more compiler and os versions
b2c519b Check return code of close() system call and throw.
369057b Update protozero to current 1.2.2.
d1db14b Collect debug output options into struct.
54667dd More consistent debug output of way nodes, relation members and changeset comments.
67e1513 Add some paranoia checks to xml parser.
69de191 Refactoring in xml reader: New function check_attributes().
c67f3f3 Add support for changeset discussions (comments).
9c5531c Merge pull request #121 from DerDakon/cmake-find-no-components
44be1a7 Add helper functions to make input iterator ranges and output iterators.
76e2b91 Merge pull request #130 from alex85k/master
5a4fa6b remove assertion messageboxes in tests on Windows
bac5a77 Updated change log.
7e7bba4 Updated included protozero library to 1.2.0.
1ae370d Merge pull request #122 from zerebubuth/pbf-decode-non-visible-node-locations
5897468 Merge branch 'master' of github.com:osmcode/libosmium
7f2de1b Bugfix: Delta iterator handling.
65d31e9 Try ; as cmake list separator.
3a9dbc2 Add PBF libraries, now that the test reads PBF too. Thanks @tomhughes for pointing this out.
9a22ea1 Add test case for reading deleted / non-visible nodes in history files.
36098a8 Decode lat/lon even for non-visible nodes.
8279fd1 kick off AppVeyor to test new binary deps package with gdal200
c8244f7 FindOsmium: prevent errors in list(REMOVE_DUPLICATES) when no components are requested
a02806a Use https URL to travis.
a1b7015 Fix some includes.
468e4d8 Remove pessimizing std::move.
427d2e0 Do iwyu check on header files in alphabetical order.
be9a996 Release v2.4.1
95a3bc8 Fixed CRC calculation of tags and changesets.
4e157e3 Release v2.4.0
3da68f0 Fixed setting of binary mode on Windows.
81aa057 Use binary mode for memory mapped file on Windows.
986cb7e Set stdout to binary mode on windows before writing to files.
27d02eb Bugfix: Do not dereference end iterator.
e96eeaf Updated change log.
64a55ce FindOsmium: let FPHSA handle all the additionally required things
e152057 FindOsmium: pass the proper module name to FPHSA
a4acce3 Remove restriction on master branch in appveyor config.
10c8265 FindOsmium: simplify the fallback code for sparsetable::size_type
190ed47 remove the correct include dir from OSMIUM_INCLUDE_DIRS
aaa99c1 avoid that FindOsmium finds a random include dir
6406010 Add a magic define fixing a boost problem.
2fa6674 Remove superfluous file paths from cmake config.
e081a51 Merge pull request #114 from DerDakon/do-not-cache-version
20e1a24 Use external gdalcpp wrapper for compatibility with GDAL 2.
3b7cc86 Fix initialization order in DeltaEncodeIterator.
0954b0f Fix possibly uninitialized variable.
f081942 Take byte swap functions out of CRC class.
e085aae Fix byte swap, add test cases for crc.
e648b62 Merge pull request #116 from DerDakon/yml-simplify
7912897 properly put bzip2 library in the CMake cache
e0ea72b use less variables when defining the test environment
cf8ff6c do not cache the version string
38234cd Remove pragmas disabling warnings from gdal includes.
82d8c30 Include headers of external libraries as "system libraries".
f721b86 Update protozero to version 1.1.0.
a29ef82 Add some magic to enable folding on travis output.
18b2418 Removed toogr examples. They are in their own repository now.
89c8220 AppVeyor: 1st try with VS2015
93a1626 Added recent changes to change log.
ce4b45e Bugfix: Program hanging when opening unknown file type.
06ad6ef Rename add_string() to store_in_stringtable() and use right return type.
869058d Add explicit conversion that always works.
0b28f2c Add missing check in TagListBuilder add_tag() overload.
51fa9c0 Check in builder that key/value of a tag is not too long.
9b1da20 Check that string table isn't overflowing.
2c732c6 Add some extra paranoia checks and type conversions to pbf writer.
f92096a Fix integer size.
a47ddb4 Force conversion to smaller int type, because we know it must fit.
f150ff1 Rename variable that was hiding parameter name.
ab92064 Use correct size_t as return type.
2f2bf68 Check that roles are no longer than max allowed string length.
4a7df68 Check strings for max length in PBF input.
e4b8bb0 Explicit conversion to bool.
d18352d Make conversion from double to integer explicit.
git-subtree-dir: third_party/libosmium
git-subtree-split: 0ff278001f6e0bc79040add736452bef3aa4ff06
"status" is now always:
- 200 if the request was successful
- 207 if the result is empty (no path found)
- 400 if the request is invalid
viaroute and trip now have a maximum of 500 and 100 locations
respectively. Override with the --max-viaroute-size and --max-trip-size
parameters.
Add ability to pass extra parameters to during tests.
Limit distance table search so that it doesn't return any big components if they're beyond max_distance.
-Use stxxl vectors with char and unsigned int containers
-Write out the entire character vector to fil
-Cap the names at length 255 during the parsing so we reduce
the amount of memory used by stxxl vectors and we can do a
direct writing of the character vector to .names
-For large datasets with very many unique names, stxxl::vector can corrupt
data. Technically, we should only be using stxxl:vectors with POD. Other
types might lead to strange/unpredictable behavior as we noticed here.
-See http://algo2.iti.kit.edu/dementiev/stxxl/trunk/FAQ.html
This uses a bit flag to differenciate between small and big components
and keeps the ids for both. This makes it possible to give better
error messages.
This speeds up processings on the same dataset significantly by creating
a .level file that saves the level in which a node was contracted.
It removes the need for expensive recomputation of priorities and such.
Use with care! Running `osrm-extract` again will invalidate .level
files.
table plugins.
Make bearing range configurable by adding a comma-separated second part
to the bearing paramenter, like so:
b=<bearing:0-359>(,<range:0-180>)
If no range is supplied, it defaults to +/- 10 degrees.
New Travis CI integration - upgrades Linux builds to Ubuntu trusty, simplifies dependency installation because system packages are now available for most things.
This checks if `ccache` is available, and if so uses it.
The user can stil disable it via the ccache env variable, quoting:
disable (CCACHE_DISABLE) [boolean]
When true, ccache will just call the real compiler, bypassing the cache completely. The default is false.
At least Clang required `CCACHE_CPP2`.
The user does not have to set up anything, just to install ccache.
Of course, things like the cache's max size, its location and so on can
be configured.
References:
- https://ccache.samba.org/manual.html
By linking in the coordinate object file twice, we violate the ODR,
resulting in our program to not be "well-formed" in language lawyer
speak (hint: bad, very bad).
(How come no one noticed this all the time, this was introduced
somewhere between v4.5.0 and v4.6.0 from a quick look...)
References:
- C++14 standard (N3936.pfd): 3.2 One definition rule [basic.def.odr]
- http://eel.is/c++draft/basic.def.odr
Instead of including the `luabind.hpp` header that transitively includes
basically everything else, we now only include the appropriate header
for luabind's open function.
It is important that this function is declared in the header but the
definition comes from the luabind shared object (library), such that we
can detect linker errors, too.
By only including this header, we also no longer transitively include
the header for the `luaL_newstate` function, with we have to add
manually.
With these changes, detecting, compiling, linking and checking for
lua/luabind with cmake now works instantly, instead of the 3-4
seconds as it was before! Yay, progress!
We were stuck on the 4.5.0 tag from develop, since we searched for the
latest tag, but release tags are done on the master branch.
This commit rips out all the code for deriving the version on git tags.
Instead, we define major, minor, and patch versions in the CMakeLists
and then pass it on to:
- the `libosrm.pc` `pkg-config` file
- a `version.hpp` header that makes use of the preprocessor's string
concatenation to provide an easy way for generating version string
literals such as "v4.8.0".
That is, in the source code please now use the following defines:
#define OSRM_VERSION_MAJOR "@OSRM_VERSION_MAJOR@"
#define OSRM_VERSION_MINOR "@OSRM_VERSION_MINOR@"
#define OSRM_VERSION_PATCH "@OSRM_VERSION_PATCH@"
#define OSRM_VERSION "v" OSRM_VERSION_MAJOR "." OSRM_VERSION_MINOR "." OSRM_VERSION_PATCH
- remove profiling/coverage mix from debug build, as it is useless as of
now, re-enable this for a separate coverage build in the future
- use gcc's `-ggdb` and `-Og` flag (requires recent gcc) to provide
better debug information targeted for gdb and optimize what we can
- use `-fno-inline` and `-fno-omit-stack-pointer`, in order to be able
to jump around in gdb without functions being gone and keeping the
stack reference
This refines the last commit of parallelizing lto.
Discussion: this is ugly as hell, dispatching 1/ on the availability of
the `-flto` flag, then 2/ on the compiler since GCC allows `-flto=n`
whereas Clang for example does not.
I tried setting the CMake property `INTERPROCEDURAL_OPTIMIZATION`,
without any effect. All I could see was some lto related utilities in
the cmake debug output, but not in the actual compiler or linker
invocation.
This would eliminate the need for our hacks, with 1/ using an option
`WITH_LTO` setting `ON` by default, and based on this value setting the
`INTERPROCEDURAL_OPTIMIZATION` flag with CMake doing the actual work of
selecting the best LTO method on the target platform.
By the way, this also fixes a bug where we reset the `CMAKE_CXX_FLAGS`
to a variable that was never defined, resulting in setting the flags to
an empty string. Yay CMake, as usual.
References:
- http://www.cmake.org/cmake/help/v3.0/prop_tgt/INTERPROCEDURAL_OPTIMIZATION.html
GCC with link time optimizations does not to respect this mode
unfortunately, reuslting in warnings in release (default) build
mode from system includes such as boost, luabind and so on.
This remove the `-fPIC` flag, indicating position independant code
generation, from the build system.
Citing GCC's official code generation docs:
> This option makes a difference on the m68k, PowerPC and SPARC.
We do not support any of these architectures, so remove the flag!
References:
- https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
These are for standard compliance and should on by default:
-Wall -Wextra -pedantic
The problem is that even `-Wall` and `-Wextra` does not cover all
warnings, as to not break backward compatibility. Clang therefore
has the `-Weverything` flag, that really includes everything but is
overkill for the day to day development.
Thus, we in addition add:
-Wuninitialized -Wunreachable-code
to guard against undefined behavior from reading uninitialized variables
and warn for unreachable code.
With:
-Wstrict-overflow=1
the compiler warns us when it's doing optimizations based on the fact
that signed integer overflows are undefined behavior.
With:
-D_FORTIFY_SOURCE=2
we tell the compiler to replace functions like strcpy with strncpy where
it can do so, resulting in cheap and useful buffer overflow protection.
References:
- https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
- https://securityblog.redhat.com/2014/03/26/fortify-and-you/
- https://wiki.debian.org/Hardening
This rips out the Bost Spirit / Karma conversion code, using the stdlib
and lightweight alternatives instead.
The main benefit is an immense decrease in compilation times, for every
translation unit that requires the `util/cast.hpp` header.
Note: compared to the version before, there is a minor change in
behavior: the double `-0` was printed as `0` before and is now printed
as `-0`. This comes from the IEE754 standard, specifying signed zeros,
that is `+0` and `-0`. Interesting for us: JavaScript uses IEE754,
resulting in no breakage if used in arithmetic.
Small test case, left hand side was before, right hand side is now:
$ ./a.out
-1.123457 vs -1.123457
-1 vs -1
-1.3 vs -1.3
0 vs -0
0 vs 0
0 vs 0
1.3 vs 1.3
1.123457 vs 1.123457
References:
- https://en.wikipedia.org/wiki/Signed_zero
- http://www.boost.org/doc/libs/1_59_0/doc/html/boost/algorithm/trim_right_if.html
- http://www.boost.org/doc/libs/1_59_0/doc/html/boost/algorithm/is_any_of.html
With C++11 the stdlib gains:
- `std::stoi` function family to convert from `std::string` to integral type
- `std::to_string` to convert from number types to `std::string`
The only reason for hand-writing the conversion code therefore is
performance. I benchmarked an `osrm-extract` with the hand-written code
against one with the stdlib conversion features and could not find any
significant difference (we switch back and forth between C++ and Lua,
shaving off a few us in conversion doesn't gain us much).
Formatting arithmetic types in the default format with given precision
requires streams, but is doable in a few lines of idiomatic stdlib code.
For this, there is now the following function template available:
template <Arithmetic T, int Precision = 6>
inline std::string to_string_with_precision(const T);
that requires integral or floating point types and returns a formatted
string in the defaukt format with the given precision applied.
In addition this completely rips out Boost.Spirit from the `casts.hpp`
header, resulting in faster compile times.
Boom!
References:
- http://en.cppreference.com/w/cpp/string/basic_string/stol
- http://en.cppreference.com/w/cpp/string/basic_string/to_string
- http://www.kumobius.com/2013/08/c-string-to-int/
We needed this for Boost < 1.48, but per our Wiki on building OSRM:
> On Ubuntu 12.04 you will be limited to OSRM tag v0.3.10 because
> later versions **require Boost v1.49+** and installing this
> causes problems with libluabind-dev package.
Thus, rip it out!
To keep the commits atomic and isolated, I also refactored all call
sites that used the functionality from the portability fix.
While doing this, I also simplified the monster of around ~100 lines of
file path checking --- lambda's are awesome' use them!
References:
- http://stackoverflow.com/a/1750710
- https://github.com/Project-OSRM/osrm-backend/wiki/Building-on-Ubuntu
- removes `noexcept` specifier as we can not guarantee for not throwing
- uses a namespace instead of a struct + static function combination
- asserts for heading degree in [0, 360] range (both sides inclusive!)
- header only since implementation does not hide anything
- adds `inline` specifier as compiler hint
This reverts @6b2bf49 on the server components.
We do not want to parallelize there, as node should be used for
parallelizing the user requests onto multiple processes.
This switches out the `<variant/optional.hpp>` implementation of the
optional monad to the one from Boost.
The following trick makes sure we keep compile times down:
- use `<boost/optional/optional_fwd.hpp>` to forward declare the
optional type in header, then include the full blown optional header
only in the implementation file.
- do the same for the files we touch, e.g. forward declare osmium types,
allowing us to remove the osmium header dependency from our headers:
`namespace osmium { class Relation; }
and then include the appropriate osmium headers in the implementation
file only. We should do this globally...
References:
- http://www.boost.org/doc/libs/1_59_0/libs/optional/doc/html/index.html
- https://github.com/osmcode/libosmium/issues/123
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.
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.
This provides a wrapper script to invoke the Static Analyzer on the code
base. The script simply wraps your commands, that is you have to do the
following:
..scripts/analyze cmake ..
..scripts/analyze cmake --build .
Note: the Static Analyzer is integrated in Xcode, so if you are on a
Mac, consider using Xcode natively instead of this wrapper script that
will only give you HTML output.
Reference:
- http://clang-analyzer.llvm.org/
Only specify the flags we change from the default.
doxygen -g Doxyfile
Generates a default Doxyfile.
Also, make the docs not depend on `dot`, but conditionally create graphs
if `dot` is available, and if not still generate docs.
Automate cucumber tests bisecting by providing a `git bisect` script.
Because it is stored in source control, but bisecting changes the HEAD,
it is advised to first copy over the script to a place outside source
control, e.g. `/tmp`.
Usage:
git bisect start HEAD HEAD~10
bit bisect run /tmp/bisect_cucumber.sh
This automatically configures and builds OSRM, spawns the cucumber tests
and communicates with `git bisect` based on its return code.
Reference:
- man git-bisect
This extends the compressed output vector's lifetime, as we issue an
asynchronous write operation that only receives a non-owning buffer to
the compressed data.
When the compressed output vector then goes out of scope, its destructor
is called and the data gets (potentially) destroyed. If the asynchronous
write happens afterwards, it's accessing data that is no longer there.
This is the reason for race conditions --- well, for undefined behavior
in general, but it manifests in the routed _sometimes_ not responding at
all.
The fix works like this: keep the compressed output associated with a
connection. Connections inherit from `std::enable_shared_from_this` and
issues a `shared_from_this()` call, passing a `std::shared_ptr` to the
asynchronous write function, thus extending their lifetime.
Connecitons thus manage their lifetime by themselves, extending it when
needed (and of course via the `std::shared_pointers` pointing to it).
Buffer's non owning property, from the `async_write` documentation:
> One or more buffers containing the data to be written. Although
> the buffers object may be copied as necessary, ownership of the
> underlying memory blocks is retained by the caller, which must
> guarantee that they remain valid until the handler is called.
Reference:
- http://www.boost.org/doc/libs/1_59_0/doc/html/boost_asio/reference/async_write/overload1.html
This caches iterators, i.e. especially the end iterator when possible.
The problem:
for (auto it = begin(seq); it != end(seq); ++it)
this has to call `end(seq)` on every iteration, since the compiler is
not able to reason about the call's site effects (to bad, huh).
Instead do it like this:
for (auto it = begin(seq), end = end(seq); it != end; ++it)
caching the end iterator.
Of course, still better would be:
for (auto&& each : seq)
if all you want is value semantics.
Why `auto&&` you may ask? Because it binds to everything and never copies!
Skim the referenced proposal (that was rejected, but nevertheless) for a
detailed explanation on range-based for loops and why `auto&&` is great.
Reference:
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3853.htm
Removes the pointless `std::unique_ptr<std::vector<T>>` usage,
as a `std::vector` already owns its resources and manages them.
Results in one indirection less (hint: good).
* 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
This is true:
-1 > 1u
because the integer literal `-1` is first converted to a large unsigned
value and then compared to the unsigned `1`.
This patch fixes several of those isses in the farthest insertion
algorithm.
`-Wsign-compare` catches those issues.
References:
- http://stackoverflow.com/a/5416498
- C++14 standard
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
Problem:
- old solution was slow
- depending on the result of TarjanSCC, new distance tables and new phantom node vectors were created to run tsp on it
Solution:
- dont create new distance tables and phantom node vectors
- pass an additional vector with the information which locations are in the same component and ignore all others
fix bug for scc split computation
add farthest insertion algorithm for round trip
farthest insertion: always add the node that add the biggest distance to the total route
farthest insertion: remove total distance computation and compute only diff instead
c43f8db Release v2.3.0
44c135f Update README to show dependencies used internally.
ece54cd Add external licenses.
908cd5f Updated change log.
96dbf0e Change %-escape in OPL format.
98f6e27 Change write benchmark to interleave reading and writing.
39620ce Make writing of metadata configurable for XML and OPL output.
e5a4e5e Add debug output format.
597390f Remove superfluous include and pragmas.
ecc57b0 Update pbf reader/writer to use new protozero functions.
5d1e8d2 Update protozero from upstream.
ef8746b Fix build on Windows.
ddba46f Remove superfluous include.
098c57f Add some paranoia checks to pbf reader.
0f804c2 Try building with newer boost library on travis.
6f79d63 Use explicit return types on lambdas.
355f3b1 New PBF reader and writer based on protozero.
71d719b Add pbf writing benchmark.
f014b4c Fix iwyu.sh script: Works now if build directory doesn't exist.
a0ace49 Use utf8cpp header-only lib instead of boost for utf8 decoding.
796f18e Bugfix: Reading large XML files could block.
5a2bcbe Replace strcmp by std::string comparison in test.
bc49e2c Bugfix: XML writer was not writing whitespace correctly.
61222f8 Fix 64bit byte swap.
e56f090 Fix new CRC code on OSX and Windows.
70229aa Add low-level building blocks that allow calculating CRC of OSM data.
0968a66 Remove assert checking for unset version.
62e0261 Refactor test case.
4bfc7fc Allow instantiating osmium::geom::GEOSFactory with existing GEOS factory.
e70af0c Remove calls to protobuf cleanup function im benchmarks and examples.
718518d Bugfix in OPL output. Relation member roles were not encoded.
759d5cb Rename parameter that had the same name as a type.
7054cab Provide (Typed)MemoryMapping constructors for backwards compatibility.
d09f5d1 Fix typo.
b4e578f Make memory mapping utility class more flexible.
633fa8e Travis build without sudo.
7ff23f1 Improved code setting file format from suffix/format argument.
90ef3b9 Remove some tests that didn't test much and failed on FreeBSD.
af86273 Add some pragmas to disable warnings for GCC.
efac7fd Fix some include problems found by IWYU.
79d2f4c Changed add_user() and add_role() in builders. Add add_member().
9375d00 Add function to set tags from ptr + length. Improve TagBuilder tests.
bafca20 Test helper: Use more const and have sub-builders in their own scope.
f73c993 Simplify code.
fee1710 Disable warning only when compiling with GCC.
74402f3 Merge pull request #98 from dforsi/master
2c4b449 Update to new upstream catch.hpp version.
1318732 Release v2.2.0
1873998 Add missing test.
2e5ea1d Do not add timestamp to html doc pages.
1b2ea89 Remove debug output.
0be9599 Improved parsing of ids, versions, uids, etc. from strings.
4308d80 Add second version of split_string utility function.
f18c9e5 Move part of pbf.hpp into new pbf_type_conv.hpp.
d201152 Use new DeltaEncode class in pbf writer.
e205610 Add DeltaEncode/DeltaDecode utility classes.
32905d6 Bugfix: Actually throw the exception we are creating...
d3e86d8 Add functions to convert item_type to zero-based index.
daddf07 Bugfix: Programs writing OSM files can stall up to a second after writing.
00b0247 Add function to set the id of a relation member.
f85316a Fix error message.
19bc6cc Fix name of travis install script.
719cd33 spatialite-bin package now available on travis
cb03821 Shorten long test string (MSVC doesn't like it).
c3440a6 Add BoolVector index class.
da08073 Add min_op/max_op utility functions.
411d112 AppVeyor.yml: new links for binary deps
7d9095f add test for badly formatted timestamps
a073f73 Add helper methods to DiffObject.
3b9819a Add GeoJSON factory using the RapidJSON library.
107bca5 Use a reference instead of a copy.
a6943a4 Mark a few variables that are not changing as const.
51b7e53 Improved error message for geometry exceptions.
5c37a13 Some minor spelling fixes
8ae5723 Bugfix: Dense location store was written out only partially.
5994322 Add support for tiles.
2168bac Add has_map_type() method to map factory.
a9634bd Add more tests for mercator projection.
3c13e4d Add functionality to create simple polygons from ways in geom factories.
e8c5bb1 Use uint64_t as counter, so there can be no overflows.
07fc9b9 libsparsehash-dev now in travis package whitelist
820e112 Add coverage support to CMake config.
5e9f943 Bugfix: Use the right include to really allow any input file type.
d4b48eb CMake: Make version string a cached variable.
e6baccb Add (c)begin/end functions to TypedMemoryMapping. Removed get_addr().
3e32710 Use size() from MemoryMapping in TypedMemoryMapping.
96390db Improve MemoryMapping class documentation.
60a6217 Do not round memory mapped files to page size boundaries.
4907cbe Bugfix: function name.
cac01d8 Use _filelengthi64 on Windows instead of fstat(2).
6a25bdf Windows: Put invalid parameter handler into wrapper class. Re-enable test.
110df9b Add invalid parameter handler on Windows to test.
549ed5f Disable some tests (to find which one fails on appveyor).
a5b8873 Use resize_file() in memory mapping test instead of ftruncate directly.
40e41d3 Use _chsize_s() instead of _chsize() on Windows.
048397e Refactoring: Use low-level util functions in DataFile.
6a033f9 Remove now unused Windows implementation of mmap.
3eccdbb Move dword_hi/lo functions into osmium::util namespace.
be7351b Remove unused code.
b859b18 Make dword_hi/lo functions inline.
2e3bc37 Simplify mmap_vector_base/anon/file.
f819cf3 Always map full pages. Make sure files behind mapping are large enough.
d0c84b6 Add some low-level helper functions for file system access.
62e8d91 Make DataFile constructor explicit.
fba684c Fix memory mapping test for windows.
78a7fd5 Add constructor to DataFile to create tmp file with given size.
f911893 Bugfix: typo.
1cf2739 Add AnonymousMemoryMapping class.
56eac30 Implement MemoryMapping::resize() function.
1a73262 Bugfix: Counter variables were too small.
1ade32c Fix include position.
b03aec3 Fixed some bugs in new DataFile class/tests.
f109534 Add DataFile utility class.
9ed3c43 Fix/cleanup some code.
4f326c9 Fix bug: Copy-and-paste error.
78a5b2f Use reinterpret_cast instead of static_cast to get HANDLE on Windows.
7baa318 Fix typo.
e669069 Make huge value even huger to see if code reliable fails then.
66137ad Improved documentation of MemoryMapping and TypedMemoryMapping classes.
3121393 Add TypedMemoryMapping class.
f45335e Default for get_addr() template type.
685bbaf Remove unused code from tests.
ce65bd4 Fix some issue with new MemoryMapping class.
e7b8e15 Added MemoryMapping wrapper class for mmap() and Windows equivalent.
6b1effe typo fixed
33d479d Refactored travis build.
4348522 Fix xml data test.
769b1e8 Bugfix: Better check for invalid locations.
bba7e68 Appveyor: Disable test failing because of missing dependency.
3d40dc7 Link with /debug on MSVC, add note about LNK4099 warnings.
5ef051f Appveyor: Disable header builds, add benchmarks.
ce7485e Reformat Appveyor config.
c60e505 use shallow clones for faster git fetch
3b18bca Travis cleanups.
b8dfac0 Cleanup travis build.
5f19838 Trying to fix travis gcc build...
d4255a4 Remove -Wno-return-type from recommended options.
5f1a41b Add dump_as_array() function to maps.
ff22f76 Add constructors and begin()/end() functions to VectorBasedSparseMultimap.
c7e05dd Bugfix: Make REGISTER_MAP() macro work when called several time with same name parameter.
abdc317 Bugfix: Mark cbegin() and cend() of mmap_vector_base as const functions.
d81d439 Add close() function to mmap_vector_base class.
d74cff2 Add function on Buffer to get iterator to specific offset.
git-subtree-dir: third_party/libosmium
git-subtree-split: c43f8db50d93912a8bec5cd9fea733f7fec05549
Note: this updates the subtrees immediately.
Discussion: would it make sense to do something along the lines of:
$ http --body https://api.github.com/repos/mapbox/variant/releases/latest | jq ".tag_name"
"v1.0"
And warn the user if the latest release tag is not the tag the update
script was called with. Or at least ask for confirmation?
Apply `clang-modernize` (based on Clang 3.6) transformations to the
codebase while making sure to support Clang>=3.4 and GCC>=4.8.
We apply the transformations in parallel to speed up the quite
time consuming process, and use our `clang-format` style file
to automatically format the code respecting our coding conventions.
We use the following self-explanatory transformations:
* AddOverride
* LoopConvert
* PassByValue
* ReplaceAutoPtr
* UseAuto
* UseNullptr
This required a `compile_commands.json` compilation database, e.g.
ccmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=1
for CMake or check Bear for a Makefile based solution (or even Ninja).
git ls-files -x '*.cpp|*.h' | \
xargs -I{} -P $(nproc) clang-modernize -p build -final-syntax-check -format -style=file -summary -for-compilers=clang-3.4,gcc-4.8 -include . -exclude third_party {}
Boom!
References:
* http://clang.llvm.org/extra/clang-modernize.html
* http://clang.llvm.org/extra/ModernizerUsage.html
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.
Please describe the issue you are seeing with OSRM.
Images are a good way to illustrate your problem.
**Note**: If your issue relates to the demo site (https://map.project-osrm.org) or routing provided on openstreetmap.org, be aware that they use separate [profile settings](https://github.com/fossgis-routing-server/cbf-routing-profiles) from those provided by default in `osrm-backend`.
If your issue relates to the demo site or openstreetmap.org behaviour, please check these profiles first to see if they explain the behaviour before creating an issue here.
# Steps to reproduce
Please provide the steps required to reproduce your problem.
- `osrm-backend` version being used
- OSM extract that was processed
- Processing commands (e.g. CH vs MLD processing)
- Server queries
If you're reporting an issue with https://map.project-osrm.org, please provide a link to the problematic request.
# Specifications
Please provide details of your development environment.
Everyone is invited to participate in Project OSRM’s open source projects and public discussions: we want to create a welcoming and friendly environment. Harassment of participants or other unethical and unprofessional behavior will not be tolerated in our spaces. The [Contributor Covenant](http://contributor-covenant.org) applies to all projects under the Project-OSRM organization and we ask that you please read [the full text](http://contributor-covenant.org/version/1/2/0/).
could check code format, modify a local repository and reject push due to unstaged formatting changes.
Also `pre-push` hook rejects direct pushes to `origin/master`.
⚠️ `scripts/format.sh` checks all local files that match `*.cpp` or `*.hpp` patterns.
In general changes that affect the API and/or increase the memory consumption need to be discussed first.
Often we don't include changes that would increase the memory consumption a lot if they are not generally usable (e.g. elevation data is a good example).
## Pull Request
Every pull-request that changes the API needs to update the docs in `docs/http.md` and add an entry to `CHANGELOG.md`.
Breaking changes need to have a BREAKING prefix. See the [releasing documentation](docs/releasing.md) on how this affects the version.
Early feedback is also important.
You will see that a lot of the PR have tags like `[not ready]` or `[wip]`.
We like to open PRs as soon as we are starting to work on something to make it visible to the rest of the team.
If your work is going in entirely the wrong direction, there is a good chance someone will pick up on this before it is too late.
Everyone is encouraged to read PRs of other people and give feedback.
For every significant code change we require a pull request review before it is merged.
If your pull request modifies the API this need to be signed of by a team discussion.
This means you will need to find another member of the team with commit access and request a review of your pull request.
Once your pull request is reviewed you can merge it! If you don't have commit access, ping someone that has commit access.
If you do have commit access there are in general two accepted styles to merging:
1. Make sure the branch is up to date with `master`. Run `git rebase master` to find out.
2. Once that is ensured you can either:
- Click the nice green merge button (for a non-fast-forward merge)
- Merge by hand using a fast-forward merge
Which merge you prefer is up to personal preference. In general it is recommended to use fast-forward merges because it creates a history that is sequential and easier to understand.
# Maintainer
## Doing a release
There is an in-depth guide around how to push out a release once it is ready [here](docs/releasing.md).
## The API
Changes to the API need to be discussed and signed off by the team. Breaking changes even more so than additive changes.
## Milestones
If a pull request or an issue is applicable for the current or next milestone, depends on the target version number.
Since we use semantic versioning we restrict breaking changes to major releases.
After a Release Candidate is released we usually don't change the API anymore if it is not critical.
Bigger code changes after a RC was released should also be avoided.
For instructions on how to [build](https://github.com/Project-OSRM/osrm-backend/wiki/Building-OSRM) and [run OSRM](https://github.com/Project-OSRM/osrm-backend/wiki/Running-OSRM), please consult [the Wiki](https://github.com/Project-OSRM/osrm-backend/wiki).
To quickly try OSRM use our [demo server](http://map.project-osrm.org) which comes with both the backend and a frontend on top.
To quickly try OSRM use our [free and daily updated online service](http://map.project-osrm.org)
For a quick introduction about how the road network is represented in OpenStreetMap and how to map specific road network features have a look at [the OSM wiki on routing](https://wiki.openstreetmap.org/wiki/Routing) or [this guide about mapping for navigation](https://web.archive.org/web/20221206013651/https://labs.mapbox.com/mapping/mapping-for-navigation/).
Related [Project-OSRM](https://github.com/Project-OSRM) repositories:
- [osrm-frontend](https://github.com/Project-OSRM/osrm-frontend) - User-facing frontend with map. The demo server runs this on top of the backend
- [osrm-text-instructions](https://github.com/Project-OSRM/osrm-text-instructions) - Text instructions from OSRM route response
- [osrm-backend-docker](https://github.com/project-osrm/osrm-backend/pkgs/container/osrm-backend) - Ready to use Docker images
## Documentation
## Documentation
See the Wiki's [server API documentation](https://github.com/Project-OSRM/osrm-backend/wiki/Server-api) as well as the [library API documentation](https://github.com/Project-OSRM/osrm-backend/wiki/Library-api)
### Full documentation
- [Hosted documentation](http://project-osrm.org)
- [osrm-routed HTTP API documentation](docs/http.md)
The easiest and quickest way to setup your own routing engine is to use Docker images we provide.
There are two pre-processing pipelines available:
- Contraction Hierarchies (CH)
- Multi-Level Dijkstra (MLD)
we recommend using MLD by default except for special use-cases such as very large distance matrices where CH is still a better fit for the time being.
In the following we explain the MLD pipeline.
If you want to use the CH pipeline instead replace `osrm-partition` and `osrm-customize` with a single `osrm-contract` and change the algorithm option for `osrm-routed` to `--algorithm ch`.
### Using Docker
We base our Docker images ([backend](https://github.com/Project-OSRM/osrm-backend/pkgs/container/osrm-backend), [frontend](https://hub.docker.com/r/osrm/osrm-frontend/)) on Debian and make sure they are as lightweight as possible. Older backend versions can be found on [Docker Hub](https://hub.docker.com/r/osrm/osrm-backend/).
Download OpenStreetMap extracts for example from [Geofabrik](http://download.geofabrik.de/)
The flag `-v "${PWD}:/data"` creates the directory `/data` inside the docker container and makes the current working directory `"${PWD}"` available there. The file `/data/berlin-latest.osm.pbf` inside the container is referring to `"${PWD}/berlin-latest.osm.pbf"` on the host.
Note there is no `berlin-latest.osrm` file, but multiple `berlin-latest.osrm.*` files, i.e. `berlin-latest.osrm` is not file path, but "base" path referring to set of files and there is an option to omit this `.osrm` suffix completely(e.g. `osrm-partition /data/berlin-latest`).
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY"Open Source Routing Machine (OSRM) is a high-performance routing engine. It combines sophisticated routing algorithms with the open and free data of the OpenStreetMap.")
message(STATUS"[Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set \$ENV{TBB_ARCH_PLATFORM} (using tbbvars.[bat|csh|sh]).")
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.