Open cvvergara opened 9 years ago
@robe2
length
(I cheched and its the same result as ST_length(the_geom)
but on on ways streets (one_way = 1 or one_way = -1) the value will be negative. So the edge in a directed graph is not included.cost_s and reverse_cost_s are time costs, which depend on speed, maxspeed_forward
and maxspeed_backward
, of the edge and in length in meters length_m
of the edge.
time = distance / (speed * 5/18)
(the 5/18 are to convert the km/hr speed to m/s)
cost_m
, and reverse_cost_m
, based on length in meters?
That way the query you are posting can be smaller.Or maybe use pgr_pointtoedgenode
I think having cost, reverse_cost in seconds would be nice feature.
Just stumbled into this thread while seeking about How to quick-fix drive time in residential area with Osm2PgRouting?. This thread helped me a lot understanding how _costs & _reversecosts work before digging into the code, so thank you ;)
About the issue, as I began to use osm2pgrouting having _costm and _reversecostm would have been nice features. Because for instance when you first use _pgrdrivingDistance to calculate a range in meters it's not so easy to understand at first that you have to do some CRS conversions to set the distance parameter.
However it's more like a nice to have feature than a really missing one.
@MarHoff latest version has length_m also there is a column about the geometry direction (one_way), so: cost_m and reverse_cost_m can be set in postgres based on the values of one_way.
As I said, once you are familiar with the tools no big deal, but it does have a learning curve because you'd have to take various case in account as stated here
So whereas cost & reversecost can be used out of the box you need to dig into the data-model to derive a _costm properly. But it's exactly the same deal (maybe even worst) with _costs & _reversecosts that need some tweaking to give realistics estimations.
But osm2pgrouting being a great FOSS tool I totally get that you "still have to earn it a little" and that plug & play isn't exactly on the current roadmap ;)
There is always a learning curve in everything:
Ok, sorry to have digged this thread for bad reasons. While content here helped me a lot, it was already a bit off topic, sorry again.
Right now there are some configuration files: mapconfig and mapconfig_for_cars @robe2 says: " when I use, it I get nothing for this query:
But get answers when using the mapforcars config I also get an answer with similar query using osm2po"