<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 11, 2013 at 6:07 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":6m">So you strategy could be:<br>
<br>
1. find all nodes that have only on edge associated with them. In this model that would be nodes 1, 6, and a and may be filter the edges to be short edges only. the following sql is close to this:<br>
<br>
select <a href="http://a.pt" target="_blank">a.pt</a>, count(*) as cnt<br>
  from<br>
       ( select st_startpoint(geom) as pt from flowlines<br>
         union<br>
         select st_endpoint(geom) as pt from flowlines<br>
       ) as a,<br>
       flowlines b<br>
  where st_dwithin(<a href="http://a.pt" target="_blank">a.pt</a>, b.geom, 0.000001)<br>
        and st_length(b.geom) <  <maxlen><br>
  group by a.pnt<br>
  having cnt = 1;<br>
<br>
2. if your selection criteria is a branch off the main line, rather than and extension of the main line, then you can eliminate the end segments that have only a sing edge connecting to the far end. This would eliminate 5-6 because 5 has too edges, but 3 has 3 edges. You have to decide what to do if 5 has a branch to 7 also.<br>


<br>
So we should be able to use the points above to select the edges of the dangling segments, then get the opposite end point, and count the edges connected to the opposite end. The SQL is more complex for this part and I need to think more about how to do that.<br>

</div></blockquote></div><br><br>Thanks - I think your approach is getting me in the right direction. I'm doing subsequent processing to the data and that is where the problems are showing up. If this approach is right, and I believe it is, then my problem might be in the post processing script. <br clear="all">

<div><br></div>-- <br><div>Clifford</div><div><br></div><div>OpenStreetMap: Maps with a human touch</div>
</div></div>