mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
--load-extension=spatialite shortcut, closes #1028
This commit is contained in:
parent
a4def0b8db
commit
6aa5886379
6 changed files with 54 additions and 6 deletions
|
|
@ -170,7 +170,7 @@ module, use the following command::
|
|||
docker run -p 8001:8001 -v `pwd`:/mnt \
|
||||
datasetteproject/datasette \
|
||||
datasette -p 8001 -h 0.0.0.0 /mnt/fixtures.db \
|
||||
--load-extension=/usr/local/lib/mod_spatialite.so
|
||||
--load-extension=spatialite
|
||||
|
||||
You can confirm that SpatiaLite is successfully loaded by visiting
|
||||
http://127.0.0.1:8001/-/versions
|
||||
|
|
|
|||
|
|
@ -8,6 +8,14 @@ The `SpatiaLite module <https://www.gaia-gis.it/fossil/libspatialite/index>`_ fo
|
|||
|
||||
To use it with Datasette, you need to install the ``mod_spatialite`` dynamic library. This can then be loaded into Datasette using the ``--load-extension`` command-line option.
|
||||
|
||||
Datasette can look for SpatiaLite in common installation locations if you run it like this::
|
||||
|
||||
datasette --load-extension=spatialite
|
||||
|
||||
If SpatiaLite is in another location, use the full path to the extension instead::
|
||||
|
||||
datasette --load-extension=/usr/local/lib/mod_spatialite.dylib
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
|
|
@ -25,7 +33,7 @@ This will install the ``spatialite`` command-line tool and the ``mod_spatialite`
|
|||
|
||||
You can now run Datasette like so::
|
||||
|
||||
datasette --load-extension=/usr/local/lib/mod_spatialite.dylib
|
||||
datasette --load-extension=spatialite
|
||||
|
||||
Installing SpatiaLite on Linux
|
||||
------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue