Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm a student and i'm working on a project. the aim is given two sets of coordinates(origin & destination) route through the map to determine the optimum path using public transportation and of course walking edges.

i read about GTFS, but its too complex,i dont care about transit schedule, time, etc. my only aim is to provide the user a graphical representation of the shortest path. and the cost will only be the length of edges multiplied by the fare of mode of public transportation (e.g. length in kilometer * bus fare per kilometer), edge length multiplied by the average speed of the mode of transportation(e.g. legnth in kilometer * bus average speed by kilometer). besides, my country hasn't yet provide any gtfs data yet.

i've decide to use postgresql, postgis and pgrouting to do this. Here's my idea and what i've done so far.

first: download an openstreet map extract taken from

then: convert the XML OSM data to a routable database using osm2pgrouting tool. I've done this using cgywin since i'm using windows. encountered some error though, i think?. see my results below:

reference nd=[some digits] has no coressponding node entry..
Nodes table created
2create ways failed:
Types table created
Way_tag table created
Relations table created
Relation_ways table created
Classes table created
Adding tag types and classes to database...
Adding relations to database...
Adding nodes to database...
Adding ways to database...
Creating topology... NOTICE: CREATE TABLE will create implicit sequence "vertices_tmp_id_seq" for serial column ""
CONTEXT: SQL statement "CREATE TABLE vertices_tmp (id serial)"
PL/pgSQL function "assign_vertex_id" line 14 at EXECUTE statement
size of streets: 1072190
size of splitted ways : 2281124

dont know exactly if this kind of result should concern me but i tried to do some routing. seems working so far. if you have any comments on my osm2pgrouting result, i would appreciate the help. =)

anyway after converting the XML data, load QGIS application and load the ways table using DB Manager PostGIS plugin to convert the table to a shapefile, i will then enable labeling to see the edge id of each edge. then i will start tracking which edges are used for public transportation, (given that i already have a physical map which contain routes)

then: i will create a new table or multiple tables that will establish relationship between the "way" table and my public transportation datas. i haven't decided their structure yet, but thats the idea.

now using pgrouting. im going to execute a shortest path query which will only route on edges that are also transit edges and walkable by foot (footway).

now my question is, Am I on the right track here? Am i missing something or there is something wrong with my idea?

please i would really appreciate suggestions, corrections etc. and if there are things that would help me in making light to this project of mine.


share|improve this question

There is no error in your osm2pgsql output. It only gives a notice that it creates a vertices table with a serial column.

When the routing result looks fine, then the import and topology went well. You probably should check if you imported all ways you want to use and adjust the configuration file accordingly.

For multi-modal routing though (if you care about bus and train schedules), the standard shortest path functions won't work. There was a Google Summer of Code project, which implements a multi-modal routing (available in a branch of the Github repository), though you have to compile pgRouting yourself and it's not much tested.

share|improve this answer
thanks! its good to know that my raw database data have no flaws. just want to clarify though, regarding this kind of outputs i get at the start when i try to execute the osm2pgrouting "Reference nd=" some digits " has no corresponding Node Entry (Maybe Node entry after Reference?)" , what exactly does it tell me?, will this affect my routing? – Charles Jordan Cabero Jan 13 '13 at 14:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.