[postgis-users] Performance comparison between PostGIS's topology creation and topojson (the module)

Sandro Santilli strk at keybit.net
Mon Mar 17 01:51:03 PDT 2014


On Mon, Mar 17, 2014 at 07:31:44PM +1100, Luca Morandini wrote:
> Folks,
> 
> I am implementing a tiled-TopoJSON server in Node,js/PostGIS, and I
> am puzzled by the performance I am getting from PostGIS.
> 
> With topojson (the Node.js module), the generation of TopoJSON (the
> format) from a GeoJSON input takes about 3 seconds.... while
> generating a topology, for the same data of course, takes about 4
> minutes with PostGIS.

Topology building speed is a known problem with PostGIS.

A few resons I can think of:

 1) PostGIS makes a lot of disk writing during operations,
    this is to allow scaling with huge topologies not fitting in RAM
    (by design for toTopoGeom, accidentally for CreateTopoGeo).

 2) If I'm not mistaken the TopoJSON package does not attempt at any
    noding of the input, so if you have a partial segment overlap it
    would fail to recognize it as shared

 3) The PostGIS (ISO) model requires storing more informations about
    edges (left/right face and bounding edges)

That said, see #2610 and #2616 for recent speed improvements
with larger topologies.

--strk;

 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  


More information about the postgis-users mailing list