<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You can block the edge like you
restrict access of any other edge:<br>
set the access bits to false - it should be something like this:<br>
edge.setFlags(encoder.setAccess(edge.getFlags(), false, false))<br>
<br>
Peter<br>
<br>
On 09.07.2015 09:13, John Zhao wrote:<br>
</div>
<blockquote
cite="mid:CA+EBg9TTqWN9saUD5=y+c0Gy7v428rG2pEnsKmeRE5QTkLVDTQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Peter,
<div><br>
</div>
<div>I understand it's in each flager.</div>
<div>My question is how GH block that zero length edge.</div>
<div>I don't find the corresponding log.</div>
<div><br>
</div>
<div>I think there are several ways to handle this:</div>
<div>1. convert it to turn restriction.</div>
<div>2. create a virtual node, but don't connect the virtual
node and real node. Then they are not connected.</div>
<div><br>
</div>
<div>But graphhopper use another way:</div>
<div>create a virtual node. then create an virtual edge between
the virtual node and real node.</div>
<div>I guess GH need to make some special configure on the
virtual edge.</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature"><b>Best Regards,</b>
<div><b>ZhiQiang ZHAO</b></div>
</div>
</div>
<br>
<div class="gmail_quote">On Thu, Jul 9, 2015 at 12:08 AM, Peter
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:graphhopper@gmx.de" target="_blank">graphhopper@gmx.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>If and how a barrier is blocking is handled in the
specific FlagEncoder:<br>
<br>
<a moz-do-not-send="true"
href="https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/routing/util/CarFlagEncoder.java#L86"
target="_blank">https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/routing/util/CarFlagEncoder.java#L86</a><br>
<br>
Regards,<br>
Peter
<div>
<div class="h5"><br>
<br>
On 09.07.2015 02:43, John Zhao wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I looked into OSMReader.processWay( )</div>
<div>There is already a lot of comments. But it's
still not clear to me. :p</div>
<div><br>
</div>
<div>I understand GH will create a "virtual" node,
with the same lat/lon.</div>
<div>And then create a new edge between the 2
nodes.</div>
<div>But how to block this edge?</div>
<div>set the direction bit of the zero length edge
both to false? where is the code?</div>
<div>
<pre style="color:rgb(0,0,0);font-family:Menlo;font-size:12pt"><span style="color:rgb(128,128,128);font-style:italic">// create zero length edge for barrier
</span>createdEdges.addAll(addBarrierEdge(newNodeId, nodeId, wayFlags, nodeFlags, wayOsmId));</pre>
<div>
<div><b>Best Regards,</b>
<div><b>ZhiQiang ZHAO</b></div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>