Construct a polygon from the two lines and calculate the area inside? Have some magic number denoting an acceptable length/area ratio that scales the limit appropriately. There's a few nasty edge cases, though.<br><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Jan 4, 2013 at 2:44 PM, Paweł Paprota <span dir="ltr"><<a href="mailto:ppawel@fastmail.fm" target="_blank">ppawel@fastmail.fm</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Andrzej<br>
<br>
On 01/04/2013 03:37 PM, andrzej zaborowski wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If the number of nodes in a way didn't change you could optimize by just<br>
comparing them coordinate by coordinate.<br>
</blockquote>
<br>
I was thinking you could take the maximum of every node's distance<br>
from the other way. It should yield the same metric as ST_Buffer<br>
would.<br>
<br>
</blockquote>
<br>
I tried that by using ST_MaxDistance but it fails for some cases where the maximum distance is actually quite large even though the linestrings are near each other.<br>
<br>
Paweł<br>
<br>
<br>
______________________________<u></u>_________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org" target="_blank">dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/dev" target="_blank">http://lists.openstreetmap.<u></u>org/listinfo/dev</a><br>
</blockquote></div><br></div>