NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I imported an osm file into a postgresql database using osm2pgsql. Now, I want to implement a route/path generating algorithm(routing algo) based on two locations entered by a user. It is not really clear for me where in my database structure I should search for these two points. For example if a user enters as starting point "Airport A" and as end point "Airport B" where should I search for these two locations so I can start implementing my routing algorithm. I need some clear information on how the database is structured and how to create a graph so that i can implement A* algorithm between the 2 points the user has enetered.

asked 08 Feb '18, 03:44

roshansivakumar's gravatar image

roshansivakumar
11112
accept rate: 0%

2

Using osm2pgsql is not the best way of doing this as it removes connection information between ways. Most routing tools use a separate geocoder to translate from location names to lat/lon. I would recommend using something like osm2pgrouting and PG routing in PostGis.

(08 Feb '18, 16:59) SK53 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×165
×18

question asked: 08 Feb '18, 03:44

question was seen: 1,030 times

last updated: 08 Feb '18, 16:59

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum