0

I need get custom segment of any Linestring. For better understanding I've added image. enter image description here

Blue line is my Linestring which contains 3 points, and on the base of red point I need cut or fill line in same level as red point. How can I do that?

I use dijsktra function like that:

SELECT e.seq, e.path_seq, e.node, e.cost, e.agg_cost, w.name, w.the_geom, w.x1, w.y1, w.x2, w.y2, st_astext(w.the_geom)
FROM pgr_dijkstra('
    SELECT gid AS id,
         source,
         target,
         cost_s AS cost,
         reverse_cost_s AS reverse_cost
        FROM pgr.ways',
    35959, 
    19303, 
    directed := true)e
    left join pgr.ways w on w.gid = e.edge
    order by e.seq

and on image are my first and last edges of result which are not corresponding with ending vertexes (red points), so I need edit this edges.

  • Similar problem here – Nate Wanner Mar 11 '17 at 2:26
  • GIS SE is less a place where you state what you need and more a place where you show what you've done. Coding problems are expected to show a good-faith effort to solve the problem. Please edit the question to show your SQL. I would also note that "substring" is not a conventional term to refer to a clipped line. – Vince Mar 11 '17 at 12:37
  • @Vince Ok, I edit question and added sql of dijsktra algorithm and describe how my question is related with. I hope it is better for understanding. – Denis Stephanov Mar 11 '17 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.