|Version 71 (modified by jbronn, 8 years ago) (diff)|
GeoDjango requires the installation of several open source geographic libraries and a database system with spatial extensions
- Currently PostgreSQL (with PostGIS), MySQL, and Oracle (Spatial/Locator) are supported.
- PostgreSQL is the recommended database, having the most mature and feature-rich spatial functions and operators.
- Note: Several components of GeoDjango can be used without a database (ie. The GeoIP utility)
- GeoDjangoDebianLennyInstall : No compilation required, all the Debian packages work with geodjango out of the box.
This section will describe the source code installation process for these prerequisites.
- GeoDjangoUbuntuInstall is another page describing an apt-get approach to installing dependencies
GeoDjango is best supported using PostgreSQL/PostGIS on Linux/UNIX platforms, but will also run on Windows (with a little more effort). The following platforms have been confirmed to work -- feel free to add to the list:
- Mac OS X
- 10.4.10 (Tiger)
- 10.5 (Leopard)
- Solaris 5.11
- Windows XP SP2
Linux & UNIX Platforms
The official documentation for building from source may be found at geodjango.org.
Documentation suggestions, comments, and tips may be put here.
The GEOS install instructions has moved to geodjango.org.
The PROJ.4 install instructions has moved to geodjango.org.
The PostGIS install instructions has moved to geodjango.org.
The GDAL installation documentation has moved to geodjango.org.
GeoDjango has preliminary support for Oracle Locator/Spatial as of r6524 (though none of the advanced features of Oracle Spatial are utilized). Oracle's express edition (XE) is not supported. Apparently, even though XE supports Locator's SDO_GEOMETRY objects and queries, XE does not include support for Java extensions -- which are required to construct and/or extract geometries from WKT. For the sake of simplicity, WKT geometry construction and extraction was used when implementing the [browser:django/branches/gis/django/contrib/gis/db/backend/oracle Oracle spatial backend]. Patches for creating WKT from SDO_GEOMETRY statements would be required to extend support for the XE platforms.
- See Siva Rivada's (sravada) forum posts in the following Oracle forum threads: "Re: Problem with TO_WKTGEOMETRY/FROM_WKTGEOMETRY", and "Oracle Database 10g R2 (10.2.0.1) Express Edition (Locator) Available!!"
- Oracle 10g and above with Locator (installation is way beyond the scope of this documentation).
- cx_Oracle 4.3.2 and above.
- GEOS (still required for Lazy-Geometries -- see installation instructions above).
Third-Party Library Installation Tests
You can run these tests in order to see if the installation was successful.
>>> from django.contrib.gis.gdal import HAS_GDAL >>> print HAS_GDAL # Will be False if GDAL libraries are not found True >>> from django.contrib.gis.tests import test_gdal >>> test_gdal.run()
If HAS_GDAL == FALSE, see GDALTroubleshooting
>>> from django.contrib.gis.tests import test_geos >>> test_geos.run()