This page last changed on Jun 24, 2008 by aaime.

Getting Started

This document will step through the process of installing GeoServer and testing it against the OGC WFS 1.1 and WCS 1.1.1 specifications.

The first step is to install GeoServer in your environment.  These tests require the 1.7.x branch. At the time of writing, the latest version from that branch is 1.7.0-alpha1. You can download GeoServer 1.7.0-beta11, or just check the GeoServer's Latest version page (you might want to look into the Stable page as well, after 1.7.0 final gets released). Alternatively, you can checkout GeoServer from the version control at https://svn.codehaus.org/geoserver/branches/1.7.x/.

How to install GeoServer

Each test requires specific data on the server side in order to run properly. If you checked out GeoServer from the version control, you'll find the needed data directories into the configuration folder of your source checkout, specifically ./configuration/citewfs-1.1 for WFS 1.1 and ./configuration/wcs-1.1 for WCS 1.1. Otherwise you can download the data directories here:

WFS 1.1

Point your GeoServer's data directory to this directory. You can do this by editing the web.xml file in the ./webapps/geoserver/WEB-INF directory. Look for the block of text that looks something like this:

<!--
   <context-param>
      <param-name>GEOSERVER_DATA_DIR</param-name>
      <param-value>/some/path/that/isn't/correct</param-value>
   </context-param>
-->

Note that this block is very likely commented out.  Remove the comment lines on the top and bottom, and and change the lower <param-value> to the location of your test data.  Save and close the file.

The WFS test requires one further step in that the data is contained within a SQL file inside the data directory.  You will see two files, in fact:

dataset-sf0.sql
dataset-sf0-mysql.sql

That data will need to be converted into a database.  In this example, we will be using PostGIS/PostgreSQL, not MySQL, so we will be working with the dataset-sf0.sql file.

Convert the SQL file into a PostGIS/PostgreSQL database:

This document will assume you have PostgreSQL and PostGIS installed.  If you do not, please use the following links:

From the data directory mentioned above, run the following commands (make sure you have the correct permissions):

%> createdb cite -E UTF8 -T postgis
%> createlang plpgsql cite

This command creates a database called "cite". The WFS test expects that database name, so please don't change it.  The database is encoded using UTF8 due to non-English characters in the dataset. The final option sets the database to contain PostGIS extensions.  The second command adds PL/pgSQL to the database.  Note that this command may not be necessary on all operating systems.

Your version of PostgreSQL may not have the "postgis" template. If you get an error to this effect, the equivalent steps are as follows:

%> createdb cite -E UTF8
%> createlang plpgsql cite
%> psql -d cite -f /your/path/to/lwpostgis.sql
%> psql -d cite -f /your/path/to/spatial_ref_sys.sql

The two SQL files, lwpostgis.sql, and spatial_ref_sys.sql, are included with your PostGIS install.

%> psql -d cite -f dataset-sf0.sql

This adds the contents of the SQL file into our database.  In this case, the file creates three tables, with the following names:

Tables
AggregateGeoFeature
EntitéGénérique
PrimitiveGeoFeature

(This explains the UTF8 encoding mentioned above.) Note that it is assumed that you are running from the data directory specified above.

The next step is to make sure that GeoServer is accessing the database using the proper credentials.  Open the catalog.xml file inside the data directory and you will see the following two lines:

<parameter value = "cite" name = "user" />
<parameter value = "cite" name = "passwd" />

Unless you have a username and password called "cite" and "cite", respectively, you would want to change this to whatever your system uses for authentication.  For example, if your postgres username is "postgres" and your password is blank, you would change the lines to:

<parameter value = "postgres" name = "user" />
<parameter value = "" name = "passwd" />

Now we can start GeoServer and run the tests.

Running the WFS 1.1 tests

Open a browser and point to http://cite.geoenterpriselab.com/teamengine .  The welcome screen will display.

Figure 1: TEAM engine welcome page

Scroll down to the bottom and click Start Testing. You will be asked to login. You can use geoserver/openplans1 for the username and password. After login, you will see a list of testing sessions. You will be creating your own session; click on Create a new session.  In the next screen, a list of test suites will be displayed.  Click the radio box next to WFS 1.1.0 Compliance Test Suite and enter a Session Description in the box below. When done, click OK.

On the next screen, you will enter details about your GeoServer instance, and the type of test that you want to run.

Figure 2: WFS configuration

In the box marked Capabilities URL, you want to enter the path to your WFS capabilities.  This URL is of the form hxxp://hostname:port/path?query, but an easy way to get this URL is to go to the Welcome Page of your GeoServer instance, and copy the location of the WFS Capabilities link.

Check the boxes marked WFS-Transaction and WFS-XLink.  Also change the GML compliance level from SF-0 to SF-1. Click OK to start the test!

Figure 3: CITE tests can take some time

You will see a "please wait" graphic.  If the graphic only appears for a split-second and then a test failed notification is displayed, make sure to double-check that the capabilities URL was valid.  The test will run for a short while, and the results will display on the next page.

WCS 1.1.1

This test does not require any database manipulation, so it is simpler to set up than WFS.  The data directory we want to use for this test is ./configuration/wcs-1.1  (not ./configuration/citewcs-1.0!)  Please stop your GeoServer instance before making any changes below.

Change the data directory in the same way as with the WFS test above.  Edit the web.xml file in the ./webapps/geoserver/WEB-INF directory.  Look for the block of text that looks like this:

<context-param>
   <param-name>GEOSERVER_DATA_DIR</param-name>
   <param-value>/your/path/to/cite/tests</param-value>
</context-param>

Change the lower <param-value> to the location of your test data.  That should be the only change necessary. Now you can restart you GeoServer instance and continue below.

Running the WCS 1.1 tests

Open a browser and point to http://cite.geoenterpriselab.com/teamengine . The welcome screen will display as before. Scroll down to the bottom and click Start Testing. If you haven't already, you will be asked to login. (Again, you can use geoserver/openplans1 for the username and password.) You will want to Create a new session In the next screen, a list of test suites will be displayed.; Click the radio box next to Web Coverage Service (WCS) 1.1.1 and enter a Session Description in the box below. When done, click OK.

On the next screen, you will enter the WCS Capabilities URL.  As above, it is probably easiest to go to the Welcome Page of your GeoServer instance, and copy the location of the WCS Capabilities link. Click Next to start the test.

Figure 4: WCS configuration page

You will see a "please wait" graphic as before. The results of the test will be displayed on the next page.


pleasewait.png (image/png)
teamenginehomepagesmall.png (image/png)
wfsconfigpagesmall.png (image/png)
wcsconfigsmall.png (image/png)
citewfs-1.1.zip (application/force-download)
wcs-1.1.zip (application/force-download)
Document generated by Confluence on May 14, 2014 22:59