mirror of
https://github.com/django/django.git
synced 2025-05-05 06:27:31 +00:00
Fixed #26137 -- Confirmed support for SpatiaLite 4.2/4.3 and added instructions.
This commit is contained in:
parent
04564eb74d
commit
93897a6a75
@ -13,7 +13,7 @@ Program Description Required
|
|||||||
:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes (SQLite only) 2.0, 1.11, 1.10, 1.9, 1.8, 1.7
|
:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes (SQLite only) 2.0, 1.11, 1.10, 1.9, 1.8, 1.7
|
||||||
:doc:`GeoIP <../geoip>` IP-based geolocation library No 1.4
|
:doc:`GeoIP <../geoip>` IP-based geolocation library No 1.4
|
||||||
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.1, 2.0
|
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.1, 2.0
|
||||||
`SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.1, 4.0, 3.0
|
`SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.3, 4.2, 4.1, 4.0, 3.0
|
||||||
======================== ==================================== ================================ ============================
|
======================== ==================================== ================================ ============================
|
||||||
|
|
||||||
Note that older or more recent versions of these libraries *may* also work
|
Note that older or more recent versions of these libraries *may* also work
|
||||||
@ -33,6 +33,8 @@ totally fine with GeoDjango. Your mileage may vary.
|
|||||||
Spatialite 3.0.0 2011-12-30
|
Spatialite 3.0.0 2011-12-30
|
||||||
Spatialite 4.0.0 2012-11-25
|
Spatialite 4.0.0 2012-11-25
|
||||||
Spatialite 4.1.0 2013-06-04
|
Spatialite 4.1.0 2013-06-04
|
||||||
|
Spatialite 4.2.0 2014-07-25
|
||||||
|
Spatialite 4.3.0 2015-09-07
|
||||||
|
|
||||||
.. admonition:: Install GDAL
|
.. admonition:: Install GDAL
|
||||||
|
|
||||||
|
@ -5,20 +5,30 @@ Installing Spatialite
|
|||||||
`SpatiaLite`__ adds spatial support to SQLite, turning it into a full-featured
|
`SpatiaLite`__ adds spatial support to SQLite, turning it into a full-featured
|
||||||
spatial database.
|
spatial database.
|
||||||
|
|
||||||
Check first if you can install Spatialite from system packages or binaries. For
|
First, check if you can install Spatialite from system packages or binaries.
|
||||||
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>`.
|
|
||||||
|
|
||||||
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
|
__ https://www.gaia-gis.it/fossil/libspatialite
|
||||||
__ http://www.gaia-gis.it/gaia-sins/
|
__ http://www.gaia-gis.it/gaia-sins/
|
||||||
|
|
||||||
.. _spatialite_source:
|
.. _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
|
Installing from source
|
||||||
======================
|
======================
|
||||||
|
|
||||||
@ -91,7 +101,7 @@ KyngChaos
|
|||||||
|
|
||||||
First, follow the instructions in the :ref:`kyngchaos` section.
|
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,
|
However, instead of attempting to compile the SpatiaLite tools from source,
|
||||||
download the `SpatiaLite Binaries`__ for OS X, and install ``spatialite`` in a
|
download the `SpatiaLite Binaries`__ for OS X, and install ``spatialite`` in a
|
||||||
location available in your ``PATH``. For example::
|
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'
|
SPATIALITE_LIBRARY_PATH='/usr/local/lib/mod_spatialite.dylib'
|
||||||
|
|
||||||
.. _Homebrew: http://brew.sh/
|
.. _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.
|
|
||||||
|
@ -3,7 +3,7 @@ Testing GeoDjango apps
|
|||||||
======================
|
======================
|
||||||
|
|
||||||
Included in this documentation are some additional notes and settings
|
Included in this documentation are some additional notes and settings
|
||||||
for :ref:`testing-postgis` and :ref:`testing-spatialite` users.
|
for :ref:`testing-postgis` users.
|
||||||
|
|
||||||
.. _testing-postgis:
|
.. _testing-postgis:
|
||||||
|
|
||||||
@ -79,16 +79,6 @@ a simple way to add superuser privileges to your database user.
|
|||||||
By default, the PostGIS installer on Windows includes a template
|
By default, the PostGIS installer on Windows includes a template
|
||||||
spatial database entitled ``template_postgis``.
|
spatial database entitled ``template_postgis``.
|
||||||
|
|
||||||
.. _testing-spatialite:
|
|
||||||
|
|
||||||
SpatiaLite
|
|
||||||
==========
|
|
||||||
|
|
||||||
Make sure the necessary spatial tables are created in your test spatial
|
|
||||||
database, as described in :ref:`create_spatialite_db`. Then just do this::
|
|
||||||
|
|
||||||
$ python manage.py test
|
|
||||||
|
|
||||||
.. _geodjango-tests:
|
.. _geodjango-tests:
|
||||||
|
|
||||||
GeoDjango tests
|
GeoDjango tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user