Changes between Version 71 and Version 72 of GeoDjango
- Timestamp:
- May 23, 2007, 7:43:06 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GeoDjango
v71 v72 87 87 * Support for a mapping framework (e.g. Google Maps/Earth, Yahoo Maps, MS Live, etc.) 88 88 * Admin fields and forms (WKT field currently as of r4884, but we want widgets to view and manipulate geographic objects). 89 * Utilities for importing raster data (SHP files first) directly into Django models. 89 * Utilities for importing raster data (SHP files first) directly into Django models -- will be done with the forthcoming {{{LayerMapping}}} class. 90 * Distance queries, calculations, and related utilities. 90 91 * '''Complete''' 91 92 * PostGIS indexing capability. … … 174 175 175 176 == Spatial Queries == 176 After a geographic model has been created, the PostGIS additions to the API may be used. Geographic queries are done bynormally by using {{{filter()}}} and {{{exclude()}}} on geometry-enabled models using geographic lookup types (''see'' the [GeoDjango#DatabaseAPI Database API] below for lookup types). In the following example, the {{{bbcontains}}} lookup type is used which is the same as the PostGIS {{{&&}}} operator. It looks to see if the ''bounding box'' of the polygon contains the specific point. The next example uses the PostGIS {{{Contains()}}} function, which calls GEOS library to test if the ''polygon'' actually contains the specific point, not just the bounding box.177 After a geographic model has been created, the PostGIS additions to the API may be used. Geographic queries are done normally by using {{{filter()}}} and {{{exclude()}}} on geometry-enabled models using geographic lookup types (''see'' the [GeoDjango#DatabaseAPI Database API] below for lookup types). In the following example, the {{{bbcontains}}} lookup type is used which is the same as the PostGIS {{{&&}}} operator. It looks to see if the ''bounding box'' of the polygon contains the specific point. The next example uses the PostGIS {{{Contains()}}} function, which calls GEOS library to test if the ''polygon'' actually contains the specific point, not just the bounding box. 177 178 {{{ 178 179 #!python … … 196 197 = Installation = 197 198 Installation of the GeoDjango module will also require the installation of existing open source geographic libraries and a spatial database (currently only PostGIS). This section will describe the installation process for these libraries. Initially, these instructions will pertain only to a Linux platform (particularly Debian or Ubuntu). Mac & Windows support will be considered later; however, these instructions will most likely work through the Mac shell. ~~Don't hold your breath for Windows support.~~ Community support for prerequisites is better than previously believed, Windows support will come much earlier than expected. 199 == Python & PostgreSQL == 200 * '''Python''' 201 * ''Required:'' Python 2.4 is required because of heavy use of 2.4 decorator syntax (''e.g.'' {{{@property}}}). The {{{ctypes}}} module needs to be installed as well. 202 * ''Recommended:'' Python 2.5 is recommended because the {{{ctypes}}} module comes included. [http://www.python.org/download/releases/2.5.1/ Python 2.5.1] is the current latest. 203 * '''PostgreSQL''' 204 * ''Recommended:'' PostgreSQL 8.X 205 * We are currently using v8.1 of PostgreSQL, and know of no problems with 8.2 206 * On Ubuntu Feisty, you'll need the apt packages {{{postgresql-server-dev-8.x}}} (the development headers are needed for PostGIS compilation) and {{{postgresql-8.x}}}. 198 207 == Django == 199 208 * GeoDjango exists in the {{{gis}}} branch from SVN: … … 225 234 == PostGIS == 226 235 * Latest [http://postgis.refractions.net/download/ PostGIS] version is 1.2.1 227 * First build & install PostGIS. We are currently using v8.1 of PostgreSQL. 228 * On Ubuntu Feisty, you'll need postgresql-server-dev-8.x as well as postgresql-8.x. 236 * First build & install PostGIS. 229 237 {{{ 230 238 $ ./configure --with-geos --with-proj … … 257 265 * Latest [http://www.gdal.org/download.html GDAL] version is 1.4.1. Configure with GEOS and Python support, then make and install: 258 266 {{{ 259 $ ./configure --with-geos --with- ngpython267 $ ./configure --with-geos --with-python 260 268 $ make 261 269 # make install 262 270 }}} 263 * ''Note'': This is done with the 'next generation' SWIG Python bindings. The compilation flag to enable the old bindings (no longer supported) is {{{--with-python}}}.264 * Note also that as of 1.4.1, ngpython didn't work with python2.5. It's fixed on trunk per their ticket [http://trac.osgeo.org/gdal/ticket/1379 1379].271 * This is done without the 'next generation' SWIG Python bindings. The compilation flag to enable the new bindings is {{{--with-ngpython}}}. 272 * ''Note'': As of 1.4.1, {{{ngpython}}} bindings don't work with Python 2.5. While it's listed as fixed on trunk per their ticket [http://trac.osgeo.org/gdal/ticket/1379 1379], I've still had issues with using the trunk. A {{{ctypes}}} interface, for needed GeoDjango functionality, is forthcoming. 265 273 266 274 = Model API =