Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 have installed postgreSql + postGis + pgrouting and I have loaded OSM data into my database using osm2po and shp2pgsql. How can I search for points in the map using the street names and then route the user from point 1 to point 2. pgrouting divides the streets in edges and any given street will have multiple edges and nodes, how could I link those edges and nodes to the actual street names? Any ideas? Thanks

share|improve this question
What's your plan? Do you want to find the most central edge of all edges with the same road name? Or would a random one do? – underdark Nov 23 '12 at 20:41
Hey, thanks for replying. I guess the most central one would be the most convenient for my app. – sergiopuy Nov 23 '12 at 21:22
Does anyone have any ideas? – sergiopuy Nov 24 '12 at 18:10

One approach could be

  1. get the bounding box for all edges with the same name
  2. calculate the center of this bbox
  3. find the edge that is closest to this center
share|improve this answer

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.