-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
length, cost and reverese cost is not a valid distance #275
Comments
This issue was discussed a long time ago here: #8 |
yes, the last post was my point. length in degree calculate on a Plate Carree |
Once data is loaded into the database you can use postGIS to calculate haversine distance for exampĺe |
yes, in postgis I can calculate all lengths, times, coordinate-values. So the question is, why are some columns present and others often needed not. I would assume the normally metric length (distance on the spheroid) and the resulting time is used as cost function for routing algorithms. |
What about dropping all length computation, that osm2pgrouting does, and leave it up to the user to decide what they want? It should be rather simple to do this with a bit of PostGIS as mentioned before. This means less documentation and no confusion ;-) I actually always had the impression, that there was some length taken from OSM data, but I must admit that I never checked if it's really the case. |
To remove everything specific which can be easily calculated from the database would make it much more generic and easier to understand. The basic values in table ways are: gid, osm_id, tag_id, name, source, target, one_way, maxspeed_forward, maxspeed_backward, geom. All other values can be added via SQL. These values would be helpful to start with dijkstra (but can be calculated via SQL) maxspeed and time are only working for car navigation: This is for using original OSM ids I guess this is for A* (when using with geographic coordinates) In all case a small tutorial how to calculate distance, time and also how to consider access and roadtype would be great. |
length is calculated with pythagoras function for planar metric coordinates. osm data has geographic coordinates (angles).
The distance function gives wrong values for distance, because the distance between meridians gets smaller from equator to pole. the length value is also used in the colums cost and reverse_cost.
maybe it is included to use with A* ?
otherwise it may be better to remove this wrong distances.
please add columns const_m and resverse_const_m to the table.
The text was updated successfully, but these errors were encountered: