Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm working on postgresql and I am trying to create table to generate graphs. I have a table that contains all the objects of a city (points) and another contains the city street. My goal now is to segment the street in small segments that begins and ends with two objects (points). I try with different PostgreSQL query but I can not create a table of links that restrained the source and destination of each seqments ST_pointN actually gives the first and last point in a linestring against me by I want to have all the object on a street with the order to which I may have small segments. I want to see is what pgRouting can help me segment the streets and if so how? thank you

share|improve this question
    
Please add an image to illustrate the question. Are the points located on the lines or besides them, etc. –  underdark Mar 13 '13 at 10:21

1 Answer 1

Sounds like you should read about linear referencing.

ST_line_locate_point(LineString, Point) (0-1 value from start) 
ST_line_interpolate_point(linestring, location) 

using those two you get nearest point on road from your point. After that split edges to have node for those point and regenerate graph table

share|improve this answer

Your Answer

 
discard

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.