<div dir="ltr">Ok the edge-linking update function seems to work<div>(tested on a 40 edge geom:</div><div>inserting node, then inserting edge without setting next_left and next_right</div><div>then using function to straighten things up</div><div>Afterward, topology passes ValidateTopology)</div><div><br></div><div>Now starting the much more complicated face-linking function (__without__ using GEOS to be precision-error safe).</div><div><br></div><div>The simplest way I have found is to </div><div> - get a decent sized neighborhood of the edges to update (maybe 1-neighborhood or 2-neighborhood)</div><div> - compute connected components on graph formed by </div><div>   the ensemble of (-edge_id, next_left_edge) UNION (edge_id, next_right_edge)</div><div> - connected components shall give face (and edges linked to infinite face or non-complete face)</div><div> - in a connected components, if all edges agree on face_id, do nothing</div><div> - else, add face, set face accordingly</div><div><br></div><div>It would be much easier to simply extract ring, but it would also be terribly inefficient</div><div>Cheers,</div><div>Rémi-C</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-17 10:29 GMT+01:00 Rémi Cura <span dir="ltr"><<a href="mailto:remi.cura@gmail.com" target="_blank">remi.cura@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ahaha,<div>in my interior self i __knew__ you wouldn't like the html background color,</div><div>but I couldn't stop myself nonetheless</div><div> ;-)</div><div>Cheers,</div><div>Rémi-C</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-02-16 19:25 GMT+01:00 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Mon, Feb 16, 2015 at 07:04:45PM +0100, Rémi Cura wrote:<br>
<br>
>    (Batch creation from linestring:<br>
</span>>    node with GEOS,A<br>
<span>>    insert node into topology<br>
>    cut linestring into pieces with nodes (various option, GEOS would be best)<br>
>    insert linestring pieces as edge, with only start_node and end_node<br>
>    correct<br>
>    compute edge_linking and face-linking<br>
>    )<br>
>    I already have everything in yellow.<br>
<br>
</span>Pity neither ASCII nor UTF8 have provision for colors :)<br>
<br>
--strk;<br>
<br>
 ()  ASCII ribbon campaign  --  Keep it simple !<br>
 /\  <a href="http://strk.keybit.net/rants/ascii_mails.txt" target="_blank">http://strk.keybit.net/rants/ascii_mails.txt</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>