GIS311 - Practical 7 instructions

From Geobach
Revision as of 10:56, 11 April 2019 by Victoria (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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[edit]

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.

GeoServer[edit]

Connecting a PostGIS table to GeoServer[edit]

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[edit]

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/

Basics of HTML and JavaScript[edit]

There are various tutorials available online that can help you learn HTML, CSS and JavaScript. Personally, I use the W3School website as a quick reference. I would suggest that you also refer to this site if you have any issues. Other sites are also suggested here, http://wiki.geobach.co.za/gbmw/index.php?title=GIS311_-_Practical_7_instructions#Additional_resources

OpenLayers[edit]

Learning the basics of OpenLayers[edit]

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[edit]

See example on ClickUP.

Additional resources[edit]