TOC()

GeoDjango Installation

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.

Background

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:

  • 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.

GEOS

The GEOS install instructions has moved to geodjango.org.

PROJ.4

The PROJ.4 install instructions has moved to geodjango.org.

PostGIS

The PostGIS install instructions has moved to geodjango.org.

GDAL

The GDAL installation documentation has moved to geodjango.org.

Windows

Please refer to Windows installation instructions available at geodjango.org.

Oracle

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.

Requirements

  • 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.

$ python
>>> 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()
Last modified 11 years ago Last modified on Oct 11, 2013, 11:09:32 AM
Note: See TracWiki for help on using the wiki.
Back to Top