I have various number of tracks which represents different roads. Each track represent one road. I have loaded this gpx file into my postgres.
Now my problem is how am I going to build a network between all these roads, in order to be possible to find the shortest path from any track point to any other track point. Below here you can see an image of my 4 roads.
I have already installed pgrouting and postgis. I have already done something by creating a source and target column and loaded them with data using assign_vertex_id(). The thing is that the network is not being build properly, such as I can only go from a start point to an end point of the same road rather than of different roads. Any suggestions how can I build a proper network between all these roads?
This is an old question, but pgRouting now have functions to help you build the network from inside the database.
http://docs.pgrouting.org/2.0/en/src/common/doc/functions/node_network.html#pgr-node-network
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With