[pgrouting-dev] selection of node types in dijkstra/TSP etc

Daniel Kastl daniel at georepublic.de
Wed Apr 11 05:31:52 EDT 2012


Hi Dave,

Not sure I'm understanding your problem correctly. But if you can't exclude
data in your query already (Steve's proposal) you usually do it by
modifying costs.
For example if you have points that indicate dangerous spots, you can
create a buffer around these points, select road links within these buffers
and increase the costs.

Daniel


On Wed, Apr 11, 2012 at 5:22 PM, Dave Potts <dave.potts at pinan.co.uk> wrote:

> Hi Steve,
>
> Thats useful but its not quite what I am looking for.
>
> I can not make a preselection before I start routing, what I am actual
> after is a 'rule based selection'
>
> for example before selecting the next node to consider when selecting the
> shortest path,  I like to apply a set of rules.
>
>
> Whats the shortest path if I consider this dangerous node.
> Whats the shortest path if I consider what to go near this node etc
>
> There are many reasons why should you choose to go near nodes, some may be
> more danegrous that others.  I can just screen out all the nodes before I
> start out.
>
> Dave.
> Stephen Woodbridge wrote:
> > On 4/10/2012 7:22 AM, Dave Potts wrote:
> >>
> >>
> >> Hi
> >>
> >> Normally routing problems such as dijkstra/TSP always select the best
> >> route by the length of the route.
> >>
> >> Does anybody known a version that selects the route choosen by the node
> >> type as well as the distance covered?  The reason that I ask, in cases
> >> the
> >> select of the node type is important for example
> >>
> >> I am trying to get from node A to F,
> >>
> >> I have to possible routes A B C F  , A E to F or A D F.
> >>
> >> The route  A D E is the shortest one, but D is noted number of highway
> >> men/gunfighters living in town.
> >>
> >> I am a careful man and would prefer to travel the safest fast route.  Is
> >> there a generic solution to this type of problem other than removing D
> >> from the input list of nodes to compare?
> >>
> >> Can anybody suggest a different news group where this type of issue
> >> could
> >> be raised?
> >
> > In pgRouting it is trivial to do this by putting a filter on the edges
> > to remove edges or nodes of a particular class(es). Something like:
> >
> > select * from edges where etype != 'dangerous';
> >
> > select * from edges a, nodes b where a.source=b.id or a.target=b.id and
> > b.ntype not in ('dangerous', 'dirty');
> >
> > -Steve
> > _______________________________________________
> > pgrouting-dev mailing list
> > pgrouting-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
> >
>
>
> --
>
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>



-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20120411/fc38fc6c/attachment.html


More information about the pgrouting-dev mailing list