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. A step-by-step screencast of this process 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 http://n3.cigi.uiuc.edu:8080/geoserver/welcome.do
  2. From the welcome page, click on Config → Data → DataStore → New
  3. Now in the new DataStore interface. Select ‘postgis’ for ‘Feature Data Set Description’ give it a ID (e.g. groupx) and click new.
    • You should get a new interface that will have various text boxes. The four important options for you to specify are a) Namespace; b) database; c) user; d) password. Select ‘geod480_group1’ or ‘geod480_group2’ as appropriate, from the drop down list. The database name should be the name of that contains the postgis data (e.g.group1_postgis, group2_postgis). 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 Submit
    • Now you have created a new datastore that will talk to the postgis database
    • Click Apply and Save button (in that order) on the left hand side of the page to store the new datastore configuration in geoserver.
  4. Create a new feature type.
    • Follow these links from the Welcome page. Config → Data → FeatureTypes → New
    • When you click on new, you should get a list of all feature data available to geoserver.
    • You will see the data from the previously added postgis datastore in the drop down menu. The feature data will be named as dataStoreID:::database_table_name.
    • After selecting the correct dataset from drop-down menu click new.
    • You will get a page named ‘FeatureType Editor’. On this page a) Select an appropriate style sheet or create a new one; b) Click on ‘Lookup SRS’ button or manually enter the appropriate SRID; and c) Click on ‘Generate’ button which is next to the Bounding Box. You should be able to leave other values as defaults. Finally Click ‘submit’ button.
    • Your feature data from the PostGIS database should now be available as a map, through a WMS interface.
    • Click Apply and Save button on the left hand side of the page to make available the feature dataset you just created.
  5. Go to the demo page on the GeoServer (http://n3.cigi.uiuc.edu:9009/geoserver/mapPreview.do) and click on the layer you just created.

Style Sheet

GeoExt styler extention can be found at http://n3.cigi.uiuc.edu:8080/geoserver/www/styler/index.html

References