GIS311 - Practical 7 instructions
This page provides resources and some guidelines on how to complete GIS311 practical 7 (11 April 2019). Note that this page provide some information, not step-by-step instructions. You have to adapt information available online for your purposes to complete the task.
Creating a database and loading data
Refer to the relevant section in the Practical 2 wiki on how to create a new spatial database and how to load a shapefile into the database.
Connecting a PostGIS table to GeoServer
After starting GeoServer, you can access the local GeoServer admin page in the browser of your choice using the following url, http://localhost:8080/geoserver
The GeoServer documentation provides a detailed example on how to connect a PostGIS table to GeoServer. You can adapt these instructions to your needs. The complete page is available here, https://docs.geoserver.org/latest/en/user/gettingstarted/postgis-quickstart/
Creating a custom SLD style
GeoServer has an excellent SLD cookbook with examples of the various styles that can be adapted for your purpose, https://docs.geoserver.org/stable/en/user/styling/sld/cookbook/
- W3School HTML tutorial, https://www.w3schools.com/html/default.asp
- W3School CSS tutorial, https://www.w3schools.com/css/default.asp
Learning the basics of OpenLayers
The OpenLayers QuickStart page provides an overview of the steps required to create a basic web map using OpenLayers. The page explains that basic components, https://openlayers.org/en/latest/doc/quickstart.html
Note: NodeJS is a newer method of implementing a OpenLayers project. We unfortunately cannot use this method in the labs on campus, as the firewall blocks the command line.
To add other baselayers, https://blog.programster.org/openlayers-3-using-different-osm-tiles
Displaying a WMS on your web map
See example on ClickUP.
- EPSG.io - Coordinate Systems Worldwide, https://epsg.io
- Free certificate course on front-end and backend development, https://www.freecodecamp.org
- OpenLayers 3 Beginner’s Guide, https://openlayersbook.github.io/index.html
- Working with OpenLayers 4 | Part 1 - Creating the first application, https://medium.com/attentive-ai/working-with-openlayers-4-part-1-creating-the-first-application-9ab27bbd7a62
- Working with OpenLayers 4 | Part 2 — Using markers or points on the map, https://medium.com/attentive-ai/working-with-openlayers-4-part-2-using-markers-or-points-on-the-map-f8e9b5cae098