#

## OpenGeo Stack Workshop

# Creating a Spatial Database

In previous sections a PostGIS was installed and is now ready for us. In this section a new PostGIS database will be created using the PostgreSQL administration console pgAdmin.

1. Open the PostgresSQL Administration Console by opening the Start Menu and navigating to Programs ‣ PostgreSQL 8.2 ‣ pgAdmin III.

   Running the PostgreSQL adminstration console, pgAdmin

2. In pgAdmin connect to the database by right-clicking on PostgreSQL Database Server 8.2 (localhost:5432) and selecting Connect.

   Connecting to the database with pgAdmin

3. In the Connect To Server dialog, enter the password “postgres”, check off Store Password, and click OK.

   Specifying the database password

4. In the Object Browser right-click on Databases and select New Database...

   Creating a new database

5. In the New Database... dialog:

   1. Enter “bayarea” in the Name field
   2. Select UTF8 from the Encoding drop down list
   3. Select template_postgis from the Template drop down list
   4. Click OK

   Creating a PostGIS database

At this point a new PostGIS database has been created and is ready for use. In the next section the new database will be loaded with data.

### Navigation

- index
- modules |
- next |
- previous |
- OpenGeo Stack Workshop »
- Working With PostGIS »
- Creating a Spatial Database