Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Configuring GEOZET for another dataset (WFS)

Kennis- en Exploitatiecentrum Officiële Overheidspublicaties edited this page Sep 30, 2015 · 4 revisions

How to configure another dataset/featuretype

This page describes the necessary steps for configuring GEOZET with another dataset. We use a working example for this, running at: http://nieuwsinkaart.nl/geozetnijmegen/

Note (20 January): this page is work in progress and for now provides some hints for the configuration. More details will follow.

Note (30 september 2015): the example url http://nieuwsinkaart.nl/geozetnijmegen/ doesn't work any more. The other information on this page should still be accurate.

Knowledge / skills

Although the most steps are not very complicated, it is recommended to have at least some knowledge of:

  1. JavaScript and preferably OpenLayers
  2. Java, Java Server Pages (JSP) and how to deploy an application, building with Maven.
  3. HTML and CSS (and maybe how to create / adept images)
  4. configuring a WFS. And in general: knowledge of webservers and HTTP is useful, for example if you have to integrate GEOZET in a CMS for example.

Prerequisites:

  1. a servlet container on a webserver, e.g. Tomcat
  2. a running WFS
  3. the code of GEOZET, see https://github.com/geozet/geozet/blob/master/README how to get the code and build it

And check out the documentation at http://geozet.github.com/geozet/ as well.

Example

For this description, we use an existing example, a prototype. Running at http://nieuwsinkaart.nl/geozetnijmegen/. This is a prototype, so not all functionality is used, but it serves as a good example for the configuration of another featuretype.

Steps

configure the featuretypes in the WFS

  1. For the application, at least a featuretype with the dataset is needed. In this case a feature looks like this: <bgi:nijm_monumentinfo_sel gml:id="nijm_monumentinfo_sel.222"> <bgi:id>222</bgi:id> <bgi:omschrijving>Waaldijk 49, 6515JA Nijmegen</bgi:omschrijving> <bgi:jaar>1840</bgi:jaar> <bgi:categorie>rijksmonument</bgi:categorie> <bgi:centroid> <gml:Point srsDimension="2" srsName="urn:x-ogc:def:crs:EPSG:28992"> <gml:pos>186136.65304890522 431799.6509117999</gml:pos> </gml:Point> </bgi:centroid> </bgi:nijm_monumentinfo_sel>

An important element is the element bgi:categorie. This contains the values for the classification and filters. For this application there are a few categories:

  1. monumentale_boom
  2. rijksmonument
  3. gemeentelijk_monument These categories are important in the configuration of GEOZET for both filtering and styling, as will be shown below.

This application uses serverside clusters for the total numbers of monuments in an area. These cluster points are in fact another featuretype, offered by the WFS. Per area, a point-feature is created with the total numbers of monuments per "categorie". Here, these have been made using Postgis. (This will be described later). If your dataset does not have that many points, one could leave these serverside clusters out.

Configuring the map

Adapt the file static/js/settings.js.

The file static/settings.js (or whatever location you use), contains the settings for:

  1. configuration of WFS featuretype
  2. configuration of the categories
  3. contents of the popups (in ExtJS template)
  4. application text strings
  5. (optional) the featuretype for serverside clusters
  6. the configuration for the backgroundmap (no need to change if you are satisfied with PDOK's backgroundmap for the Netherlands)
  7. optional: the URL for the geocoder.
  8. optional: changing the map size
  9. optional: switch on/off some functions, for example: zoomin/out using mouse scroll. In the example the file settings.js can be found here: http://nieuwsinkaart.nl/geozetnijmegen/static/js/settings.js

CSS styling and graphics

  1. create icons: use graphical software (e.g. GIMP or Inkscape) to create icons for each category. Note that GEOZET uses a so-called sprite image, where all icons are punt in one image and by using CSS (moving this image around), the right icon is made visible. This makes the browser to send less HTTP requests and therefore it loads a bit quicker.
  2. change the CSS for these icons, per category.
  3. Change styling of your application as you like. For example fonts. This can easily be done by adepting the JSP-files (the header.jsp) and include other CSS files. Example of CSS: http://nieuwsinkaart.nl/geozetnijmegen/apps4nijmegen/css/main.css

Configure core / form search engine

  1. the properties of a featuretype should be set in a constants class (StringConstants) in Java. This will be improved to make configuration easier.
  2. the properties-file: WEB-INF/classes/core-datacategorieen.properties contains the categories for the filter options
  3. set the URLs in WEB-INF/web.xml for the WFS and geocoder (see documentation)
  4. change the JSPs for the search results as needed.

Build and deploy the application.