[pgrouting-users] adding barriers
woodbri at swoodbridge.com
Fri Dec 25 07:03:52 PST 2015
On 12/25/2015 2:27 AM, Bulut Aras wrote:
> We are trying to build a routing application which includes barriers
> (point, line). But, instead of avoiding entire road we want to exclude
> only sub-part of that road.
> Barriers may be point (a point on a road) or line features (sub-part
> of a road calculated using LRS) in another tables.
> Can we implement this using pgRouting and postgis?
Yes, in pgrouting when you make a query for a route, you pass in the
edges and edge weights you want considered for that route. So you can
remove edges or set the weight to very high value that would not be
accessible before you pass them to the query.
For point barriers, I think I would split the edges that they sit on and
added a zero or very short edge at the barrier. then you can do
select * from pgr_dijkstra('select * from edges where barrier is false',
Here I assume that you have added a column to your edge table called
barrier that is boolean.
This email has been checked for viruses by Avast antivirus software.
More information about the Pgrouting-users