I was following this guide of yours on creating drive network isochrones (how far one can get in X minutes of driving).
We initially tried using the add_edge_speeds() and add_edge_travel_time() functions in speed.py. The isochrone produced however was quite odd and suggested that we could travel multiple km's in only a few seconds.
# convert distance km to meters, and speed km per hour to km per second
distance_km = edges["length"] / 1000
speed_km_sec = edges["speed_kph"] / (60 * 60)
The edge 'length' attribute is actually initially in meters (at least it is in my graph), whereas you're suggesting that it needs a conversion to meters. In reality, by dividing it by 1000, you're converting those meters to km, which then get divided by speed_km_sec.
Hi,
I was following this guide of yours on creating drive network isochrones (how far one can get in X minutes of driving). We initially tried using the
add_edge_speeds()
andadd_edge_travel_time()
functions in speed.py. The isochrone produced however was quite odd and suggested that we could travel multiple km's in only a few seconds.I believe the comment on line 150 is incorrect:
The edge 'length' attribute is actually initially in meters (at least it is in my graph), whereas you're suggesting that it needs a conversion to meters. In reality, by dividing it by 1000, you're converting those meters to km, which then get divided by
speed_km_sec
.