pgRouting / osm2pgrouting

Import tool for OpenStreetMap data to pgRouting database
https://pgrouting.org
GNU General Public License v2.0
288 stars 112 forks source link

fixed zero division error when max_speed = 0 #226

Closed cayetanobv closed 6 years ago

cayetanobv commented 6 years ago

This PR fixes a zero division error when max_speed = 0. When a way from OSM has max_speed_backward or max_speed_forward equal to zero, we assume that cost or reverse cost must be NULL (it is impossible to have cost without speed; this is a OSM problem and must be fixed in OSM side; it is not a osm2pgrouting problem).

cayetanobv commented 6 years ago

This PR fixes issue #202

cayetanobv commented 6 years ago

By the way, I have a OSM dataset to reproduce this error (this is a dataset I'm working this week).