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


1 Answer 1


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)
  • Can you detail this a bit more?
    – dassouki
    Apr 5, 2013 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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