[postgis-users] Topology creation performance

Alexandre Silva amsilva at infoportugal.impresa.pt
Wed Nov 25 07:48:12 PST 2020


Hi,


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


In a first stage we fix overshoots and undershoots using a topology. We
have a priority for those fixes, so we must ensure the order so lines of
lower priority are snapped to higher ones and not the other way around
(we could make some logic around it but I think it will only slow the
process further).

I'm thinking about using an hybrid approach between your balanced cells
and Sandro's suggestion to insert the cell borders as lines in the
topology as I think that using your approach of adding cells to the
topology, some snaps might not be made.

Suppose that two lines are within snap distance, if the cell lines
passes across that gap, that snap will not be made as each cell is
processed separately. Your approach is more suited to a last step, when
all lines are fixed and some attributes are added, then it seems that
the parallelization will speed up the whole process. Is my understanding
correct or am I missing something of your cell based approach?


> 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 also tried doing this in another splitting test where the project was
broken into 4 pieces, but as you said, the gluing was too complex to
keep on that route


> With help from Sandro, Nibio has been working projects
>
>   * https://github.com/NibioOpenSource/pgtopo_update_sql
>     <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNibioOpenSource%2Fpgtopo_update_sql&data=04%7C01%7Camsilva%40infoportugal.impresa.pt%7Cd46249ee12db431058d508d8904349ac%7Cd227b2e71c404f63b5132f3665c334e6%7C0%7C0%7C637417965969050185%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3O7HbecbQ4VyLoTHlohiiMQzGmjgBtBndIb9VJaOZic%3D&reserved=0>
>     :
>       o make simple clients for updating of Postgis Topology
>
>   * https://github.com/larsop/resolve-overlap-and-gap
>     <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flarsop%2Fresolve-overlap-and-gap&data=04%7C01%7Camsilva%40infoportugal.impresa.pt%7Cd46249ee12db431058d508d8904349ac%7Cd227b2e71c404f63b5132f3665c334e6%7C0%7C0%7C637417965969050185%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=88xaGPALj4joZLB1tD2xELwY9Wscd8xbYhhH64nUH6w%3D&reserved=0>:
>
>       o to clean up in overlap gaps from Simple Feature dataset's and
>         return a new clean Simple Feature datset's
>       o to convert simple feature data (surface only or both line and
>         surface with attributes)
>

Will check those projects later, as they might be useful for some things
we do. Thanks!


Thanks,

Alexandre Silva

[http://newsletter.impresapublishing.pt/i/barra_ip.jpg]


More information about the postgis-users mailing list