Commit Graph

141 Commits

Author SHA1 Message Date
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