valhalla / valhalla/valhalla

[new pbf response] Repeated street_names in steps

Open
#1,367 1 comment 0 reactions 2 assignees Claimed by @chaupow View on GitHub
Dominant language
C++
Stars
6.2k
Forks
981
Avg merge
2d 14h
Merged PRs (30d)
14

Description

The current draft for the pbf route response of Valhalla has `repeated StreetName street_names` in `steps`. https://github.com/valhalla/valhalla/blob/master/proto/directions.proto#L32

The reason for designing this `repeated` is that some streets have different names that can all be used to refer *to the same street*. The reason is **not** that a step can span over multiple different streets with different names.
The current design however is non-intuitive and might be misunderstand or confusing.

## Proposal

Therefore, I propose to change it to

```
message Step {
[...]
optional Street street = 7;
[...]
}
```

and then have
```
message Street {
optional string name = 1;
optional string route_number = 2;
}
```
OR
```
message Street {
repeated string name = 1;
repeated string route_number = 2;
}
```

Depending on what kind of names exist something along the lines of
```
message Street {
optional string main_name = 1;
optional string secondary_name = 1;
optional string route_number = 2;
}
```

## Next actions
- [ ] @dgearhart @chaupow to find examples of roads with multiple names
- [ ] depending on examples decide on a new design proposal

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.