Code

Changes between Version 3 and Version 4 of GeoDjangoInstall


Ignore:
Timestamp:
09/16/07 15:30:11 (7 years ago)
Author:
jbronn
Comment:

simplified database creation instructions

Legend:

Unmodified
Added
Removed
Modified
  • GeoDjangoInstall

    v3 v4  
    6262}}} 
    6363 
    64  * Next, create a role and database for your application, and allow it to access PostGIS functionality: 
     64 * Next, create a role and database for your application, and allow it to access PostGIS functionality.  PostGIS SQL files are installed in the PostgreSQL share directory (`/usr/postgres/8.2/share` in the example below -- use `pg_config --sharedir` to determine this directory on your system). 
    6565{{{ 
    6666# su - postgres 
    67 $ psql 
    68 postgres=# CREATE ROLE <user> LOGIN; 
    69 postgres=# \q 
     67$ createuser <user> 
    7068$ createdb -O <user> <db_name> 
    7169$ createlang plpgsql <db_name> 
    72 $ psql -d <db_name> -f /usr/local/share/lwpostgis.sql 
    73 $ psql -d <db_name> -f /usr/local/share/spatial_ref_sys.sql 
     70$ psql -d <db_name> -f /usr/postgres/8.2/share/lwpostgis.sql 
     71$ psql -d <db_name> -f /usr/postgres/8.2/share/spatial_ref_sys.sql 
    7472$ psql <db_name> 
    7573<db_name>=# GRANT SELECT, UPDATE, INSERT, DELETE ON geometry_columns TO <user>; 
     
    8078 
    8179=== GDAL === 
    82  * ''Highly Recommended'': Some features (e.g. a large number of {{{SpatialRefSys}}} model routines) require GDAL, but it is not necessary for core functionality (e.g. spatial queries) 
    83  * GDAL/OGR includes useful for coordinate transformations and reading/writing ''both'' vector (e.g. SHP) and raster (e.g. GeoTIFF) geographic data. 
     80 * ''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 
     81 * GDAL/OGR includes useful for coordinate transformations and reading/writing ''both'' vector (''e.g.'', SHP) and raster (''e.g.'', GeoTIFF) geographic data. 
    8482   * 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): 
    8583{{{