Geoserver Tutorial

Publishing your data through GeoServer consists of three steps

  1. Login to the Geoserver
    • An account with the same username as passwd as database has been created
  2. Create a DataStore for your feature data (you will create Coverage stores for raster datasets)
  3. Create a FeatureType for feature data (create Coverages for raster datasets)

A good tutorial illustrating how to add shapefile data to geoserver can be found here.

Adding PostGIS datasets

  1. Login in to the server with username and password. For our tutorial we will use geoserver located at
  2. After logging in, click on Stores (in the Data section), then Add new store.
  3. Now in the new DataStore interface. Select 'postgis' from 'Vector Data Sources' section.
    • You should get a new interface that will have various text boxes. The five important options for you to specify are a) Workspace; b) Data Source Name c) database; d) user; e) password. Select 'geog480_group1' or 'geog480_group2' as appropriate, from the drop down list for workspace. Give a unique name for the data store, e.g. group1, group2. The database name should be the name of that contains the postgis data (e.g.haiti, land). Then enter your database username and password.
    • Note: hostname should be 'localhost', port should be '5432' and schema should be 'public'. These values should be correctly populated by default and you do not need to change them.
    • Click on Save
    • Now you have created a new datastore that will talk to the postgis database
  4. This will automatically lead to a new layer interface that can be used to add a new feature type.
    • Note you can also reach the new layer page by clicking on layer (on left panel), then “Add a new resource” and selecting your datasource form the drop down menu.
    • You will see the data from the previously added postgis datastore in a list.
    • Click on publish next to the data layer you wish to create.
    • This will lead you to a new interface that will allow you to specify information on this layer.
    • On this page a) Select an appropriate style sheet (in publish tab); b) Click on 'Lookup SRS' button or manually enter the appropriate SRID; c) Click on 'Compute from Data' link which is next to the Bounding Box fields. You should be able to leave other values as defaults; and d) Be sure to mark the layer as enabled (publish tab). Finally Click 'Save' button.
    • Please remember to complete the information on both Data and Publish tab.
    • Your layer from the PostGIS database should now be available as a map, through a WMS interface.
  5. Go to the demo page on the GeoServer (here) and click on the layer you just created.

NOTE: Tutorial on adding a PostGIS table from Geoserver documentation.