Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment feature id in tile speed layer #6726

Merged
merged 3 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
- Routing:
- FIXED: Fix adding traffic signal penalties during compression [#6419](https://github.com/Project-OSRM/osrm-backend/pull/6419)
- FIXED: Correctly handle compressed traffic signals. [#6724](https://github.com/Project-OSRM/osrm-backend/pull/6724)
- Debug tiles:
- FIXED: Ensure speed layer features have unique ids. [#6726](https://github.com/Project-OSRM/osrm-backend/pull/6726)
# 5.27.1
- Changes from 5.27.0
- Misc:
Expand Down
4 changes: 2 additions & 2 deletions src/engine/plugins/tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void encodeVectorTile(const DataFacadeBase &facade,
auto tile_line = coordinatesToTileLine(a, b, tile_bbox);
if (!tile_line.empty())
{
SpeedLayerFeatureBuilder fbuilder{speeds_layer, id};
SpeedLayerFeatureBuilder fbuilder{speeds_layer, id++};
fbuilder.add_linestring_from_container(tile_line);

fbuilder.set_speed(speed_kmh_idx);
Expand Down Expand Up @@ -542,7 +542,7 @@ void encodeVectorTile(const DataFacadeBase &facade,
auto tile_line = coordinatesToTileLine(b, a, tile_bbox);
if (!tile_line.empty())
{
SpeedLayerFeatureBuilder fbuilder{speeds_layer, id};
SpeedLayerFeatureBuilder fbuilder{speeds_layer, id++};
fbuilder.add_linestring_from_container(tile_line);

fbuilder.set_speed(speed_kmh_idx);
Expand Down
2 changes: 1 addition & 1 deletion test/nodejs/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports.three_test_coordinates = [[7.41337, 43.72956],

exports.two_test_coordinates = exports.three_test_coordinates.slice(0, 2)

exports.test_tile = {'at': [17059, 11948, 15], 'size': 156539};
exports.test_tile = {'at': [17059, 11948, 15], 'size': 159125};

// Test files generated by the routing engine; check test/data
if (process.env.OSRM_DATA_PATH !== undefined) {
Expand Down
Loading