I ended up manually installing some packages (lowest dependency on top) from the Groovy Gorilla repos:
apt-get install -y --no-install-recommends wget \
proj-bin proj-data gdal-bin sqlite3 libgeos-dev librttopo-dev \
zlib1g libpq5 libc-bin libc6 libtiff-dev libsqlite3-dev libcurl4-openssl-dev \
&& wget -q http://archive.ubuntu.com/ubuntu/pool/universe/p/proj/proj-data_7.1.0-1_all.deb \
&& wget -q http://archive.ubuntu.com/ubuntu/pool/universe/p/proj/libproj19_7.1.0-1_amd64.deb \
&& wget -q http://archive.ubuntu.com/ubuntu/pool/universe/p/proj/libproj-dev_7.1.0-1_amd64.deb \
&& wget -q http://archive.ubuntu.com/ubuntu/pool/universe/s/spatialite/libspatialite7_5.0.0-1_amd64.deb \
&& wget -q http://archive.ubuntu.com/ubuntu/pool/universe/s/spatialite/libspatialite-dev_5.0.0-1_amd64.deb \
&& dpkg -i proj-data_7.1.0-1_all.deb \
&& dpkg -i libproj19_7.1.0-1_amd64.deb \
&& dpkg -i libproj-dev_7.1.0-1_amd64.deb \
&& dpkg -i libspatialite7_5.0.0-1_amd64.deb \
&& dpkg -i libspatialite-dev_5.0.0-1_amd64.deb \
&& rm --interactive=never proj-data_7.1.0-1_all.deb libproj19_7.1.0-1_amd64.deb \
libproj-dev_7.1.0-1_amd64.deb libspatialite7_5.0.0-1_amd64.deb libspatialite-dev_5.0.0-1_amd64.deb \
&& apt-get -y autoremove --purge && apt-get -y autoclean && ldconfig \
(yes, awful, but working).
My tests where these two function calls, especially the second one:
ogrinfo -dialect "SQLite" db.sqlite -sql "SELECT sqlite_version();"
ogrinfo -dialect "SQLite" db.sqlite -sql "SELECT spatialite_version();"
Which results in the following when using osgeo/gdal:ubuntu-full-3.2.1
:
INFO: Open of `db.sqlite'
using driver `SQLite' successful.
Layer name: SELECT
Geometry: None
Feature Count: 1
Layer SRS WKT:
(unknown)
sqlite_version(): String (0.0)
OGRFeature(SELECT):0
sqlite_version() (String) = 3.31.1
and
INFO: Open of `db.sqlite'
using driver `SQLite' successful.
Layer name: SELECT
Geometry: None
Feature Count: 1
Layer SRS WKT:
(unknown)
spatialite_version(): String (0.0)
OGRFeature(SELECT):0
spatialite_version() (String) = 4.3.0a
respectively. And there, ST_MakeValid()
was not known.
And it results the following with the workaround shown here above, and using osgeo/gdal:ubuntu-small-3.2.1
(~700MB lighter than the full version):
- 'VirtualXPath' [XML Path Language - XPath]
INFO: Open of `db.sqlite'
using driver `SQLite' successful.
Layer name: SELECT
Geometry: None
Feature Count: 1
Layer SRS WKT:
(unknown)
sqlite_version(): String (0.0)
OGRFeature(SELECT):0
sqlite_version() (String) = 3.31.1
and
- 'VirtualXPath' [XML Path Language - XPath]
INFO: Open of `db.sqlite'
using driver `SQLite' successful.
Layer name: SELECT
Geometry: None
Feature Count: 1
Layer SRS WKT:
(unknown)
spatialite_version(): String (0.0)
OGRFeature(SELECT):0
spatialite_version() (String) = 5.0.0
respectively. And there, ST_MakeValid()
was actually available!
It seems these functions where not available with spatialite versions < 5.x. But I'm quite sure I'm wrong somewhere because on the doc, it's written version 4.2 and ST_MakeValid() was already there.