Attached is a figure. Where the dotted line is the boundary of the voronoi cell whose<div>generator is point P1. So triangle "4" intersects with the voronoi boundary, but we are </div><div>interested in the adjacent triangles of triangle 4, which are closer to point P1. </div>
<div>For example, triangle 5. </div><div><br></div><div>Hope this helps.</div><div>Cheers,</div><div>Ed<br><br><div class="gmail_quote">On Mon, Oct 29, 2012 at 11:50 AM, Nicolas Ribot <span dir="ltr"><<a href="mailto:nicolas.ribot@gmail.com" target="_blank">nicolas.ribot@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Could you draw a figure ?<br>
<span class="HOEnZb"><font color="#888888"><br>
Nicolas<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 29 October 2012 11:03, Ed Linde <<a href="mailto:edolinde@gmail.com">edolinde@gmail.com</a>> wrote:<br>
> Hi All,<br>
> Thanks for the suggestions.<br>
> For 1) I will look into how ST_touches works and see if it can pick up all<br>
> the adjacent polygons to<br>
> the one I have. And also look into Mike's suggestion on ST_relate...though I<br>
> must admit it looks<br>
> more complex.<br>
> For 2) I will try to clarify it a bit more... its harder to do without a<br>
> figure :) but here goes.<br>
><br>
> Lets say we have a point Q which is the generator of a voronoi cell. Now I<br>
> compute the<br>
> intersection between the voronoi cell boundaries and my triangulation (Set<br>
> of polygons)<br>
> using ST_intersect. Once I have these triangles.. I say pick one triangle T<br>
> that is<br>
> intersecting the voronoi cell boundary of Q.<br>
> For all the triangles adjacent to T, I need to know which triangles are<br>
> INSIDE the voronoi<br>
> boundary (closer to Q) and which adjacent triangles are just OUTSIDE the<br>
> voronoi<br>
> boundary (farther from Q). I am basically testing for a certain property by<br>
> "shrinking" the<br>
> voronoi cell (closer to Q) and another property when "expanding" the voronoi<br>
> cell (away from Q).<br>
> Just need to make this division of triangles. Haven't thought of a nice way<br>
> to do this in postgis 2.0<br>
> So any suggestions would greatly help.<br>
><br>
> Thanks,<br>
> Ed<br>
><br>
> On Mon, Oct 29, 2012 at 10:15 AM, Mike Toews <<a href="mailto:mwtoews@gmail.com">mwtoews@gmail.com</a>> wrote:<br>
>><br>
>> On 29 October 2012 21:33, Ed Linde <<a href="mailto:edolinde@gmail.com">edolinde@gmail.com</a>> wrote:<br>
>> > Hi All,<br>
>> > I need help with 2 hard problems. I store triangles in a table as<br>
>> > POLYGON.<br>
>> ><br>
>> > 1. I want to know for a given triangle, which triangles share an edge<br>
>> > (adjacent) with this triangle.<br>
>><br>
>> Sounds like you have a finite element mesh with nodes and elements.<br>
>> You can use ST_Relate with pattern 'FF2F11212' to pick out elements<br>
>> that share the same edge. This DE-9-IM is sort-of a custom ST_Touches,<br>
>> but only takes linear boundary overlaps. So if you have a table<br>
>> "elements", and you want to find ones that touch ID 567:<br>
>><br>
>> SELECT elements.*<br>
>> FROM elements, elements as e<br>
>> WHERE <a href="http://e.id" target="_blank">e.id</a> = 567 AND<br>
>> ST_Relate(elements.geom, e.geom, 'FF2F11212');<br>
>><br>
>> I'm not certain about your second question.<br>
>><br>
>> -Mike<br>
>> _______________________________________________<br>
>> postgis-users mailing list<br>
>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>