Skip to content

5.2. Processing service

PICAUT Judicael edited this page Apr 3, 2017 · 7 revisions

Introduction

All custom processing (not provided by geoserver) are implemented into the groovy language using the Geoserver WPS api.

There is two method to implement WPS into Geoserver:

  • Java library, *.jar file (+performance -require restart of Geoserver)
  • Groovy script (+easy to write +dynamic loading -performance)

Groovy is chosen, but with the help of PostGIS, the performance bottleneck is reduced.

Web Processing services

nc_feed_stats.groovy

Admin only script used to initialize the database with statistical tables. The statistics is based on long term measure station. gevfit_of_stations.txt delta_matrix_sigma.txt delta_matrix_mu.txt

nc_get_area_info.groovy

Public script called by Leaflet web plugin to get all info linked to an hexagon. The call of this script is located here https://github.com/Ifsttar/NoiseCapture/blob/gh-pages/js/L.TileLayer.OnoMap.js#L319

nc_last_measures.groovy

Public script called by Leaflet plugin to get the last measurements.

nc_parse.groovy

Parse zip file that contains measurements. It does not extract zip file but parse compressed data on the fly avoiding any malicious file that could be included in the archive.

The content of the zip file is:

  • meta.properties - Contain meta data about the measurements
  • version_name=Application version name
  • pleasantness= User feedback (seekbar) integer, 1-100
  • device_manufacturer= Smartphone manufacturer
  • record_utc=record time in UTC timezone
  • build_date=application compilation time
  • uuid=unique random user identifier id
  • device_product=smartphone model
  • device_model=smartphone model
  • time_length=measurement length in second
  • gain_calibration=Calibration gain in dB
  • version_number=Application version number (integer)
  • tags=user feedback on tags separated by comma
  • leq_mean=Mean leq in dB(A)

track.geojson - A trace on which each point (second) is attached:

  • leq_mean= 1s Mean leq in dB(A),
  • accuracy= GPS accuracy in meter (coordinate is in area with 66% confidence),
  • location_utc= GPS fix time,
  • leq_utc= noise level time,
  • leq_id= # of second,
  • marker-color= color marker for http://www.geojson.io viewer,
  • leq_X= X is frequency ,1s Mean leq in dB(A) for this third-octave frequency band.

nc_process.groovy

Admin script called internally over a period of time. Build an area noise map by the merging of measurements over an area and extrapolating it using reference stations.

nc_upload.groovy

Called by android device to send compressed measurement.

Script for testing and maintenance

Some scripts are provided in order to call WPS services each x seconds.

  • wps_client_parse.py This script call the parsing and post-processing WPS services in x seconds. This script is run into a linux screen environment.