Patrick Niklaus
61f015eef6
Fix match plugin status codes
2015-11-25 00:27:20 +01:00
Patrick Niklaus
420369fe13
Fix off-by-one in via_indices
2015-11-24 21:05:18 +01:00
Patrick Niklaus
543e77b9be
Add pre-turn bearing as last field to instruction
2015-11-20 16:06:33 +01:00
Daniel Patterson
8f3482561b
Rename great_circle_distance->haversine_distance, and euclidean_distance->great_circle_distance, because that's what they actually are.
2015-11-17 17:10:06 -05:00
Daniel J. Hofmann
17d8e65c64
Silence unused variable warnings
2015-09-30 18:20:00 +02:00
Daniel J. Hofmann
f9f0ffb64d
Remove hand written conversion code and replace with stdlib features.
...
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/
2015-09-29 16:15:54 +02:00
Daniel Patterson
a6b44a1470
Revert alternative instructions array nesting to previous behaviour.
2015-09-17 09:06:51 -07:00
Andreas Gruß
de29574314
tests + instructions for map matching
2015-09-11 01:34:10 +02:00
Patrick Niklaus
49adf2192a
Move calculate_coordinate to algorithms/
...
Fixes #1367
2015-08-12 13:02:18 +02:00
Patrick Niklaus
9967dbbaa9
Don't remove small segments at start/begin if they are vias
2015-06-02 17:51:17 +02:00
Patrick Niklaus
02b561edd2
Pass route leg by reference, not by value
2015-03-17 23:24:31 +01:00
Dennis Luxen
51e42ded44
- output only get escaped when actually output. Better seperation of functionality
...
- refactor facade::GetEscapeName() into get_name_for_id() call that is implemented in subclasses
- remove dead code
- fix failing tests where names got double-escaped
- fixes https://github.com/Project-OSRM/node-osrm/issues/83
2015-02-26 10:11:33 +01:00
Dennis Luxen
3bd27ae8c5
change copyright line from personal names to project
2015-02-19 09:19:51 +01:00
Dennis Luxen
79b9bdf7ce
rename JSON namespace to osrm::json to avoid namespace clash with V8
2015-02-18 17:27:31 +01:00
Dennis Luxen
45838b33b7
avoid implicit conversion to int
2015-02-12 15:40:55 +01:00
Dennis Luxen
a81542eeee
add virtual keyword to functions with override final specifiers
2015-02-10 10:07:35 +01:00
Dennis Luxen
85d8e0ac2c
minor reformat
2015-02-09 09:21:44 +01:00
Dennis Luxen
2a8084b6c6
clean up derived classed and their functions to correctly use final keyword:
...
functions marked as final need to be marked virtual. use override specifier to do so
2015-01-28 12:03:21 +01:00
Dennis Luxen
b20b7e65bf
renamed: Util/* -> util/*
2015-01-27 17:47:23 +01:00
Dennis Luxen
1c2c87e03d
fix boundary edge case
2015-01-23 13:52:44 +01:00
Dennis Luxen
93b33c0518
fix cast to be explicit
2015-01-23 13:52:28 +01:00
Dennis Luxen
53e01952be
replace for loops with counters by range-based for loops
2015-01-23 12:19:01 +01:00
Dennis Luxen
1c12b468a8
replace for loop with hand-rolled pair-wise traverse of container with call to for_each_pair; fix target type of cast
2015-01-23 12:11:51 +01:00
Dennis Luxen
ccd803416e
fix unintended float/epsilon<double> comparison
2015-01-23 11:49:02 +01:00
Dennis Luxen
62f2a42f28
reduce cyclomatic complexity in double->string bearing conversion
2015-01-23 11:44:35 +01:00
Dennis Luxen
2e5cc1e6ae
remove redundant code and streamline coordinate interface
2015-01-22 16:48:53 +01:00
Dennis Luxen
3fa12445a5
rename coordinate calculation functions, remove code clutter
2015-01-22 16:28:40 +01:00
Dennis Luxen
cd523cc934
conflate collapsable if statements
2015-01-22 12:14:14 +01:00
Dennis Luxen
01f3237416
speed up nearest neighbor query by pruning, move coordinate calculations away from library interface
2015-01-20 16:24:49 +01:00
Dennis Luxen
88c1e622dd
fix copyright year
2015-01-07 12:29:13 +01:00
Dennis Luxen
66fc676858
remove unused parameter, move previously templated function into compile unit
2015-01-06 20:05:33 +01:00
Dennis Luxen
be63939441
fix includes
2015-01-06 13:35:36 +01:00
Dennis Luxen
6da33cafe5
rebase branch onto latest develop, report changes. hurt a little
2015-01-06 13:27:50 +01:00
Dennis Luxen
1b10f53eff
DataStructures/RawRouteData.h -> DataStructures/internal_route_result.hpp, implements #1238
2015-01-06 13:22:12 +01:00
Dennis Luxen
4a6325696e
change library interface to expose json container as structure to exchange data
2015-01-06 13:19:21 +01:00
Dennis Luxen
b50a907ca3
fix changed include paths
2015-01-06 13:17:12 +01:00
Dennis Luxen
2caeb4008c
renamed: Util/GitDescription.cpp.in -> Util/git_sha.cpp.in
...
renamed: Util/GitDescription.h -> Util/git_sha.h
2015-01-05 14:32:04 +01:00
Dennis Luxen
a4919ffb45
re-enable hintin mechanism
2015-01-05 12:59:29 +01:00
Dennis Luxen
fe1f11b071
renamed: Util/StringUtil.h -> Util/string_util.hpp
2015-01-05 10:22:11 +01:00
Dennis Luxen
1fa9091239
retire json hinting mechanism
2015-01-02 15:46:43 +01:00
Dennis Luxen
2ebe2faa74
renamed Util/TimingUtil.h -> Util/timing_util.hpp
2014-12-17 17:33:31 +01:00
Dennis Luxen
1d8c43b445
renamed: Descriptors/* -> descriptors/*
2014-11-28 14:36:38 +01:00