43 | | !GeoDjango uses the [http://geos.refractions.net/downloads/geos-3.0.0.tar.bz2 3.0.0] version of [http://geos.refractions.net/ GEOS], and is not compatible with the 2.x versions. With the release of 3.0.0, support for the release candidate versions will be eventually deprecated due to differences in the way geometries are serialized to WKT and HEX, as well as compilation issues for OSX 10.5. However, the RC4 libraries are still supported for the moment, though we urge users to migrate to the 3.0.0 release. |
| 43 | * ''Required'': GEOS v3.0.0RC4 and above (''not'' compatible with the 2.x versions). |
| 44 | * ''Recommended'': GEOS [http://geos.refractions.net/downloads/geos-3.0.0.tar.bz2 3.0.0] (support for the release candidate versions will be eventually deprecated due to differences in the way geometries are serialized to WKT and HEX, as well as compilation issues for OSX 10.5 -- we urge users to migrate to 3.0.0). |
| 45 | |
| 46 | [http://geos.refractions.net GEOS] is an open source C++ library for performing geometric operations, and powers !GeoDjango's "lazy" geometries. |
64 | | The latest [http://proj.maptools.org/ PROJ.4] version is [ftp://ftp.remotesensing.org/proj/proj-4.6.0.tar.gz 4.6.0]. !GeoDjango also works with version 4.5.0, but there is no reason to believe that previous versions (''e.g.'', 4.4.x, 4.3.x) will not work. |
| 67 | * ''Required'': 4.5.0 -- this is not a strict requirement, !GeoDjango has been tested with 4.5.0, but there is no reason to believe that previous versions (e.g., 4.4.x, 4.3.x) will not work. |
| 68 | * ''Recommended'': [ftp://ftp.remotesensing.org/proj/proj-4.6.0.tar.gz 4.6.0] (the current latest). |
| 69 | |
| 70 | [http://www.remotesensing.org/proj/ PROJ.4] is a library for converting geospatial data to different coordinate reference systems. |
90 | | * ''Recommended'': Postgis v1.3.1 [http://postgis.refractions.net/download/ PostGIS] (this is the [http://postgis.refractions.net/news/20070809/ latest version]). |
91 | | * First build & install PostGIS. |
| 96 | * ''Recommended'': [http://postgis.refractions.net PostGIS] [http://postgis.refractions.net/download/postgis-1.3.2.tar.gz v1.3.2] (this is the current [http://postgis.refractions.net/news/20071201/ latest version]). |
| 97 | |
| 98 | First, download PostGIS, and untar the archive: |
| 99 | {{{ |
| 100 | $ wget http://postgis.refractions.net/download/postgis-1.3.2.tar.gz |
| 101 | $ tar xzf postgis-1.3.2.tar.gz |
| 102 | $ cd postgis-1.3.2 |
| 103 | }}} |
| 104 | |
| 105 | Run the `configure` script enabling GEOS and PROJ support, `make`, and install. |
116 | | * ''Highly Recommended'': Some features (''e.g.'', a large number of {{{SpatialRefSys}}} model routines) require GDAL, but it is not necessary for core functionality like spatial queries. |
117 | | * GDAL/OGR includes useful for coordinate transformations and reading/writing ''both'' vector (''e.g.'', SHP) and raster (''e.g.'', GeoTIFF) geographic data. |
118 | | * For example, the following command will convert your SHP file into [http://en.wikipedia.org/wiki/WGS84 WGS84] (standard lat/lon). Then you can import directly into your database using `shp2pgsql` (utility from PostGIS): |
119 | | {{{ |
120 | | ogr2ogr -t_srs WGS84 output.shp input.shp |
121 | | }}} |
122 | | * Latest [http://trac.osgeo.org/gdal/wiki/DownloadSource GDAL] version is 1.4.2. Configure with GEOS then make (use {{{gmake}}} on Solaris platforms) and install: |
| 136 | * ''Required'': GDAL versions 1.4.0 and above (!GeoDjango has not been tested with the 1.3.x series). |
| 137 | * ''Recommended'': GDAL version 1.5.0. |
| 138 | |
| 139 | GDAL/OGR is an excellent open source geospatial library that support features such as coordinate transformations and reading/writing ''both'' vector (e.g., SHP) and raster (e.g., GeoTIFF) geographic data -- however, !GeoDjango does not yet support GDAL's raster capabilities. Installation of GDAL is ''highly recommended'' because some features (e.g., a large number of `SpatialRefSys` model routines and the `LayerMapping` utility) require GDAL capabilities; however GDAL is not required for core functionality like spatial queries. |
| 140 | |
| 141 | First, download the latest [http://trac.osgeo.org/gdal/wiki/DownloadSource GDAL] version (currently [http://download.osgeo.org/gdal/gdal-1.5.0.tar.gz 1.5.0]), and untar the archive: |
| 142 | {{{ |
| 143 | $ wget http://download.osgeo.org/gdal/gdal-1.5.0.tar.gz |
| 144 | $ tar xzf gdal-1.5.0.tar.gz |
| 145 | $ cd gdal-1.5.0 |
| 146 | }}} |
| 147 | |
| 148 | Configure with GEOS support, run `make` (use `gmake` on Solaris platforms) and install: |
128 | | * '''Note:''' The path to the GDAL library may be manually specified by setting `GDAL_LIBRARY_PATH` in your settings with the full path to the GDAL library (e.g., the `.so` or `.dylib` file). |
129 | | * !GeoDjango uses a native `ctypes` API to access OGR and OSR capabilities, there is no need configure the GDAL Python bindings. If you still want to use the GDAL Python API for your own applications, then use the following configuration flags: |
130 | | * `--with-python` `--without-ngpython`: the deprecated, but stable API. |
131 | | * `--without-python` `--with-ngpython`: the "next-generation" SWIG-based bindings -- used to problematic for Python 2.5 users, but the GDAL team has solved a lot of these issues in 1.4.2. |
| 154 | |
| 155 | '''Note:''' The path to the GDAL library may be manually specified by setting `GDAL_LIBRARY_PATH` in your settings with the full path to the GDAL library (e.g., the `.so` or `.dylib` file). |
| 156 | |
| 157 | Because !GeoDjango uses a native `ctypes` API to access OGR and OSR capabilities, there is no need configure the GDAL Python bindings. If you still want to use the GDAL Python API for your own applications, then use the following configuration flags: |
| 158 | * `--with-python`: Enables the GDAL Python bindings (all GDAL modules in `osgeo` namespace) |
| 159 | * `--with-ogpython`: The "old-generation" bindings (separate modules, e.g., `ogr` and `osr`) |
184 | | After PostGIS has installed, copy the GEOS (`libgeos-3-0-0rc4.dll`, `libgeos_c-1.dll`), and PROJ (`libproj.dll`) libraries from `C:\Program Files\PostgreSQL\8.2\bin` (or wherever you installed PostgreSQL) to a location accessible to the Python interpreter (''e.g.'', `C:\Python25\DLLs`, or `C:\Python25`). |
| 212 | After PostGIS has installed, copy the GEOS (`libgeos-3-0-0rc4.dll`, `libgeos_c-1.dll`), and PROJ (`libproj.dll`) libraries from `C:\Program Files\PostgreSQL\8.2\bin` (or wherever you installed PostgreSQL) to a location accessible to the Python interpreter (e.g., `C:\Python25\DLLs`, or `C:\Python25`). |