|
@@ -5,20 +5,30 @@ Installing Spatialite
|
|
|
`SpatiaLite`__ adds spatial support to SQLite, turning it into a full-featured
|
|
|
spatial database.
|
|
|
|
|
|
-Check first if you can install Spatialite from system packages or binaries. For
|
|
|
-example, on Debian-based distributions, try to install the ``spatialite-bin``
|
|
|
-package. For Mac OS X, follow the
|
|
|
-:ref:`specific instructions below<spatialite_macosx>`. For Windows, you may
|
|
|
-find binaries on `Gaia-SINS`__ home page. In any case, you should always
|
|
|
-be able to :ref:`install from source<spatialite_source>`.
|
|
|
+First, check if you can install Spatialite from system packages or binaries.
|
|
|
|
|
|
-When you are done with the installation process, skip to :ref:`create_spatialite_db`.
|
|
|
+For example, on Debian-based distributions, try to install the
|
|
|
+``spatialite-bin`` package. For distributions that package SpatiaLite 4.2+,
|
|
|
+install ``libsqlite3-mod-spatialite``.
|
|
|
+
|
|
|
+For Mac OS X, follow the :ref:`instructions below<spatialite_macosx>`.
|
|
|
+
|
|
|
+For Windows, you may find binaries on the `Gaia-SINS`__ home page.
|
|
|
+
|
|
|
+In any case, you should always be able to :ref:`install from source
|
|
|
+<spatialite_source>`.
|
|
|
|
|
|
__ https://www.gaia-gis.it/fossil/libspatialite
|
|
|
__ http://www.gaia-gis.it/gaia-sins/
|
|
|
|
|
|
.. _spatialite_source:
|
|
|
|
|
|
+.. admonition:: ``SPATIALITE_LIBRARY_PATH`` setting required for SpatiaLite 4.2+
|
|
|
+
|
|
|
+ If you're using SpatiaLite 4.2+, you must put this in your settings::
|
|
|
+
|
|
|
+ SPATIALITE_LIBRARY_PATH = 'mod_spatialite'
|
|
|
+
|
|
|
Installing from source
|
|
|
======================
|
|
|
|
|
@@ -91,7 +101,7 @@ KyngChaos
|
|
|
|
|
|
First, follow the instructions in the :ref:`kyngchaos` section.
|
|
|
|
|
|
-When :ref:`create_spatialite_db`, the ``spatialite`` program is required.
|
|
|
+When creating a SpatiaLite database, the ``spatialite`` program is required.
|
|
|
However, instead of attempting to compile the SpatiaLite tools from source,
|
|
|
download the `SpatiaLite Binaries`__ for OS X, and install ``spatialite`` in a
|
|
|
location available in your ``PATH``. For example::
|
|
@@ -124,12 +134,3 @@ following to your ``settings.py``::
|
|
|
SPATIALITE_LIBRARY_PATH='/usr/local/lib/mod_spatialite.dylib'
|
|
|
|
|
|
.. _Homebrew: http://brew.sh/
|
|
|
-
|
|
|
-.. _create_spatialite_db:
|
|
|
-
|
|
|
-Creating a spatial database for SpatiaLite
|
|
|
-==========================================
|
|
|
-
|
|
|
-When running ``manage.py migrate`` with a SQLite or SpatiaLite database, the
|
|
|
-database file will be automatically created if it doesn't exist. Django will
|
|
|
-also ensure that the spatial metadata are initialized in the database.
|