GIScience / openrouteservice

🌍 The open source route planner api with plenty of features.
https://openrouteservice.org
GNU General Public License v3.0
1.33k stars 379 forks source link

Tolls for HGV considered only when vehicle_type is set #358

Closed aoles closed 5 years ago

aoles commented 5 years ago

At the moment in order to pick up hgv-specific tolls with avoid: tollways one has to additionally specify vehicle_type in options. Apart from the fact that this behavior us not documented, this is unpractical because currently the result doesn't depend on the particular value of vehicle_type anyway (even though it potentially could...).

Consider changing the logic such that results from TollwayExtractor depend on profile rather than vehicle_type.

aoles commented 5 years ago

On top of this, for a given way only the first matching OSM toll tag is being processed. For example, if there is already toll=no than a more specific toll:hgv=yes might not be picked up, such as here: https://maps.openrouteservice.org/directions?n1=50.030584&n2=19.821138&n3=15&a=50.034209,19.815044,50.025704,19.823112&b=4a&c=0&f5=2&k1=en-US&k2=km