Difference between revisions of "PostGIS & ArcSDE"

From phurvitz
Jump to: navigation, search
Line 1: Line 1:
 
__FORCETOC__
 
__FORCETOC__
 
==Basic setup==
 
==Basic setup==
user = postgres
+
:user = postgres
passwd = 615cbe
+
:passwd = 615cbe
port = 5432
+
:port = 5432
spatial db = ufl
+
:spatial db = ufl
  
 
==Install process==
 
==Install process==
Line 34: Line 34:
 
#: That user also needs access to the schemae:
 
#: That user also needs access to the schemae:
 
#:: <tt>grant usage on schema sde to ufl;</tt> (contains the SDE stuff, I think)
 
#:: <tt>grant usage on schema sde to ufl;</tt> (contains the SDE stuff, I think)
#:: <tt>grant usage on schema postgres to ufl; (schema governing the data, I think)
+
#:: <tt>grant usage on schema postgres to ufl;</tt> (schema governing the data, I think)
  
 
==Connecting==
 
==Connecting==

Revision as of 23:12, 4 March 2009

Basic setup

user = postgres
passwd = 615cbe
port = 5432
spatial db = ufl

Install process

  1. Install ArcSDE for PostgreSQL from the ESRI media.
    1. Process first installs PostgreSQL.
    2. Install ArcSDE.
  2. Install PostGIS
    1. Initializes a PostGIS database (call it ufl).
      Should be able to verify in PgAdmin that the schema public has all the PostGIS functions
  3. Run the ArcSDE post-installer to add SDE functions to the database
    Should be able to verify in PgAdmin that the schema sde has all the ArcSDE functions

Details

  1. Licensing: first get a license from Luke Rogers
    sdesetup -o update_key -d POSTGRESQL -l "C:\Program Files\ESRI\License\sysgen\keycodes" -D ufl
  2. Schema:
    in order for a user to add a layer it is necessary to add a schema for that user. e.g.,
    CREATE SCHEMA AUTHORIZATION postgres;
  3. It may be necessary to change specify a different database than the default:
    sdeservice -o modify -r ADMIN_DATABASE -v ufl -d POSTGRESQL
  4. And then start the service:
    sdemon -o start
  5. Adding data:
    To create a data set using the PostGIS geometry, this example creates a layer from the KC hydro bigwater
    shp2sde -o create -l bigwater1,shape -f P:\gisdata\king_county\bigwater -a all -e a -u postgres -D ufl -p 615cbe -k PG_GEOMETRY
  6. Access:
    We want a read-only access user. In that case add a user
    create user ufl nocreatedb nocreateuser password 'ufl';
    That user also needs access to the schemae:
    grant usage on schema sde to ufl; (contains the SDE stuff, I think)
    grant usage on schema postgres to ufl; (schema governing the data, I think)

Connecting

  1. In ArcCatalog, select Database Connections > Add Spatial Database Connection
    Server: gis.caup.washington.edu
    Service: 5151
    {Database, Username, Password}: ufl