I wanted to experiment with the topology-geometry support that is available in SpatiaLite 5.0.1, but hitting a roadblock upon creating a topology. I am following the tutorial Familiarizing with Topology-Geometry: an elementary tutorial.

I executed the following commands:

$ rm -f test.sqlite
$ sqlite3 test.sqlite
sqlite> select load_extension('mod_spatialite');
sqlite> select spatialite_version();
sqlite> select HasTopology();
sqlite> SELECT CreateTopology('topotest', 4326, 0, 0); -- this call fails, not topology table is created

So according to the output my SpatiaLite installation has support for topology. Yet the CreateTopology call is failing, no topology table is created. Which is also indicated by the return value, see the SpatiaLite docs.

Any idea's on troubleshooting the issue?

I am running on Ubuntu 21.10 with libsqlite3-mod-spatialite:5.0.1-2build1:

$ sudo apt-cache policy libsqlite3-mod-spatialite
  Installed: 5.0.1-2build1
  Candidate: 5.0.1-2build1
  Version table:
 *** 5.0.1-2build1 500
        500 http://nl.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
        100 /var/lib/dpkg/status
  • Do you get the same error with the command that is used in the tutorial SELECT CreateTopology('topotest', 4326, 0, 0);?
    – user30184
    Mar 11, 2022 at 21:24
  • Good question; the result is the same. Will update the question with the commands from the tutorial. Mar 11, 2022 at 22:36

1 Answer 1


I can only say that the command returns "1" and the topology tables are created with this spatialite-gui version on Windows.

enter image description here

Maybe you should send a question to Spatialite-users group https://groups.google.com/g/spatialite-users.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .