[postgis-users] Topology creation performance

Lars Aksel Opsahl Lars.Opsahl at nibio.no
Mon Nov 23 22:36:28 PST 2020

>From: Alexandre Silva <amsilva at infoportugal.impresa.pt>Sent: Monday, November 23, 2020 2:38 PMTo: PostGIS Users Discussion <postgis-users at lists.osgeo.org>; Lars Aksel Opsahl <Lars.Opsahl at nibio.no>Subject: Re: [postgis-users] Topology creation performance
>On 23/11/20 07:39, Lars Aksel Opsahl wrote:
>Hi and thanks for your input,
>I saw your foss4g presentation and your approach was one that I was
>considering use, but I hadn't find the source code yet outside of the
>Do the repo approach have the same ruleset as the presentation?


Yes pretty much but , but I have the made merging of cells a bit more complicated.

I also tried to cut off crossing part with a tolerance for lines that was crossing cell borders and glue them in later but that just made the code more complex and less robust .

I mostly only focus on the edges because Sandro's Topology code makes sure that all faces also are available if I manage add all edges correctly. From the faces I then generate the surfaces (polygons) when needed.

>I have
>the need of processing only cells when there is no line falling outside
>that cell or the ordering may not be respected, so the cell merging is
>also a point that I have to ensure.

This I did not understand because the order of adding edges should not have any effect on the result, related to faces generated.

About big polygons, we have polygons 295834 points and 5042 holes and Postgis Topology seems to handles it OK, with breaking them up in to smaller parts.

>Alexandre Silva

My experience is that Postgis Topology is very good tool for instance to :
(Because we have a single line between polygons that intersects and not two different lines and objects as in simple feature)

  *   Ensure that your data are spatially consistent when updated
  *   Remove overlap and gap from simple feature dataset's
  *   Line smoothing for instance when converting pixel data to vector a kind of generalization .

With help from Sandro, Nibio has been working projects

  *   https://github.com/NibioOpenSource/pgtopo_update_sql :
     *   make simple clients for updating of Postgis Topology

  *   https://github.com/larsop/resolve-overlap-and-gap :
     *   to clean up in overlap gaps from Simple Feature dataset's and return a new clean Simple Feature datset's
     *   to convert simple feature data (surface only or both line and surface with attributes)

You mention funding of Postgis Topology, I would love to see more funding of Postgis Topology because without Postgis we would not have been able handle problems caused by simple feature in such an efficient way.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201124/aac50d7e/attachment.html>

More information about the postgis-users mailing list