9 Enabling modules
This section describes how to enable various Oskari functionalities or modules.
9.1 How to enable WFS-T (Content editor)
Tampere Oskari bundle content-editor
Extends Oskari functionality to support editing of wfs layer features and feature geometries.
Available in Oskari 1.36 or above.
9.1.1 Prerequisites
These instructions are based on jetty-8.1.16-oskari package.
9.1.2 Front-end
This bundle needs Oskari version 1.36 or above
9.1.3 Back-end
This functionality needs Oskari version 1.36 or above (oskari-map.war)
Database
Oskari database is needed without any special configuration
9.1.4 Installation
Create base folder i.e. Tampere
mkdir Tampere
Change directory to Tampere
cd Tampere
Download Oskari (http://oskari.org/build/server/jetty-8.1.16-oskari.zip) and extract archive to current (new created) directory
Goto jetty folder
cd jetty-8.1.16-oskari
9.1.5 Configuration
Add new permission type to oskari-ext.properties in [jetty-home]/resources folder
permission.types = EDIT_LAYER_CONTENT
permission.EDIT_LAYER_CONTENT.name.fi=Muokkaa tasoa
permission.EDIT_LAYER_CONTENT.name.en=Edit layer
Add bundle dynamically to correct roles in oskari-ext.properties. For example:
actionhandler.GetAppSetup.dynamic.bundles = admin-layerselector, admin-layerrights, admin-users, admin, content-editor
actionhandler.GetAppSetup.dynamic.bundle.content-editor.roles = Admin
Enter to jetty directory and run
java -jar start.jar
Use case in Oskari
Find out a WFS-layer where the service supports Transaction operation (WFS-T).
Add 'Edit' permission for that layer in Oskari Layer Rights functionality or through the layer administration UI (Edit permission type requires configuration on oskari-ext.properties to be shown).
Add the layer on the map in Oskari and the 'feature editor' functionality can now be accessed through the geoportals selected layers listing by selecting it from the tools for that layer.
9.1.6 Remarks
Editing is only available for geometry in EPSG:3067 CRS for time being.
Update SRID to your wfst layer before editing, if it is 0 (default)
**( UPDATE [table] SET =ST_SetSRID([geometry field],3067) )**
WFS layer doesn't work e.g. for MapClick, if there is mixed SRID in the [table].
Mixed Srid could be checked with below sql:
**Select distinct(ST_SRID([geometry field])) as srid, count(*) from [table] group by srid;**
9.1.7 Known issues
Geometry type of geometry-column must be Geometry, MultiPoint, MultiLineString or MultiPolygon in Postgres wfs-t edit table (layer) for time being.
On the other words only MultiPoint, MultiLineString or MultiPolygon geometries are supported in Oskari feature edit (wfs-t).