Michael Krasnyk
2b00d92463
make annotations={true|false|(values)+} grammar
2017-02-10 16:11:24 +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
karenzshea
1e9e420d91
clang format
2017-02-07 09:15:16 +00:00
karenzshea
c885d03830
use lambda instead of bindy
2017-02-07 09:15:16 +00:00
karenzshea
3106b5dd9e
set RouteParameters annotations member, when constructor only specifies annotations_type, add unit_tests
2017-02-07 09:15:16 +00:00
karenzshea
f1427a834d
fix bitwise operators, selectively add annotations to response obj
2017-02-07 09:15:16 +00:00
karenzshea
04954de9c6
implement bitwise and operator
2017-02-07 09:15:16 +00:00
karenzshea
a6cd0863bc
store/accept individual annotations parameters in addition to bool
2017-02-07 09:15:16 +00:00
Patrick Niklaus
3cbac0f012
Revert "Smarter search radius formula for map matching"
...
This reverts commit b73c59088c
.
2016-12-21 22:41:48 -08:00
Patrick Niklaus
cc14fb8bff
Revert "Hardcode search radius parameters"
...
This reverts commit 2c9e18d5a9
.
2016-12-21 22:41:34 -08:00
Daniel J. Hofmann
b1f6797aab
Adds generate_hints=true
for dropping hints in response, resolves #1789 .
...
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.
2016-12-19 12:09:36 +01:00
Daniel Patterson
468d8c0031
Refactor logging, improve error handling workflow, clang-format. ( #3385 )
2016-12-06 12:30:46 -08:00
Daniel Patterson
928a6f0c7d
Variant got re-packaged, need to update search paths. ( #3392 )
2016-12-01 16:59:29 -08:00
Kerrick Staley
2c9e18d5a9
Hardcode search radius parameters
2016-11-17 17:56:23 +01:00
kerrick-lyft
b73c59088c
Smarter search radius formula for map matching
2016-11-17 17:56:23 +01:00
Kajari Ghosh
f33180f092
request polyline with precision of 5 or 6 positions ( #3220 )
2016-11-07 15:11:21 -05: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
Denis Koronchik
5da63998d6
Add support of custom ServiceHandler
2016-10-31 15:38:03 +01: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
Michael Krasnyk
543e4fb57d
Fix rounding issue in query coordinates by using toFixed
...
that internally uses boost::numeric_cast<std::int32_t>
instead of static_cast<std::int32_t>
2016-06-20 22:45:40 +02:00
Patrick Niklaus
6e16eab6ec
Format with clang-format 3.8
2016-05-27 21:05:04 +02:00
Patrick Niklaus
262354f733
Rename annotate to annotations
2016-05-26 23:35:11 +02:00
Mathias Gug
b9178bb8c7
Fix build on windows.
2016-05-18 19:13:18 +02:00
Mathias Gug
520b29d0d5
Use const for option. Include proper header files.
2016-05-18 19:13:18 +02:00
Mathias Gug
fe397e6953
Support SO_REUSEPORT option
...
so that multiple osrm-routed processes can bind to the same port.
2016-05-18 19:13:18 +02:00
Daniel Patterson
fa525ad610
Return an array with meta-data for each coordinate.
...
Currently supports duration and distance for each coordinate.
This is particularly useful in map-matching, comparing how
a trip progresses compared to a real GPS trace that is
map-matched.
2016-05-12 01:11:09 +02:00
Michael Krasnyk
e2e8104864
Addition to fix #2356
...
Updated unit tests for the Hint parser and
added emplacement of empty hints.
2016-05-07 09:47:32 +02:00
Patrick Niklaus
1bb88b374e
Make hint values optional, fixes issue 2356
2016-05-04 15:24:48 +02:00
Michael Krasnyk
5186b9490d
Fix syntax error position indicators in parameters queries
...
To fix #2193 prefix_length member variable has been added to ParsedURL
that is set to the length of "/service/version/profile/" prefix
when the prefix is accepted by the parser.
Also BOOST_FUSION_ADAPT_STRUCT for osrm::server::api::ParsedURL
has been moved from header to url_parser.cpp to speed up compilation
of CUs that do not use the fusion adaption.
2016-04-27 19:52:23 +02:00
Michael Krasnyk
dac2f93383
Refactoring of parameter garammars
...
* signature changed from void() to void(engine::api::Parameters&)
* performance increase due to use "static const GrammarT" and avoid
construction and destruction of grammars during parsing
* removed code duplication in inherited grammars
* rule unlimited changed to qi::lit
* added rule size_t_
* parser accepts "&geometries=" and "&overview=" and fails at "foo"
instead of "&geometries=foo" and &overview=foo
* added expectations checks for derived grammars
* changed rules qi::list(".") to character rules '.'
2016-04-23 21:15:21 +02:00
Patrick Niklaus
82df0ca766
Fix parser tests and destinations=all / sources=all
2016-04-22 11:01:15 +02:00
Patrick Niklaus
589767fe6d
uturns -> continue_straight
2016-04-12 23:16:02 +02:00
Daniel J. Hofmann
d6407e5095
Fixes regression introduced in 8ff8dc.
...
References:
- 8ff8dc7200
2016-04-12 21:12:08 +02:00
Patrick Niklaus
8ff8dc7200
Try ulong_long, requires ifdef
2016-04-12 18:11:08 +02:00
Daniel J. Hofmann
8a2bd09fd0
Adapts all grammars to use expectation parsers without backtracking.
...
Sequence parsers using `>>` allow for backtracking, expectation parsers
`>` do not. This allows us to properly report the position where parsing
failed, by catching the expectation_failure exception and adapting the
iterator ourselves.
References:
- https://github.com/Project-OSRM/osrm-backend/pull/2188
- https://github.com/Project-OSRM/osrm-backend/issues/2168
- http://www.boost.org/doc/libs/1_55_0/libs/spirit/doc/html/spirit/qi/reference/operator/expect.html
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
def89ac079
Conform to v5 spec and support "unlimited" as radiuses value.
...
Supersedes: https://github.com/Project-OSRM/osrm-backend/pull/2231
Thanks to Michael Krasnyk (@oxidase) for figuring out the reason for the
segfault earlier:
> https://github.com/Project-OSRM/osrm-backend/pull/2231#issuecomment-207114226
2016-04-08 21:03:50 +02:00
Michael Krasnyk
fe08726387
Fix BOOST_FUSION_ADAPT_STRUCT parameters for ParsedURL
...
Fix build error: macro "BOOST_FUSION_ADAPT_STRUCT" passed 5 arguments, but takes just 2
https://travis-ci.org/Project-OSRM/osrm-backend/builds/121406444
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
9bb4a68599
Fixes grammar includes and formats them
2016-04-08 21:03:50 +02:00
Michael Krasnyk
58ebadd7b3
Fix #2173 with a no_trailing_dot_policy
...
no_trailing_dot_policy rejects parsing exp, exp_n, nan, inf
and rejects parsing a fractional part if detects ".Fmt".
For Fmt = 'j', 's', 'o', 'n':
42.foo rule parses 42.
42.json rule parses 42
42..json rule parses 42.
Reference:
- https://github.com/Project-OSRM/osrm-backend/pull/2222#issuecomment-206206239
2016-04-08 21:03:50 +02:00
Michael Krasnyk
cae06ba2c1
Fix type "osrm::server::api::ParsedURL ()"
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
0274afa0f7
Allow 4.json and 4.3.json format; needs -lit(".") >> -lit("json") hack^Wworkaround
...
Rainer Deyke's workaround without the need to do ugly backtracking.
References:
- http://lists.boost.org/boost-users/2016/03/85960.php
- https://github.com/Project-OSRM/osrm-backend/issues/2173#issuecomment-204342785
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
d3dbca374d
Do not modify the end iterator for parameter parsing, too
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
6f0b6a8158
Re-factor URL parser: make grammar stateless
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
b25cd6aaf2
Moving from references is a bad idea in parameter parsers, too
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
891ff7dd80
Do not modify the end iterator, make const
2016-04-08 21:03:50 +02:00
Moritz Kobitzsch
dfd180a292
fixing unit tests
2016-04-08 11:21:14 +02:00
Daniel J. Hofmann
09931d7ad8
Removes server-side support for POST requests.
2016-04-05 22:59:14 +02:00
Patrick Niklaus
e10e8910f3
Use global uturns parameter.
...
Instead of previously per-via settings like uturns=true;false;true;; it
now only supports a global setting uturns=true.
2016-04-05 22:58:32 +02:00
Patrick Niklaus
5f457bff12
Rename alternative -> alternatives
2016-04-05 22:58:32 +02:00
Patrick Niklaus
a8fc95d4e4
Move bearing to public namespace
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
7c30ea32bf
Runs scripts/format.sh
2016-04-05 22:58:32 +02:00
Patrick Niklaus
58fb633df3
Add support for tile plugin
2016-04-05 22:58:32 +02:00
Patrick Niklaus
804816f014
Fix table parameter parsing
2016-04-05 22:58:32 +02:00
Patrick Niklaus
d9d4742130
First round of lat,lng -> lng,lat switcheroo
2016-04-05 22:58:32 +02:00
Patrick Niklaus
14c36bc405
Finish the nearest plugin
2016-04-05 22:58:32 +02:00
Patrick Niklaus
8378d95588
Add trip plugin
2016-04-05 22:58:32 +02:00
Patrick Niklaus
b34f9b1795
Hook up map matching
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
4d20dea271
Service skeletons for nearest, trip, match
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
c59647ad2f
Fix grammar constraint and enable all plugin links
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
e466cbe0ce
Plugin grammar skeletons
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
a24de2d22a
Enforce parameter and grammar type to catch subtle bugs
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
f452a3025d
Link parameters to grammars
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
3c58eaf49f
Require a BaseParameters type at compile time via enable_if
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
7bec75b709
Semantic action handler requires passing optional by value and fusion::vector2
2016-04-05 22:58:32 +02:00
Patrick Niklaus
56ea24b03b
Add tests for bearing parsing
2016-04-05 22:58:32 +02:00
Patrick Niklaus
277829c280
Add table service
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
c895848061
Optional<T> semantic action handler takes T argument
2016-04-05 22:58:32 +02:00
Patrick Niklaus
64e5ebb55f
Fix parameter parsing tests
2016-04-05 22:58:32 +02:00
Patrick Niklaus
f3e72623e9
Add viaroute suport for new API
2016-04-05 22:58:32 +02:00
Daniel J. Hofmann
b1c84b598f
Print the _local_ endpoint Boost ASIO assigns a port to, fixes #2097
2016-03-18 12:09:28 +01:00
Patrick Niklaus
0eaa393065
Limit tile zoomlevel to 12+
2016-03-02 19:59:49 +01:00
Daniel Patterson
6d749777fc
Using bind<T> in this case causes ambiguity with GCC 5.2.1 (see http://www.boost.org/doc/libs/develop/libs/bind/doc/html/bind.html#bind.faq.Q_forms ). Remove template and let the type be deduced automatically.
2016-03-02 09:54:08 -08:00
Daniel J. Hofmann
aeee565115
Formats all the files we touch..
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
karenzshea
f5c12ec433
comments
2016-01-29 23:49:09 +01: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
d9c281cd7c
Remove boost fusion dependency in RouteParameters
2016-01-26 22:57:02 +01:00
Daniel J. Hofmann
54a9173107
Make public RouteParameters header no longer depend on Spirit
...
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.
2016-01-26 22:57:02 +01:00
Patrick Niklaus
439eb9da3d
Create public facing libraries for extractor, contractor and datastore
...
New libraries libosrm_extract, libosrm_contract, libosrm_store
2016-01-21 06:47:34 +01:00
Daniel J. Hofmann
e7d9e42a16
Fix race condition in osrm-routed HTTP server
...
We had a similar issue a few month ago. Stumbled upon this by accident.
It goes like this:
- `output_buffer` is function-local
- we pass it to async_write and leave the scope
- `output_buffers` goes out of scope
- bad things happen, sometimes
The fix is to, again, put it inside the connection that handles itself
via the enable_shared_from_this idiom.
References:
- http://www.boost.org/doc/libs/1_59_0/doc/html/boost_asio/reference/async_write/overload1.html
- https://github.com/Project-OSRM/osrm-backend/pull/1690
2016-01-13 23:21:45 +01:00
Patrick Niklaus
6991a38703
Run clang-format
2016-01-08 01:31:57 +01:00
Patrick Niklaus
6b18e4f7e9
Add namespace around all files
2016-01-08 01:30:52 +01:00
Patrick Niklaus
b209952ce0
Fix naming of methodes for RouteParameters
2016-01-05 12:06:33 +01:00
Patrick Niklaus
028ca5c9d9
Apply clang-format
2016-01-05 12:04:04 +01:00
Daniel J. Hofmann
685d330ee2
Remove license headers from project source files; global license
2016-01-04 19:06:32 +01:00
Patrick Niklaus
97585bb26a
Fix include paths
2016-01-03 18:47:50 +01:00
Patrick Niklaus
bfc6c9b89d
Move files in src/ include/
2016-01-03 16:37:38 +01:00