Hi Dave,<div><br></div><div>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.</div><div>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.</div>
<div><br></div><div>Daniel</div><div><br><br><div class="gmail_quote">On Wed, Apr 11, 2012 at 5:22 PM, Dave Potts <span dir="ltr"><<a href="mailto:dave.potts@pinan.co.uk">dave.potts@pinan.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Steve,<br>
<br>
Thats useful but its not quite what I am looking for.<br>
<br>
I can not make a preselection before I start routing, what I am actual<br>
after is a 'rule based selection'<br>
<br>
for example before selecting the next node to consider when selecting the<br>
shortest path, I like to apply a set of rules.<br>
<br>
<br>
Whats the shortest path if I consider this dangerous node.<br>
Whats the shortest path if I consider what to go near this node etc<br>
<br>
There are many reasons why should you choose to go near nodes, some may be<br>
more danegrous that others. I can just screen out all the nodes before I<br>
start out.<br>
<br>
Dave.<br>
Stephen Woodbridge wrote:<br>
> On 4/10/2012 7:22 AM, Dave Potts wrote:<br>
>><br>
>><br>
>> Hi<br>
>><br>
>> Normally routing problems such as dijkstra/TSP always select the best<br>
>> route by the length of the route.<br>
>><br>
>> Does anybody known a version that selects the route choosen by the node<br>
>> type as well as the distance covered? The reason that I ask, in cases<br>
>> the<br>
>> select of the node type is important for example<br>
>><br>
>> I am trying to get from node A to F,<br>
>><br>
>> I have to possible routes A B C F , A E to F or A D F.<br>
>><br>
>> The route A D E is the shortest one, but D is noted number of highway<br>
>> men/gunfighters living in town.<br>
>><br>
>> I am a careful man and would prefer to travel the safest fast route. Is<br>
>> there a generic solution to this type of problem other than removing D<br>
>> from the input list of nodes to compare?<br>
>><br>
>> Can anybody suggest a different news group where this type of issue<br>
>> could<br>
>> be raised?<br>
><br>
> In pgRouting it is trivial to do this by putting a filter on the edges<br>
> to remove edges or nodes of a particular class(es). Something like:<br>
><br>
> select * from edges where etype != 'dangerous';<br>
><br>
> select * from edges a, nodes b where a.source=<a href="http://b.id" target="_blank">b.id</a> or a.target=<a href="http://b.id" target="_blank">b.id</a> and<br>
> b.ntype not in ('dangerous', 'dirty');<br>
><br>
> -Steve<br>
> _______________________________________________<br>
> pgrouting-dev mailing list<br>
> <a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
<br>
<br>
_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>
Web: <a href="http://georepublic.de/" style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span><br>
</div>