[postgis-users] Topology: cannot delete slivers (or gaps)

Rémi Cura remi.cura at gmail.com
Wed Nov 19 03:50:09 PST 2014


Hey Sandro,
in my opinion we don't need a better speed for current construction, we
need a batch constructing mode !
Optimally it could be done by using the geos, because it constructs all the
topology very very fast.

Adding one feature is actually quite fast, even on already big topology.

Its when you want to add a lot's that it becomes increasingly slow (maybe
because indexes are not updated,or because we are in one transaction?)
The slowing seems to be very non linear, probably following n^2, where n is
the number of feature already constructed in the transaction.

Cheers,
Rémi

2014-11-19 12:27 GMT+01:00 Sandro Santilli <strk at keybit.net>:

> On Tue, Nov 18, 2014 at 08:26:29PM +0100, Rémi Cura wrote:
> > This is suprising indeed.
> > Im my test using the v.out.postgis was still way faster than constructing
> > with postgis topology (about x3 I think).
> >
> > Are you using v.out.postgis -l, with grass 7?
>
> Yes.
>
> The topology was pretty big, maybe that's the difference.
> Here's the dataset (not sure if still accessible):
> http://lists.osgeo.org/pipermail/postgis-devel/2014-January/024085.html
>
> GRASS 7.0.0beta3 (world):~ > v.info -t map=million_poly_topo1
> nodes=3247661
> points=0
> lines=0
> boundaries=5102420
> centroids=1161248
> areas=1855936
> islands=1177
> primitives=6263668
> map3d=0
>
> > Now I think I should have used a python way from within grass (grass
> offers
> > full binding, so it should be doable to loop trough grass internal
> topology
> > and convert it to postgis topology)
> >
> > I tried to reach grass dev several time to try to improve the postgis
> > export, I had no answer.
>
> That's unfortunate.
>
> > My intuition is that the slowness comes from the fact that grass tries to
> > write  edge by edge , and each time the edge_data trigger are triggered.
> > The correct way would be to compute full topology structure, then
> > deactivate trigger, then fill table , then reactivate trigger.
>
> Or maybe it has to build the next_{left,right}_face info too.
> Enabling PostgreSQL logging should tell (but better not done with
> a ~2 million polygons topology).
>
> Oh how better it would be to speed up topology building in PostGIS :)
>
> --strk;
>
>   ()   Free GIS & Flash consultant/developer
>   /\   http://strk.keybit.net/services.html
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141119/7388142e/attachment.html>


More information about the postgis-users mailing list