Daniel Patterson
b62b09e5f6
Dump memory usage stats after partitioning.
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
b789da45bd
add unit tests for the different components of the parttion tool
2017-03-01 16:09:29 +00:00
Daniel J. Hofmann
e316dad1cb
No longer requires edges to have a .data member in static graph
...
some fixes to make branch compilable
Removes unneeded edge data from components search
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
786be6f570
Optimise Flow Algorithm/Datastructures in use
2017-03-01 16:09:29 +00:00
Daniel J. H
dd3f351874
Partitioner Improvements and Utils on top of #3603 ( #3611 )
...
* Implements Random Access Iterator Facade for EdgeIDIterator
* Makes StaticGraph Node and Edge requirements explicit
* Cleans up Bisection Graph, Node and Edge
* Cleans up GraphView
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
d56db500d3
Initial Skeleton for Recursive Bisection via Inertial Flow
2017-03-01 16:09:29 +00:00
Moritz Kobitzsch
6c3390f14d
refactor of post-processing
...
- 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)
2017-02-25 12:17:22 +00:00
Patrick Niklaus
438aa66b4c
Add packed storage of partition information
...
Right now we need a 64bit integer for every node in the graph.
Depending on the number of cells we will see, we might get away with
32bit eventually.
2017-02-24 15:58:47 +00:00
Patrick Niklaus
e06ffabf21
Add storage for cell weights used in the MLD algorithm
2017-02-20 16:31:36 +00:00
karenzshea
c2727f2029
expose data about turning onto restricted roads to turn function
2017-02-20 12:40:51 +00:00
Kajari Ghosh
2218658969
Trip with Fixed Start and End points (TFSE) ( #3408 )
...
* fixed start and end trip feature to trip service
2017-02-10 05:13:20 -05:00
Patrick Niklaus
bf690df97a
Merge branch 'minor_fixes' of https://github.com/seemoritz/osrm-backend into seemoritz-minor_fixes
2017-02-07 12:48:29 +00:00
Michael Krasnyk
6e1c4bfecd
Added indexed array data type with variable and fixed group blocks
2017-02-07 07:41:12 +00:00
Pepijn Schoen
9d2628b74f
Don't use bool return values on successful write, instead rely on exception throwing
2017-02-02 10:31:32 +01:00
Michael Krasnyk
c22ce3ae1f
Use shared memory region mapping at fixed address for OSX
2017-01-31 13:25:59 +01:00
Michael Krasnyk
25baf51a2c
Add duration to edges and use it in table plugin
2017-01-27 11:19:37 +01:00
Patrick Niklaus
279f8aabfb
Allow specifing a weight for routing that is independent of duration
2017-01-27 11:19:37 +01:00
Michael Krasnyk
337ecefa45
Added osrm-extract-conditionals tool
2017-01-24 10:31:59 +01:00
Michael Krasnyk
7961fa8863
Added conditional restrictions grammar
2017-01-24 10:31:59 +01:00
Michael Krasnyk
88eb9e5499
Added opening_hours grammar
2017-01-24 10:31:59 +01:00
Daniel J. Hofmann
c277b95f03
Implements Zero-Copy String Views onto Contiguous Memory, resolves #3265 .
...
- http://www.boost.org/doc/libs/1_61_0/libs/utility/doc/html/string_ref.html
- http://en.cppreference.com/w/cpp/string/basic_string_view
2017-01-23 15:22:39 +01:00
Michael Krasnyk
e8167b2e4e
Use round for float to fixed coordinate transformations
2017-01-20 12:31:45 +01:00
Michael Krasnyk
c03b230e84
Refactor ShMemIterator, resolves #3458
2017-01-19 15:30:18 +01:00
Moritz Kobitzsch
226ee62981
refactor graph contractor for readability
...
move to a dedicated dijkstra, separate code and header
reduce heap size, we don't use more than 2000 nodes, so why allocate 170k?
2017-01-18 15:03:15 +01:00
Daniel J. Hofmann
fce3bb180c
Provides OSRM_ASSERT_WITH_LOC macros for asserting with location, resolves #3533
2017-01-18 00:43:03 +01:00
Patrick Niklaus
104e23abf3
Restore --max-wait and file_lock for osrm-datastore
2017-01-14 01:14:29 +01:00
Moritz Seemann
f12fdeb23e
some comments for dynamic_graph.hpp
2017-01-13 11:12:02 +01:00
Moritz Seemann
f896aaf881
fix for DeallocatingVector::back
...
This method actually returned a reference to the one-past-the-last
element instead of the last element.
2017-01-13 11:12:02 +01:00
Michael Krasnyk
1d4d3b80b5
Fix possible division by zero by clamping latitude to 85.05°
...
Resolves #3530
2017-01-12 16:44:58 +01:00
Moritz Kobitzsch
c1f833c80f
fix forks exiting a ferry
2017-01-12 09:58:51 +01:00
Daniel Patterson
f7e8581a1b
Replace fingerprint with semver-based scheme. ( #3467 )
2017-01-06 13:45:08 -08:00
Daniel J. Hofmann
1153b78c06
Fixes various compiler diagnostics
...
Found with LLVM 3.9.1 and then fixed the most severe categories.
2017-01-06 16:47:52 +01:00
Daniel J. Hofmann
5100f2cc7b
Guards against no lanes for lanes left and right of turn, resolves #3518
2017-01-06 12:44:02 +01:00
Daniel J. Hofmann
559c88b36d
Adds runtime alignment assertions, see #3267
2017-01-05 16:27:53 +01:00
Moritz Kobitzsch
e6ff17ab2a
refactor merging of segregated roads
...
adjust to generalFindMaximum function
moved parallel detection to ratio/absolute based regression testing
considerably improved detection quality using normalised regression lines
only follow initial direction/narrow turns for parallel detection
2017-01-03 12:32:51 +01:00
Michael Krasnyk
8645d8c7fc
Make osrm::util::range a model of SinglePassRangeConcept
...
References:
- http://www.boost.org/doc/libs/1_63_0/libs/range/doc/html/range/concepts/single_pass_range.html
2017-01-03 10:22:03 +01:00
Moritz Kobitzsch
dff7fe214b
don't assign exit
in arrive when ending in roundabout
2016-12-21 17:48:23 +01:00
Michael Krasnyk
84b618ed1a
Add headers consistency check
2016-12-15 10:58:17 +01:00
Daniel J. Hofmann
6e7fe5feb0
Clean plate: luabind ripped out and sol2 basic integration
2016-12-15 10:55:16 +01:00
Daniel Patterson
3dfbf42e61
Don't mark all lanes as designated when there are blank lane specifiers in the tag.
2016-12-15 10:55:16 +01:00
Daniel Patterson
f88f51fd98
Log some memory usage statistics after preprocessing tasks.
2016-12-13 21:59:12 +01:00
Huyen Chau Nguyen
62f0e11bfa
assert that there is an open logger file when trying to log geojson output ( #3417 )
2016-12-09 14:58:20 +01:00
Moritz Kobitzsch
df3c39cef5
clean-up guidance code/code in general
...
removes duplicated includes
removes unused includes
eliminates dedicated toolkits that resulted in circular dependencies
moves functionality close to data, where possible
2016-12-07 12:10:56 +01:00
Daniel Patterson
468d8c0031
Refactor logging, improve error handling workflow, clang-format. ( #3385 )
2016-12-06 12:30:46 -08:00
Pepijn Schoen
6f4c6e84ae
Handle file output through a FileWriter, align interfaces for FileWriter and FileReader
2016-12-06 15:59:12 +01:00
Daniel J. Hofmann
949d505783
Removes access_restricted flag internally
2016-12-05 14:15:47 +01:00
Daniel Patterson
928a6f0c7d
Variant got re-packaged, need to update search paths. ( #3392 )
2016-12-01 16:59:29 -08:00
Moritz Kobitzsch
561b7cc58e
Rember Intersection Shapes
...
Changes the processing order in the edge based graph factory.
Instead of iterating over all outgoing edges in order, we compute the edge
expanded graph in the order of intersections.
This allows to remember intersection shapes and re-use them for all possible ingoing edges.
Also: use low accuracry mode for intersections degree 2 intersections
We can use lower accuracy here, since the `bearing`
after the turn is not as relevant for off-route detection.
Getting lost is near impossible here.
2016-12-01 15:24:20 +01:00
Daniel Patterson
5a311012af
Consolidate file reading through the new FileReader class/interface. ( #3321 )
2016-11-30 19:08:01 -08:00
Moritz Kobitzsch
12d58ace10
add support for junction=circular, allowing named circular junctions to be treated as rotaries
2016-11-29 13:44:32 +01:00
Michael Krasnyk
e343f71541
Refactor Hilbert values computation
2016-11-28 14:17:12 +01:00
Kajari Ghosh
fc52dd85fe
refactor graph_loader ( #3333 )
...
Refactors the GraphLoader class to use the safer FileReader wrapper for better error handling.
2016-11-21 17:32:00 -08:00
Daniel J. Hofmann
1b4779a58c
Avoids Shuffling Data Around for Nothing, closes 3306
2016-11-17 12:51:18 +01:00
Daniel J. H
73e365d398
Conditionally checks std::is_trivially_copyable only if available. ( #3327 )
2016-11-16 12:07:45 -08:00
Michael Krasnyk
d5bf508046
Fix alignments in shared facade via alignof/std::align
2016-11-16 18:20:19 +01:00
Daniel Patterson
eb12c16fd6
Output newlines for each progress indicator when not on a tty.
2016-11-15 18:14:05 -08:00
Daniel Patterson
53ef2e2955
Use an enum type for the 'should read fingerprint' flag, rather than a mysterious boolean
...
Fix tests.
2016-11-15 16:55:02 -08:00
Daniel Patterson
7b1131b982
Consolidate vector deserialization.
2016-11-15 16:55:02 -08:00
Daniel Patterson
2f9b5788d0
Destructor should fail hard if an exception is raised.
2016-11-15 16:55:02 -08:00
Daniel Patterson
4ad6d88888
Refactor file loading to use a common class that has proper error handling.
2016-11-15 16:55:02 -08:00
Daniel Patterson
e226b52f21
const-ify things, use RAII for file closure, and start to use io:: to read some stuff.
2016-11-15 16:55:02 -08:00
Daniel J. Hofmann
8f6dd805e5
Fixes ODR Violation in Graph Loader, closes #3308
2016-11-15 12:04:13 +01:00
Daniel J. Hofmann
7e4020c010
Allocates memory for the node info list upfront.
...
Turns out we were not doing this. Huh.
Callstack:
- 78583d2c8c/include/util/graph_loader.hpp (L65-L68)
- 538bbd47d1/src/extractor/extractor.cpp (L423-L424)
- 78583d2c8c/src/extractor/extractor.cpp (L465-L466)
- 78583d2c8c/src/extractor/extractor.cpp (L254-L261)
2016-11-15 00:06:52 +01:00
Moritz Kobitzsch
78583d2c8c
fix getTurnDirection, widen straight
range, adjust tests accordingly
2016-11-14 11:09:14 +01:00
Moritz Kobitzsch
f88ac989ea
reserve when possible
2016-11-11 14:48:50 +01:00
Daniel Patterson
af7960a796
Fix buffering of query box - it was shrinking in the Y axis, rather than growing.
2016-11-08 11:45:28 -08:00
Daniel Patterson
4c6d6aeaa7
Fix retrieval of forward/reverse data.
2016-11-08 11:45:27 -08:00
Moritz Kobitzsch
9c11f4231c
add locations feature to allow testing turn locations, fix minor bug breaking the arrival location
2016-11-08 13:42:15 +01:00
Moritz Kobitzsch
837ab105ad
fix error in ordering arguments for requiresNameAnnounced versions
2016-11-08 12:14:23 +01:00
Daniel J. Hofmann
6ac9617d49
Adapt test to returning ref, Take Pronunciation into Account, Fixes name change heuristic usage in UTurn check
2016-11-08 12:14:23 +01:00
Moritz Kobitzsch
cd03877c90
link ConnectedRoad and TurnOperation via class hierarchy
...
and empower intersection by adding basic functionality to pod type
refactor extractor/toolkit into intersection
2016-11-03 13:42:29 +01:00
Moritz Kobitzsch
4ba8ccfcce
add a geojson debugger that allows creating features for easy inspection
2016-11-02 14:54:00 +01:00
Patrick Niklaus
f02b7b0910
[skip ci] Fix formating using format.sh
2016-10-28 14:45:05 -07:00
Huyen Chau Nguyen
cf35bbeb50
refactor function names; consolidate readCount() functions;
...
remove templated types as much as possible for type safety;
add more comments;
clean up code, add const if possible;
2016-10-26 13:18:52 -07:00
Huyen Chau Nguyen
fe94977c9b
refactor loading code of .ramIndex files and move to io.hpp
2016-10-26 13:18:52 -07:00
Patrick Niklaus
b8795c7341
Rename increasingly inaccuratly named distance member of QueryEdge to weight
2016-10-21 21:00:02 +02:00
Moritz Kobitzsch
ecee13bffa
actually calculate distance instead of using .distance
which is a timing value
2016-10-20 12:27:02 +02:00
Moritz Kobitzsch
5e167b8745
Turn Angles in OSRM were computed using a lookahead of 10 meters.
...
This PR adds more advanced coordinate extraction, analysing the road
to detect offsets due to OSM way modelling.
In addition it improves the handling of bearings. Right now OSM reports
bearings simply based on the very first coordinate along a way.
With this PR, we store the bearings for a turn correctly, making the
bearings for turns correct.
2016-10-20 10:47:29 +02:00
Patrick Niklaus
b7ee38eca7
Refactored loading code for .hsgr file
2016-10-19 19:59:23 +02:00
Huyen Chau Nguyen
d0c142b9c7
remove util self-written make_unique and use C++14 stdlib make_uniqe
2016-10-17 15:27:14 -07:00
karenzshea
72fa35da10
add a toolkit function to find lanes to the left/right of turn lanes
2016-10-13 17:59:25 +02:00
Daniel J. Hofmann
d964b81308
Silence static visitor upstream deprecation warnings.
2016-10-06 21:08:48 +02:00
Lauren Budorick
a75e16e26b
Deduplicate foward/reverse geometries
...
Changes the internal representation of compressed geometries to be a
single array shared between forward and reverse geometries that can be
read in either direction. Includes a change on
extractor::OriginalEdgeData to store via_geometry ids that indicate
which direction to read the geometry for that edge based edge.
Closes #2592
2016-10-06 10:09:57 -07:00
Moritz Kobitzsch
73179641b1
clang-format code
2016-10-06 14:06:19 +02:00
Moritz Kobitzsch
d1f1358e48
adjust for comments by daniel-j-h
2016-09-30 17:27:14 +02:00
Daniel Patterson
805d93912d
Construct an adjacency list in order to discover turns.
2016-09-30 17:12:23 +02:00
Daniel Patterson
c8eb2b2d11
Refactor edge unpacking so that it's CH indepenent and we don't repeat ourselves so much.
2016-09-30 17:12:22 +02:00
Lauren Budorick
14e7460465
Include turn information in debug tiles.
2016-09-30 17:12:20 +02:00
Daniel J. Hofmann
d1f555dcef
Removes unused JSON logger.
...
References:
- https://github.com/Project-OSRM/osrm-backend/pull/2769
2016-09-28 10:01:56 +02:00
Daniel J. Hofmann
60010dd998
Reduce NewName Instructructions / Name Changes
...
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.
2016-09-21 12:42:39 +02:00
Moritz Kobitzsch
861314256e
fix roundabout-intersection on immediate exit
2016-09-13 19:16:45 +02:00
Daniel J. Hofmann
e3a38a6b0d
Fixes compilation against newer Boost versions; seems like we were lucky before; closes #2889
2016-09-09 16:14:25 +02:00
Daniel J. Hofmann
a289e1cd96
Fixes bearing range of zero exhaustive graph traversal
2016-09-08 17:33:50 +02:00
Moritz Kobitzsch
9123c93a90
fix interaction between sliproads/segregated intersections
2016-09-07 12:36:29 +02:00
Moritz Kobitzsch
a551286a8f
adjust testscases for collapse of use lane
2016-09-07 12:17:36 +02:00
Daniel J. Hofmann
86fd04e556
Improves lane handling for subsequent going straight, resolves #2625
...
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
2016-09-07 12:17:36 +02:00
Moritz Kobitzsch
b6dbf81206
don't assign lanes on delayed turns
2016-09-07 12:17:34 +02:00
Moritz Kobitzsch
3b81b39998
turn lane handler moved to scenario based handling
2016-09-07 12:16:59 +02:00
Daniel J. Hofmann
8b144f22c9
Exposes osrm::exception for client usage, resolves #2813
2016-09-01 09:12:35 +02:00
Moritz Kobitzsch
d06eec5e42
improve segregated road detection
2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
6a2518c0df
handle stronger merge cases as well
2016-08-24 10:34:07 +02:00
Moritz Kobitzsch
7886d06839
adjust angles pre-merge as well
2016-08-24 10:34:07 +02:00
Daniel J. Hofmann
7f71f0ed12
Warn on unused return values in guidance code, resolves #2686 .
...
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.
2016-08-03 12:26:07 +02:00
Daniel J. Hofmann
b24f5c7c1a
Adapt lane dump to lanes at intersection ( #2675 ), resolves #2709
2016-08-03 12:19:14 +02:00
Moritz Kobitzsch
0d36d472c9
change paradigm of merge to only emit on motorway-like roads
2016-07-30 23:55:39 +02:00
Daniel Patterson
280b000f07
Include datasources for each segment in route annotation.
2016-07-27 15:51:11 -07:00
Patrick Niklaus
c7a1576100
Apply clang-format again
2016-07-26 15:00:58 +02:00
Daniel Patterson
0b868969be
Remove generic std::exception handlers, they don't seem to be adding value, and they hide useful info.
2016-07-26 11:43:08 +02:00
Moritz Kobitzsch
1fc63e1e72
move hardcoded road priorities into profiles, change road classification
2016-07-25 13:07:54 +02:00
Moritz Kobitzsch
ee47afbe17
fix 2672
2016-07-19 17:06:47 +02:00
Daniel J. Hofmann
abde215bc3
Remove semantically wrong ordering for LaneTupel
2016-07-18 12:33:56 +02:00
Daniel J. Hofmann
e76e39a398
Improves Lane Handling for Multi-Hop Roundabout Instruction
...
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
2016-07-13 10:44:12 +02:00
Moritz Kobitzsch
0e4061f858
deduplicate code for roundabout handling
2016-07-01 11:34:44 +02:00
Daniel Patterson
ec02cdc4cc
Use mmap instead of read - it's a lot faster here.
...
Also clean up construction of STRONG_TYPEDEF so that it can be
packed properly in structs (this explains all the () -> {}) changes
here.
2016-06-27 17:24:30 -07:00
Moritz Kobitzsch
5905708111
expose lanes as enums, adjusted for comments
2016-06-27 11:12:02 +02:00
Moritz Kobitzsch
5d91b759d1
Implement Turn Lane Api
2016-06-27 10:07:48 +02:00
Daniel J. Hofmann
ec0a1a4ab1
Anticipate Lane Changes
2016-06-27 10:07:43 +02:00
Moritz Kobitzsch
efa29edf09
basic turn lane handling
2016-06-27 10:07:41 +02:00
Daniel J. Hofmann
df877aca1b
Hard-abort on assertion and show detailed information, solves #2579
...
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
2016-06-23 18:57:35 +02:00
Patrick Niklaus
fddc19e98d
Fix regressed formating
2016-06-21 22:25:48 +02:00
Michael Krasnyk
12d4832037
Fix platform-independent data in data files
2016-06-20 22:45:40 +02:00
Patrick Niklaus
e9a0beb4e8
Fix shared memory encoding for node-ids
2016-06-12 20:50:57 +02:00
Moritz Kobitzsch
312e86eb58
handle merge on collapsed instructions
2016-06-06 11:55:14 +02:00
Daniel J. Hofmann
801cc72691
Sync with Clang38 Format
2016-06-02 14:43:27 +02:00
Lauren Budorick
058b8c3b31
Template vector
2016-06-02 14:27:25 +02:00
Lauren Budorick
ae3ccb009e
Formatting [ci skip]
2016-06-02 14:27:25 +02:00
Lauren Budorick
0c60a2aef8
Minor cleanups + comments
2016-06-02 14:27:25 +02:00
Lauren Budorick
44fdf86702
IT WORKS
2016-06-02 14:27:25 +02:00
Lauren Budorick
1659bbf7b1
Refining packed_vector.hpp
...
* Rename to std::vector-like APIs (push_back, at)
* Add size, reserve, capacity methods
2016-06-02 14:27:25 +02:00
Lauren Budorick
46b58fba83
Packed vector cleanups and unit test
2016-06-02 14:27:25 +02:00
Lauren Budorick
84da86ba4a
Add packed vector sketch
2016-06-02 14:27:25 +02:00
Moritz Kobitzsch
bdc66049a5
fix INVALID_NAME_ID vs INVALID_NAMEID -> EMPTY_NAMEID
2016-06-01 23:19:26 +02:00
Michael Krasnyk
25d3c4b843
Updated change log and adjusted format
2016-05-29 07:39:49 +02:00
Michael Krasnyk
371c06d66d
Change size of QueryCandidate from 32 to 24 bytes
2016-05-29 07:39:49 +02:00
Michael Krasnyk
3e5c978719
Reduce ramIndex file size
...
PR #2472 : the bottom-most node of the r-tree contains
only a single index to a leaf node, so out of 532 bytes
only 4 are used.
2016-05-29 07:39:49 +02:00
Michael Krasnyk
843f1a6356
Set LeafNode alignment to LEAF_PAGE_SIZE bytes
...
References:
- https://github.com/Project-OSRM/osrm-backend/pull/2348#issuecomment-219804408
- http://stackoverflow.com/questions/15523537/alignas-specifier-vs-attribute-aligned-c11
- http://stackoverflow.com/questions/7895869/cross-platform-alignx-macro
2016-05-29 07:39:49 +02:00
Patrick Niklaus
6e16eab6ec
Format with clang-format 3.8
2016-05-27 21:05:04 +02:00
Daniel Patterson
3d03797e53
Distinguish between offramps and sliproads.
2016-05-26 21:31:04 +02:00
Patrick Niklaus
089e60fa1e
Remove obsolete timer code
2016-05-26 20:25:33 +02:00
Michael Krasnyk
b5225f07cb
Fix #2413 by converting enums to unsigned char constants
2016-05-23 18:33:24 +02:00
Patrick Niklaus
57321979ae
Remove leftover debugging code
2016-05-19 16:44:31 +02:00
Patrick Niklaus
95af72c70c
Make intersection backwards compatible
...
For `depart` and `arrive` `step.intersections[0].{bearings|entry}` will have
only one entry.
2016-05-19 16:44:31 +02:00
Moritz Kobitzsch
4d9aa65e78
intersection classes with variable degree of discretization
2016-05-19 16:44:31 +02:00
Moritz Kobitzsch
0f3942558f
version using discrete values stored directly at intersection
2016-05-19 16:43:46 +02:00
Moritz Kobitzsch
ba074b0116
initial version of intersection classification
2016-05-19 16:43:46 +02:00
Michael Krasnyk
508c205d35
Refactoring of iso_8601_grammar
...
* formats 'hh:mm:ss' and ISO 8601 are merged into one grammar.
* iso_8601_grammar is changed to static const.
* iso_8601_grammar supports formats P[n]DT[n]H[n]M[n]S, P[n]W,
and part of alternative PTHHMMSS and extended PTHH:MM:SS formats.
2016-05-17 00:39:32 +02:00
Michael Krasnyk
3bbd3a8a65
Remove latitude rounding in yToLat
2016-05-16 00:53:33 +02:00
Michael Krasnyk
24a75d37fb
Approximate inverse Gudermannian function by a Padé approximant
2016-05-08 06:00:21 +02:00
Michael Krasnyk
7e80dae59b
Fix MSVS build.
2016-05-08 06:00:21 +02:00
Patrick Niklaus
7564633045
Update SearchInBox to not copy TreeNode
2016-05-07 23:52:11 +02:00
Patrick Niklaus
7174c5d036
Make StaticRTree and facades const
2016-05-07 23:52:11 +02:00
Patrick Niklaus
ddd128ce0e
Only use const-ref for coordinate vector
2016-05-07 23:52:11 +02:00
Michael Krasnyk
2acde49f0f
Make LeafNode aligned to memory pages.
...
Changes:
* LeafNode is aligned to LEAF_PAGE_SIZE.
Alignment brings 24 bytes memory overhead for 4096, but reduces
cache misses rate.
* Unused m_element_count from leaf nodes file.
The size is computed as m_leaves_region.size() / LEAF_PAGE_SIZE.
* Added try/catch for mmap exceptions messages.
2016-05-07 23:52:11 +02:00
Michael Krasnyk
8849015bbf
Fix construct_multiple_levels_test
...
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
2016-05-07 23:52:11 +02:00
Michael Krasnyk
70cd7a94ec
Fix memory mapping "Invalid argument" exception.
2016-05-07 23:52:11 +02:00
Patrick Niklaus
3984dea34b
Use mmap in StaticRTree
2016-05-07 23:52:11 +02:00
Patrick Niklaus
b11b471aa4
Move LoadLeafFromDisk to return by value
2016-05-07 23:52:11 +02:00
Patrick Niklaus
63754df4d4
Add cache for CandidateSegments to reduce heap worke even more
2016-05-07 23:52:11 +02:00
Patrick Niklaus
e644424508
Only save TreeNode index in search tree x3 speedup
2016-05-07 23:52:11 +02:00
Michael Krasnyk
c87ae5612a
Fix #2362 by using generic path strings
...
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.".
2016-05-05 12:10:45 +02:00
Patrick Niklaus
c32270b2b8
Make projectOnLine inline-able
2016-05-02 19:53:05 +02:00
Patrick Niklaus
cc03402570
Use pass-by-copy for Coordinate
2016-05-02 19:51:32 +02:00
Patrick Niklaus
21a76f1867
Move coordinate constructors to header to enable inlining
2016-05-02 19:50:52 +02:00
Patrick Niklaus
d12a95b4ef
Fix naming convention of Percent
2016-05-02 17:25:58 +02:00
Patrick Niklaus
64307ea882
Add missing headers and remove dead code
2016-04-29 20:02:08 +02:00
Moritz Kobitzsch
1544a08ea2
introduce roundabout-turns into instruction set
2016-04-27 12:13:42 +02:00
Michael Krasnyk
4363fd64c4
Fix for PhantomNode packing in MSVC
...
Changed bool to uint32_t in bit fields to have 4-byte packings for 32 bits:
"c++ compilers will allocate bit-fields in memory as follows:
several consecutive bit-field members of the same type will
be allocated sequentially. As soon as a new type needs to be allocated,
it will be aligned with the beginning of the next logical memory block."
References:
- https://msdn.microsoft.com/en-us/library/ewwyfdbe.aspx
- http://stackoverflow.com/questions/308364/c-bitfield-packing-with-bools/308383#308383
2016-04-24 14:06:48 +02:00
Patrick Niklaus
6979763292
Refactor the vector tile constants
2016-04-15 14:48:21 +02:00
Moritz Kobitzsch
ae45ad1ad2
fix r-tree abort location
2016-04-14 11:40:36 +02:00
Daniel J. Hofmann
bf2ab3d8af
One-Definition-Rule violation in viewport
2016-04-12 12:17:52 +02:00
Patrick Niklaus
5052c4ae3a
Move projection function into own header and inline
2016-04-09 17:31:36 +02:00
Patrick Niklaus
67834def5f
Switch to uint64 for distance measurements in StaticRTree
2016-04-09 17:26:27 +02:00
Patrick Niklaus
c51ffeb65a
Switch StaticRTree leaf size to 256 elements per leaf
...
This increses query performance dramatically for queries with a lot of
coordinates. However it increases the internal memory usage of the
StaticRTree also 4x.
2016-04-09 17:26:27 +02:00
Patrick Niklaus
68ee4eab61
Switch squaredEuclideanDistance to uint64_t
2016-04-09 01:38:22 +02:00
Moritz Kobitzsch
dfd180a292
fixing unit tests
2016-04-08 11:21:14 +02:00
Moritz Kobitzsch
fa0a5040e5
adding tests for guidance
2016-04-08 10:43:22 +02:00
Moritz Kobitzsch
f2443c64db
adds distinction between rotaries/rounabouts
2016-04-05 22:59:14 +02:00
Patrick Niklaus
6e50b5fc60
Filter segments correctly by bounding box
2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
c6c25e609b
Initial libosrm API docs
2016-04-05 22:59:14 +02:00
Patrick Niklaus
30a9bc3179
Fix mathematical assumptions in StaticRTree
...
StaticRTree now uses projected coordinates internally. That means we can
use a euclidean distance measure (squared distance) for sorting the
query queue.
2016-04-05 22:59:14 +02:00
Patrick Niklaus
fda4656630
Implement re-enabling of PhantomNode directions after bearing filtering
2016-04-05 22:59:14 +02:00
Patrick Niklaus
5829bbe22d
Move Centroid to coordinate_calculation
2016-04-05 22:59:14 +02:00
Patrick Niklaus
a964bec0f8
Add route fixture test
2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
df608e8b43
Makes switching between floating and fixed coordinates safe wrt. overflows
2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
8e477437a6
Makes viewport immune to inf and nans
2016-04-05 22:59:14 +02:00
Patrick Niklaus
cb8bfa027e
Only allow to specify the common base path
2016-04-05 22:58:32 +02:00
Patrick Niklaus
38db495879
Address PR comments
...
Renamed lua_function_exists and removes unused print function
2016-04-05 22:58:32 +02:00
Patrick Niklaus
a781c36876
Use uturn default from .properties file
2016-04-05 22:58:32 +02:00
Patrick Niklaus
879ccfc8c2
Implement viewport code to fix simplification
...
This fixes #2083
2016-04-05 22:58:32 +02:00
Patrick Niklaus
50738f8ce0
Consolidate math functions
2016-04-05 22:58:32 +02:00
Patrick Niklaus
5c01878542
get_name_for_id -> GetNameForID
2016-04-05 22:58:32 +02:00
Moritz Kobitzsch
0cc23dec6f
restructured to only return valid turns to the outside + cleanup
2016-04-05 22:58:32 +02:00
Moritz Kobitzsch
71c0d5253d
less new names, forks consider road classes, api clean-up
2016-04-05 22:58:32 +02:00
Daniel Patterson
11b356e55f
Enables the use of multiple segment-speed-files on the osrm-contract
...
command line, and exposes the file name used for each edge in the debug
tiles.
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
298f68c966
Adds the license preamble for all publicly installed eaders, closes #2036
2016-04-05 22:58:32 +02:00
Patrick Niklaus
6c00ccca9a
Remove obsolete debug information
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
7c30ea32bf
Runs scripts/format.sh
2016-04-05 22:58:32 +02:00
Patrick Niklaus
b08b360f38
Big Restructuring / Cleanup
2016-04-05 22:58:32 +02:00
Moritz Kobitzsch
f1aa03c360
handle segregated roads (merge for turn analysis)
2016-04-05 22:58:32 +02:00
Moritz Kobitzsch
2ba417cf9f
structural changes, motorway handling
2016-04-05 22:58:32 +02:00
Moritz Kobitzsch
d8af074ff6
enter and exit roundabout feature - currently not showing turn
2016-04-05 22:58:32 +02:00
Moritz Kobitzsch
ef1e0e14ec
advanced guidance on 5.0
2016-04-05 22:58:32 +02:00
Patrick Niklaus
58fb633df3
Add support for tile plugin
2016-04-05 22:58:32 +02:00
Patrick Niklaus
72094acf74
Change stream operator of strong typedef
2016-04-05 22:58:32 +02:00
Patrick Niklaus
30101e129f
Add stream operator to Rectangle
2016-04-05 22:58:32 +02:00
Patrick Niklaus
9bb31678a6
Add euclideanDistance to coordinate_calculation
2016-04-05 22:58:32 +02:00
Patrick Niklaus
d9d4742130
First round of lat,lng -> lng,lat switcheroo
2016-04-05 22:58:32 +02:00
Dane Springmeyer
c8457a2619
Fix compile on OS X
2016-04-05 22:58:32 +02:00
Patrick Niklaus
35b098e656
First compiling version of map_match plugin
2016-04-05 22:58:32 +02:00
Patrick Niklaus
f3e72623e9
Add viaroute suport for new API
2016-04-05 22:58:32 +02:00
bergwerkgis
d0636a9f6d
make AppVeyor work again
2016-03-31 16:49:30 +02:00
Daniel J. Hofmann
655dd2277c
Eliminate extra semicola
2016-03-15 11:47:57 +01:00
Daniel J. Hofmann
ac0279aa83
RAII for auto-closing file streams
...
Small fixes I didn't want to include in unrelated PRs.
There are a few left in `storage.cpp` but since it's a single function
in 600 lines of code, I didn't want to touch the mess. The others are
safe to remove, cucumber and test run on Finland gives 👍 .
2016-03-09 17:46:02 +01:00
Daniel Patterson
49441fe204
Make forward/reverse weight/offset calculated at query time,
...
rather than being cached in the StaticRTree. This means we
can freely apply traffic data and not have stale values lying
around. It reduces the size of the RTree on disk, at the expense
of some additional data in RAM.
2016-03-03 10:49:12 -08:00
Daniel J. Hofmann
66cadac6b6
Explicitly std:: prefix fixed integral types in static rtree header
2016-03-01 23:51:26 +01:00
Daniel J. Hofmann
c237c5353b
Explicitly std:: prefix fixed integral types in rectangle header
2016-03-01 23:51:26 +01:00
Daniel J. Hofmann
c27a7e087f
Fixes rectangle header includes
2016-03-01 23:51:26 +01:00
Daniel J. Hofmann
0894590a96
Fixes default declared ctor in Buffer
2016-03-01 23:51:26 +01:00
Daniel J. Hofmann
aeee565115
Formats all the files we touch..
2016-03-01 23:51:25 +01:00
Daniel Patterson
56e35e8ef2
Remove GeoJSON based debugging output, we can now generate vector tiles with roughly the same data on-the-fly.
2016-03-01 23:51:25 +01:00
Daniel Patterson
26453af1b9
Add a distinct Buffer type for encoding binary data in JSON responses. Treated like a string, but allows other consumers (a-la node-osrm) to recognize and not break string encodings.
2016-03-01 23:51:25 +01:00
Daniel Patterson
5dc7b79bb6
Implements a vector tileserver so you can see what's going on inside
...
OSRM.
2016-03-01 23:51:25 +01:00
Patrick Niklaus
a0b4fcc05a
Remove last bits of GPX support code
2016-03-01 23:44:07 +01:00
Daniel J. Hofmann
47d56676f1
Don't bounds check by default in static rtree; fixes #1988
2016-02-17 18:20:27 -08:00
karenzshea
b80e96547e
remove ini parsing
2016-02-16 18:43:06 +01:00
Daniel Patterson
65183e94c6
Use \n instead of std::endl to avoid unnecessary flushing. Cleanup some newlines to avoid blank lines in debug output.
2016-02-15 14:21:18 -08:00
Daniel Patterson
6b0fe683c9
Expose the base type. Going via the operator<< leaves us with invalid geojson.
2016-02-15 13:25:55 -08:00
Daniel J. Hofmann
a6d406d2c3
Fix headers for JSON abstractions
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
4b8c0ac143
Revert "Folds json_* utilities into json subfolder and adapts includes"
...
This reverts commit cd039c69c0a92a35889e3c875b8eb53cf07377bb.
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
ec01c2a119
Folds json_* utilities into json subfolder and adapts includes
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
fbef77a942
Documents why not to use boost::irange in favor of our hand-written irange
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
f207d988f4
Removes floating point epsilon comparator
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
60fc486cea
Prefix exception header guard with osrm prefix
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
ef171f3acd
Properly use typed math constants instead of impl. specific hacks
...
PI is not in the stdlib, neither is 1/pi, pi*2 and so on. Instead
of relying on implementations providing these, use properly typed
math constants.
Main benefits:
- portable and
- returns constexpr, for compile-time computation
References:
- http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/math_toolkit/constants_intro.html
- http://www.boost.org/doc/libs/1_60_0/libs/math/doc/html/math_toolkit/constants.html
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
64b36807d3
Transforms osrm_exception to exception
2016-02-12 15:46:24 -08:00
Daniel J. Hofmann
5de8f1803c
Folds mercator projections into coordinate_calculation
2016-02-12 15:46:24 -08:00
karenzshea
7398bed974
Include real coordinates in debug geojson mode
2016-02-11 17:09:20 -05:00
Dane Springmeyer
2949a52a11
remove uneeded and deprecated usage of mapbox::util::static_visitor
2016-02-10 12:58:36 -08:00
Daniel J. Hofmann
b8d20dfe99
Prevent undefined behavior from left shifting into sign bit when offset is 31
2016-02-08 11:47:44 -08:00
Daniel J. Hofmann
fa8529949b
Make swap noexcept (as it has to be!) and fix swap misuses
2016-02-08 11:47:44 -08:00
Daniel J. Hofmann
7b37c847bd
Fixes shared memory wrapper includes
2016-02-08 11:47:02 -08:00
Kerrick Staley
8804330d83
Add operator<< to OSRM_STRONG_TYPEDEF
...
Useful for debugging.
2016-02-01 12:32:30 -08:00
karenzshea
262cdd7bc0
move tribool obj into request_parser
2016-01-29 23:49:09 +01:00
Daniel J. Hofmann
a48f02e0da
Takes care of proper special member generation globally, fixes #1689
...
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.
2016-01-27 17:25:30 +01:00
Patrick Niklaus
0802804677
Fix PR comments
2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
38e8a90f4e
Make HilbertCode a free standing function
2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
d391df52ba
Be kind to the optimizer, pass coordinates by value (just two ints)
2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
46fc6f8da4
Collapse computeAngle into coordinate calculation
2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
312b414d8f
Adapts XORFastHashStorage to XORFastHash compile time limits
2016-01-26 17:54:08 +01:00
Daniel J. Hofmann
a6e7954128
Make XORFastHash's number of hashable elements compile time constant
...
Still constraint by the usage of uint32_t and subsequent splitting into
two uint16_t we use for indexing into the tables.
2016-01-26 17:54:08 +01:00