Goal of this practical assignment is to set up the server-side of the Geoweb services architecture.
You will use the open source product GeoServer to publish geodata via a WMS (map service) and a WFS (data service).
The software needed for this assignment is:
The geodata that is needed:
A PostGIS table with cadastral parcels of Delft. For this there is a zipped
SQL script delft_parcels.sql available with insert statements (in the git
repo, under the folder data/lab3/).
💡 Tip
It may be a good idea after data loading to create a spatial index on the geometry column. Check for example here.
This lab combines installation, configuration, testing, and interpretation of server-side geoweb technology. As in the earlier labs, there are two kinds of questions:
Questions marked as Reflective do not need to be answered in the final report. You are expected to do the work and think through them, but you can do that in the way that best supports your learning: by taking notes, discussing with peers, sketching diagrams, or using external sources to help you reason through what you observe.
Questions marked as Summative do need to be present in your final report. These are broader questions where we expect you to connect the practical setup to the underlying ideas of service-based geoweb architecture.
The concrete outputs you create along the way are collected under Proof of Completition items.
In GEO1006 (GeoDBMS course) most / all of you have installed PostGIS. You can use that same database, same user and same schema for the GEO1007 practical assignments.
Note: if you did not follow GEO1006, then contact the supervisor present at the Geolab.
If you do not have a PostgreSQL installation anymore, or you want to re-install PostgreSQL with PostGIS, you can follow the instructions for Windows or Mac / Linux.
Download and install GeoServer by following the guideline how to install GeoServer.
To get a fast introduction to what GeoServer is meant for, read the ‘Overview’ and ‘History’ pages on their web site.
💡 Hint
There are several ways to install GeoServer, but we choose to deploy it on our Apache Tomcat server which supports web archive files (.war). This makes deployment generally quite straightforward.
Start your web server (Apache Tomcat) if it is not running already, and go to the GeoServer ‘Web Administration Interface’: http://localhost:8080/geoserver
Log in with (default) username admin and password geoserver.
Goal of this part of the assignment is to set up an OGC WMS and WFS web service. This is done by defining a WMS/WFS layer in GeoServer that, in this case, connects to your PostGIS database. How to do that is explained step-by-step in the GeoServer user manual. It offers two tutorials on how to set up a WMS/WFS service, one for geodata stored in ESRI shapefiles and one for PostGIS tables respectively.
⚠️ Important
Skip the shapefile tutorial, only do the ‘Publishing a PostGIS table’ tutorial, but with other data than mentioned in the tutorial, instead use the
delft_parcels.zipthat is on the git repo of the course.
Now execute the following steps:
geoweb/data/lab3 and run the delft_parcels.sql
script to load the parcels table into your PostGIS database.💡 Refresher
If you are using pgAdmin4, use the
Query Toolto open and rundelft_parcels.sql. Make sure you havePostGISinstalled as an extension to your database or the commands will not work.
💡 Tip
Confirm your database port (usually 5432) from pgAdmin 4 by right clicking on PostgreSQL 16 and selecting properties. If it differs from the standard 5432, take a note, you will need it later.
Now follow the ‘Publishing a PostGIS table’ tutorial:
Start with the section ‘Creating a new workspace’ and take note of the following:
Move on to ‘Creating a store’. After creating the workspace, you continue with defining your PostGIS ‘store’.
Finally, tackle the ‘Create a layer’ section.
After creating the ‘store’, the next step is: creating the parcels
layer.
The Spatial Reference System for the parcels data is: EPSG:28992
(= value for ‘Declared SRS’ in the ‘Edit Layer’ form).
The result should be: one new layer in the layer overview, with the
workspace name you created for yourself, and with the layer name
parcels.
🤨 Reflective Question
1a. Why is it essential to specify the correct SRS (Spatial Reference System, also known as Coordinate Reference System or CRS) for a dataset that is published as a WMS/WFS layer via GeoServer?
The test can be done in GeoServer itself with ‘Layer preview’. It is a useful way to test whether layers have been defined correctly. Note: the ‘Layer preview’ is in fact a ‘client’ within GeoServer (it sends requests to the ‘web services’ part of GeoServer).
Go to the ‘parcels’ layer in ‘Layer preview’, and select (from the ‘Select one’ list): WMS, with PNG or JPEG as output.
The result should be a second browser window (or tab), with:
GetMap request visible as URL in the browser address barProof of Completition
A. For the WMS test:
- Copy the
GetMapURL to your report- Save the output map and include it in your report (as image in the text, or as separate file)
🤨 Reflective Question
2a. Inspect the
GetMapURL and list the parameters (key-value pairs) that appear after the?sign. What is each parameter used for?
Again in ‘Layer preview’ request the same layer but now as data service, via a WFS request with GML 3.1 output, and secondly also with GeoJSON output.
Proof of Completition
B. For the WFS test, include in your report or submission:
- The HTTP request that is generated (this time it is a WFS
GetFeaturerequest)- The GML output saved as an XML text file
- The GeoJSON output saved as a text file
🤨 Reflective Questions
3a. Which differences do you see between the WFS request and the WMS request for the same
parcelslayer? Relate these differences to the different purpose of WFS and WMS.3b. Compare the GML 3.1 output with the GeoJSON output. Besides the differences in encoding (XML versus JSON), do you also see differences in data model: the way the data content is structured, and perhaps details that are present in one encoding but not in the other?
In the ‘Layer Preview’ there is also the option to have a preview in
OpenLayers. Choose that option to look at the parcels layer.
When you click on a parcel this results in a table row with information about that parcel (below the map).
Proof of Completition
C. Use the Web developer tools of your browser (Firefox or other) to discover which web request is used to get parcel information when you click on the map. Copy that URL to your report.
🤨 Reflective Question
4a. In that web request, is a unique identifier of the parcel used to get the parcel information? Or is another mechanism used? If so, what mechanism or method?
📝 Summative Question 1 — GeoServer in the geoweb architecture
Expectations: Between 1 and 2 pages of text, images encouraged. Less is more!
Question: Explain what GeoServer is meant for and how it fits into the wider geoweb architecture you set up in this lab. In your answer, compare GeoServer with the web server (Apache Tomcat) and the database server (PostgreSQL with PostGIS): what role does each component play, where do they overlap, and how do they depend on each other? Include a diagram that shows how these components relate to each other in your setup.
Grading (5 points): Lower-range answers typically identify the basic purpose of GeoServer and name the other components involved. Mid-range answers usually distinguish more clearly between the roles of the web server, application/service layer, and database. Strong answers tend to connect those roles to the actual setup completed in the lab and use the diagram to support the explanation. The strongest answers explain similarities, differences, and interactions in a clear, accurate, and well-structured way.
📝 Summative Question 2 — WMS, WFS, and geospatial web requests
Expectations: Between 1 and 2 pages of text, images optional but encouraged. Less is more!
Question: Use your WMS, WFS, and GetFeatureInfo experiments to explain how geospatial web services communicate. Compare what is being requested and returned in each case, and discuss how request parameters, SRS/CRS choices, and response formats influence what the client receives. Include at least one concrete example from your own
GetMap,GetFeature, orGetFeatureInforequests.Grading (5 points): Lower-range answers typically show the basic idea that different service types return different kinds of output. Mid-range answers usually compare WMS and WFS in a more concrete way and refer to request parameters or output formats. Strong answers tend to connect request structure, CRS/SRS, and response type to the different purposes of map images, feature data, and queryable map information. The strongest answers use a concrete example from the student’s own service tests and explain the communication clearly and accurately.
Your report and output files should be in one zip-file containing:
Bundle all source files in one zipfile, and name it as follows:
lab3_lastname1_lastname2 (so two names if you work in a team of two).
Submit (together with the files and report for Lab 4) via Brightspace.