fix polyline decoding
This commit is contained in:
parent
45673581ea
commit
a411589092
@ -6,6 +6,7 @@
|
|||||||
- The default profile for car now excludes HOV-only routes in navigation by default
|
- The default profile for car now excludes HOV-only routes in navigation by default
|
||||||
- Bugfixes
|
- Bugfixes
|
||||||
- Fixed a bug that could result in endless loops in combination with sliproads
|
- Fixed a bug that could result in endless loops in combination with sliproads
|
||||||
|
- fixed a bug where polyline decoding on a defective polyline could end up in out-of-bound access on a vector
|
||||||
|
|
||||||
# 5.4.0-rc.4
|
# 5.4.0-rc.4
|
||||||
- Changes from 5.4.0-rc.3
|
- Changes from 5.4.0-rc.3
|
||||||
@ -17,6 +18,10 @@
|
|||||||
- Bugfixes
|
- Bugfixes
|
||||||
- BREAKING: Fixed a bug where some roads could be falsly identified as sliproadsi This change requires reprocessing datasets with osrm-extract and osrm-contract
|
- BREAKING: Fixed a bug where some roads could be falsly identified as sliproadsi This change requires reprocessing datasets with osrm-extract and osrm-contract
|
||||||
- BREAKING: Fixed a bug that resulted in false names/ref/destination/pronunciation This change requires reprocessing datasets with osrm-extract and osrm-contract
|
- BREAKING: Fixed a bug that resulted in false names/ref/destination/pronunciation This change requires reprocessing datasets with osrm-extract and osrm-contract
|
||||||
|
- `restrictions` is now used for namespaced restrictions and restriction exceptions (e.g. `restriction:motorcar=` as well as `except=motorcar`)
|
||||||
|
- replaced lhs/rhs profiles by using test defined profiles
|
||||||
|
- Trip Plugin
|
||||||
|
- changed internal behaviour to prefer the smallest lexicographic result over the largest one
|
||||||
|
|
||||||
# 5.4.0
|
# 5.4.0
|
||||||
- Changes from 5.3.0
|
- Changes from 5.3.0
|
||||||
|
@ -100,7 +100,7 @@ std::vector<util::Coordinate> decodePolyline(const std::string &geometry_string)
|
|||||||
b = geometry_string.at(index++) - 63;
|
b = geometry_string.at(index++) - 63;
|
||||||
result |= (b & 0x1f) << shift;
|
result |= (b & 0x1f) << shift;
|
||||||
shift += 5;
|
shift += 5;
|
||||||
} while (b >= 0x20);
|
} while (b >= 0x20 && index < len);
|
||||||
int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
|
int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
|
||||||
lat += dlat;
|
lat += dlat;
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ std::vector<util::Coordinate> decodePolyline(const std::string &geometry_string)
|
|||||||
b = geometry_string.at(index++) - 63;
|
b = geometry_string.at(index++) - 63;
|
||||||
result |= (b & 0x1f) << shift;
|
result |= (b & 0x1f) << shift;
|
||||||
shift += 5;
|
shift += 5;
|
||||||
} while (b >= 0x20);
|
} while (b >= 0x20 && index < len);
|
||||||
int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
|
int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
|
||||||
lng += dlng;
|
lng += dlng;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user