On the fly simplification of topologically defined geometries

Keeping GIS data in full-resolution and simplifying it on demand is a known challenge: simplification has to be fast and its output has to be topologically consistent.

simplified geometriessimplified topogeometries

We saw how to get a topologically consistent simplified version of a full layer, but that method isn’t fast enough for on-demand usage. Also, we saw how to perform a fast simplification by sacrificing the degree or generalization so that the introduced inconsistency would not be visible on a rendering surface.

An approach balancing speed and quality would take advantage of the topological definition of geometries to constraint the simplification work by ensuring shared edges get an identical treatment.

This is now possible with the addition in PostGIS of a  new version of ST_Simplify accepting a TopoGeometry as input.

In the picture above you can see the difference between using Geometry or TopoGeometry objects for simplifying the provinces of Tuscany with a tolerance of 8km. The ST_Simplify function runs at comparable speed in both cases.

Tags: ,

3 Responses to “On the fly simplification of topologically defined geometries”

  1. kimaidou says:

    Thanks for sharing this ! I read your post using topology tools, and I would like to understand well what to change there considering the new possibility of ST_Simplify.

    Are you saying we can now replace :
    SELECT SimplifyEdgeGeom(‘france_dept_topo’, edge_id, 10000) FROM france_dept_topo.edge;
    and the following commands by

    UPDATE france_dept SET topogeom = ST_Simplify(topogeom, 10000);

    without the need of your function SimplifyEdgeGeom ?

  2. strk says:

    ST_Simplify(topogeom, 10000) returns a literal (simple) geometry, not a TopoGeometry, so you can’ t use it to replace the “topogeom” field value in the “france_dept” table.
    But you can use it for visualizzation purposes (thus the “on-the-fly” part of the article’s title).

  3. kimaidou says:

    Ok, thanks for your answer.

Leave a Reply