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

Further to my previous question I was wondering if it is possible to add dummy node data without to do routing analysis.


  • I have a polygon layer that represents zonal attributes
  • I created a centroid (point layer) for each polygon
  • I would like to add the new points to the database with "dummy" links to the nearest highway or nearest road of a certain classification
  • Route from between all the nodes to develop a trip matrix

Is this possible with OSM and pgRouting?

NOTE I will add more details to this question tomorrow

share|improve this question
The bounty is still in 'a grace period' (it still can be given 24hrs after the expiry time) -… – Mapperz Apr 12 '13 at 20:09

You'll have to create an INSERT statement that constructs a line from your centroid to your road segment.

Some useful postgis functions would be:

  • st_make_line
  • line_locate_point(ST_GeometryN(road.geom, 1), centroid.geom)
  • st_distance(road.geom, centroid.geom)
share|improve this answer
Can you detail this a bit more? – dassouki Apr 5 '13 at 14:21

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.