PostGIS topology ISO SQL/MM complete

PostGIS implementation of the ISO SQL/MM Topology-Geometry model is finally complete.

The SQL/MM model is just a portion of the whole topology support, but an important one, including schema definition and functions to create and populate the schema with primitive components (nodes, edges, faces).

In addition to the base model, PostGIS adds a TopoGeometry data type for use wherever you would normally use a Geometry type, except the former will be defined by references to primitive, shared, topological components.

The work on SQL/MM topology for PostGIS 2.0 was mainly funded by the Land Management department of the Tuscany Region as part of a larger project aimed at enhancing effectiveness of free software tools already in use within the institution for the management of the topographic database (chapeau!).

But more work is needed to make it easier to convert your layers to topological layers, your Geometries to TopoGeometries. Because I know you want to generalize your vectors in a topologically consistent way, don’t you ? And you want to edit the boundaries just once. And do you want to waste all that space for your triangles ?

Feature freeze for 2.0 will be by the end of November. Drop a note ASAP if you’d like to help with getting the enhanced TopoGeometry constructor shipped with it.

Tags: ,

12 Responses to “PostGIS topology ISO SQL/MM complete”

  1. Jeremy says:

    Is there a QGIS plugin for managing PostGIS topologies yet?

  2. strk says:

    There’s very basic support in the db_manager plugin to open a set of layers which help you visualize your topology, but nothing more than that yet at time of writing.

    What kind of management features would you like to see exposed ?

  3. Jeremy says:

    Have the ability to construct and edit topology objects, modify and reshape edges, validate and preview topology errors. Wrapped up into a nice topology editing toolbar :)

  4. strk says:

    There’s a ticket on qgis tracker about unifying the topological editing toolbar here:

    I’m not sure the GRASS toolbar would be appropriate for PostGIS topology editing.
    A toolbar oriented toward ISO SQL/MM editing functions would allow:
    adding an isolated node, adding an edge, splitting an edge, modifying an edge, removing an edge, removing a node. Topologies constructed through such functions would always be valid as invalidity would be caught by the functions themselves.

    Such editing would need to be in sync with DB in order to make use of the functions, so would benefit from some locking and possibly versioning support.

    I guess the next step here would be drafting design on a qgis wiki page…

  5. Sandro,

    This is a great news.

  6. Luís Ferreira says:

    A drafting design / specification, on qgis wiki, would be essential.

    Something analogous to ArcSomething topology tools: a (1) topology layer (in memory or else), where we can define the intervening layers/postgis tables, (2) rules (overlaps, gaps, covers, contains), (3) a list of errors, and (4) tools to merge/subtract/create feature/mark as exception or error.

    This would a plus (++++) if created. Add this to (fast) raster reprojection and good cartographic production tools and say good bye to proprietary software.

  7. strk says:

    Agreed on design/specification needs. Not that easy to find the time. If you start it please report the url back here and I’ll take a look.

  8. [...] early tester of the new PostGIS Topology submitted an interesting dataset which kept me busy for a couple of weeks fixing a bunch of bugs [...]

  9. [...] PostGIS 2.0 Topology Support [...]

  10. Celati says:

    Good afternoon Sandro,

    Regarding a big project in Cameroon,I’m trying to test Postgis topology support.
    Is it possible to define with postgis topology rules before data capture? (Following the example of the geodatabases Arcgis).

    Is there a qgis extension to defining rules, validate or correct the topology?

    In your opinion, what is the best PostGIS-QGIS client (qgis,grass, open jump, Udig …) to manage, validate and rectify topology?

    Thank you to throw light for me.


  11. strk says:

    postgis topology has its own base rules defined by ISO SQL/MM, you can build more rules on it, if you want, but not disable the basic ones (like no intersections allowed without a node).

    Of course you can always build your own topology model with fully custom rules.

    The only graphical editing tool I’m aware of is a work in progress for GRASS 7:

  12. Celati says:

    Dear Sandro,

    I’m a Postgis novice..i worked few years with arcgis ‘s geodatabase in order to define between data capture: relations before tables & define strict topology rules. is it possible to do that in Postgis? Regarding my big project in Africa, i need to define strict rules. For instance, i have several faces tables and i would like define before data capture rules : edges communs to several faces would be topologic and honest (of integrity)…Could you throw light for me ?
    On my side, i will try to read your exemples and tutorials in order to understand Postgis Topology…Up to now, i have created topolgy schema…Thank you…kind regards.Laurent

Leave a Reply