[postgis-devel] update topology locally

Rémi Cura remi.cura at gmail.com
Tue Feb 17 06:03:58 PST 2015

Ok the edge-linking update function seems to work
(tested on a 40 edge geom:
inserting node, then inserting edge without setting next_left and next_right
then using function to straighten things up
Afterward, topology passes ValidateTopology)

Now starting the much more complicated face-linking function (__without__
using GEOS to be precision-error safe).

The simplest way I have found is to
 - get a decent sized neighborhood of the edges to update (maybe
1-neighborhood or 2-neighborhood)
 - compute connected components on graph formed by
   the ensemble of (-edge_id, next_left_edge) UNION (edge_id,
 - connected components shall give face (and edges linked to infinite face
or non-complete face)
 - in a connected components, if all edges agree on face_id, do nothing
 - else, add face, set face accordingly

It would be much easier to simply extract ring, but it would also be
terribly inefficient

2015-02-17 10:29 GMT+01:00 Rémi Cura <remi.cura at gmail.com>:

> Ahaha,
> in my interior self i __knew__ you wouldn't like the html background color,
> but I couldn't stop myself nonetheless
>  ;-)
> Cheers,
> Rémi-C
> 2015-02-16 19:25 GMT+01:00 Sandro Santilli <strk at keybit.net>:
>> On Mon, Feb 16, 2015 at 07:04:45PM +0100, Rémi Cura wrote:
>> >    (Batch creation from linestring:
>> >    node with GEOS,A
>> >    insert node into topology
>> >    cut linestring into pieces with nodes (various option, GEOS would be
>> best)
>> >    insert linestring pieces as edge, with only start_node and end_node
>> >    correct
>> >    compute edge_linking and face-linking
>> >    )
>> >    I already have everything in yellow.
>> Pity neither ASCII nor UTF8 have provision for colors :)
>> --strk;
>>  ()  ASCII ribbon campaign  --  Keep it simple !
>>  /\  http://strk.keybit.net/rants/ascii_mails.txt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20150217/a00d4950/attachment.html>

More information about the postgis-devel mailing list