When attempting to fire up the django server, I get the following error:
django.core.exceptions.ImproperlyConfigured: Could not import user-defined GEOMETRY_BACKEND "geos".
I'm running postgresql8.4 on Mac OS Lion.
I've used Macports to install PostGIS. Here's what $ port installed shows:
postgis @1.5.2_1+postgresql84 postgis @1.5.2_1+postgresql90 postgis @1.5.3_0+postgresql90 postgis @1.5.3_0+postgresql91 (active)
Here's what I get when attempting to determine what version of PostGIS I've got:
geodjango=# SELECT PostGIS_full_version();
ERROR: could not access file "$libdir/postgis-1.5": No such file or directory
CONTEXT: SQL statement "SELECT postgis_lib_version()"
PL/pgSQL function "postgis_full_version" line 11 at SQL statement
First, download the OSGeo4W installer (64bit), and run it. Select Express Web-GIS Install and click next. In the 'Select Packages' list, ensure that GDAL is selected; MapServer is also enabled by default, but is not required by GeoDjango and may be unchecked safely.
GeoDjango is an included contrib module for Django that turns it into a world-class geographic web framework. GeoDjango strives to make it as simple as possible to create geographic web applications, like location-based services. Its features include: Django model fields for OGC geometries and raster data.
GDAL stands for Geospatial Data Abstraction Library, and is a veritable “Swiss army knife” of GIS data functionality. A subset of GDAL is the OGR Simple Features Library, which specializes in reading and writing vector geographic data in a variety of standard formats.
Just in case some developers are facing this problem on Ubuntu, I solved it just installing libgeos-lib
sudo apt-get install libgeos-dev
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With