Tweaked SpatiaLite GeoDjango docs.

This commit is contained in:
Ramiro Morales 2012-08-19 22:03:50 -03:00
parent 3631db88cb
commit 26e0ba07ae
2 changed files with 9 additions and 12 deletions

View File

@ -60,14 +60,14 @@ The geospatial libraries required for a GeoDjango installation depends
on the spatial database used. The following lists the library requirements, on the spatial database used. The following lists the library requirements,
supported versions, and any notes for each of the supported database backends: supported versions, and any notes for each of the supported database backends:
================== ============================== ================== ========================================================== ================== ============================== ================== =========================================
Database Library Requirements Supported Versions Notes Database Library Requirements Supported Versions Notes
================== ============================== ================== ========================================================== ================== ============================== ================== =========================================
PostgreSQL GEOS, PROJ.4, PostGIS 8.1+ Requires PostGIS. PostgreSQL GEOS, PROJ.4, PostGIS 8.1+ Requires PostGIS.
MySQL GEOS 5.x Not OGC-compliant; limited functionality. MySQL GEOS 5.x Not OGC-compliant; limited functionality.
Oracle GEOS 10.2, 11 XE not supported; not tested with 9. Oracle GEOS 10.2, 11 XE not supported; not tested with 9.
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.6.+ Requires SpatiaLite 2.3+, pysqlite2 2.5+, and Django 1.1. SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.6.+ Requires SpatiaLite 2.3+, pysqlite2 2.5+
================== ============================== ================== ========================================================== ================== ============================== ================== =========================================
.. _geospatial_libs: .. _geospatial_libs:
@ -467,8 +467,8 @@ pysqlite2
^^^^^^^^^ ^^^^^^^^^
Because SpatiaLite must be loaded as an external extension, it requires the Because SpatiaLite must be loaded as an external extension, it requires the
``enable_load_extension`` method, which is only available in versions 2.5+. ``enable_load_extension`` method, which is only available in versions 2.5+ of
Thus, download pysqlite2 2.6, and untar:: pysqlite2. Thus, download pysqlite2 2.6, and untar::
$ wget http://pysqlite.googlecode.com/files/pysqlite-2.6.0.tar.gz $ wget http://pysqlite.googlecode.com/files/pysqlite-2.6.0.tar.gz
$ tar xzf pysqlite-2.6.0.tar.gz $ tar xzf pysqlite-2.6.0.tar.gz
@ -583,7 +583,7 @@ After you've installed SpatiaLite, you'll need to create a number of spatial
metadata tables in your database in order to perform spatial queries. metadata tables in your database in order to perform spatial queries.
If you're using SpatiaLite 3.0 or newer, use the ``spatialite`` utility to If you're using SpatiaLite 3.0 or newer, use the ``spatialite`` utility to
call the ``InitSpatiaMetaData()`` function, like this:: call the ``InitSpatialMetaData()`` function, like this::
$ spatialite geodjango.db "SELECT InitSpatialMetaData();" $ spatialite geodjango.db "SELECT InitSpatialMetaData();"
the SPATIAL_REF_SYS table already contains some row(s) the SPATIAL_REF_SYS table already contains some row(s)
@ -643,10 +643,6 @@ Invoke the Django shell from your project and execute the
>>> from django.contrib.gis.utils import add_srs_entry >>> from django.contrib.gis.utils import add_srs_entry
>>> add_srs_entry(900913) >>> add_srs_entry(900913)
.. note::
In Django 1.1 the name of this function is ``add_postgis_srs``.
This adds an entry for the 900913 SRID to the ``spatial_ref_sys`` (or equivalent) This adds an entry for the 900913 SRID to the ``spatial_ref_sys`` (or equivalent)
table, making it possible for the spatial database to transform coordinates in table, making it possible for the spatial database to transform coordinates in
this projection. You only need to execute this command *once* per spatial database. this projection. You only need to execute this command *once* per spatial database.

View File

@ -121,7 +121,8 @@ Settings
Only relevant when using a SpatiaLite version older than 3.0. Only relevant when using a SpatiaLite version older than 3.0.
By default, the GeoDjango test runner looks for the SpatiaLite SQL in the By default, the GeoDjango test runner looks for the :ref:`file containing the
SpatiaLite dababase-initialization SQL code <create_spatialite_db>` in the
same directory where it was invoked (by default the same directory where same directory where it was invoked (by default the same directory where
``manage.py`` is located). To use a different location, add the following to ``manage.py`` is located). To use a different location, add the following to
your settings:: your settings::