Comments (6)
This issue was discussed a long time ago here: #8
from osm2pgrouting.
yes, the last post was my point. length in degree calculate on a Plate Carree
I was asking me if the distance in degree is needed for A*-Funktion to approximate air line, because also start and end node are given in degree.
length in meter is already stored in the table, it only needs to add also cost, reverse cost in meter.
from osm2pgrouting.
Once data is loaded into the database you can use postGIS to calculate haversine distance for exampĺe
from osm2pgrouting.
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.
Because of the missing documentation I have to guess:
I guess the distance in degree is a hack to let the A* function work with geographic coordinates. I can't find any other reason for using the distorted Plate Carree degree length instead of correct spheroid length. Even spherical length would be better.
from osm2pgrouting.
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.
from osm2pgrouting.
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)
lenght_m - from ST_length(geom,true)
cost_m - from length and oneway
reverse_cost_m - from length and oneway
maxspeed and time are only working for car navigation:
cost_s - from const_m and speed
reverse_cost_s - from reverse_const_m and speed
This is for using original OSM ids
osm_source, - lookup in ways_vertices
osm_target - lookup in ways_vertices
I guess this is for A* (when using with geographic coordinates)
x1,x2,y1.y2 - ST_X, ST_Y, ST_StartPoint, ST_EndPoint
length and cost (in degree) -- ST_length(::geomerty) and Oneway
In all case a small tutorial how to calculate distance, time and also how to consider access and roadtype would be great.
And of course a documentation that describes what the program is really doing.
from osm2pgrouting.
Related Issues (20)
- How is the column "cost" and similars calculated? HOT 5
- mapconfig_for_cars.xml -> "unclassified" has wrong priority HOT 7
- Issue with data import: fe_sendauth: no password supplied HOT 3
- osm2pgrouting does not compile with libpqxx v 7.1.1, 7.2.0. Compiles okay with 6.4.7 HOT 8
- Remove "priority" and "max-speed"
- New release? HOT 4
- 2.3.7 compile error HOT 5
- Change 'gid' column in 'ways' table to id' HOT 15
- Move branch master to "main"
- Release v2.3.8 HOT 1
- Some way are not imported in the ways table HOT 2
- Too many edges HOT 4
- Error opening /usr/share/osm2pgrouting/mapconfig.xml HOT 1
- Problem creating topology on pgrouting HOT 2
- unable to open / parse config file HOT 3
- osm_relations table does not get populated
- unclosed token at line 51376846 Failed to open / parse data file
- Problem compiling on alpine linux (libpqxx) HOT 1
- Suggested addition to readme for building on mac with libpq installed from brew
- Bug in Relation::members_str
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osm2pgrouting.