You are here: Wiki>SensorWeb Web>OpenNoiseMap (24 Mar 2015, DanielNuest)Edit Attach

OpenNoiseMap


ALERT! OpenNoiseMap and the NoiseDroid app on Android are discontinued projects. ALERT!


Introduction

The OpenNoiseMap project started in October 2010 at the Institute for Geoinformatics (ifgi) in Münster as topic for the course Geosoftware II. OpenNoiseMap is an application for Android smartphones and can be used for collecting information about noise pollution. It supports manual, automatic, event-based and series mode measurements and presents all collected measurements in a list or on a map. Details can be shown and the list can be sorted and filtered by a number of criteria. Additionally the users can export measurements to the OpenNoiseMap community and import from community measurements.

slice1.png

Presentations and Documentation

App

Binary

Download the latest version of the APK here: de.noisedroid.apk

ALERT! Important: The app functionality is severely limited because no server component is running.

The app is not available on Google Play anymore, the old app url was https://play.google.com/store/apps/details?id=de.noisedroid.

Source Code

Export of the last working codebase (January 2013):

OpenNoiseMap-01-2013.zip

The code is published under the Apache 2.0 License.

Server

The OpenNoiseMap web application is accessible as “NoiseServerServlet” from outside the application server. For an example project installation this corresponds to http://server.url/NoiseServerServlets. From here on, several interfaces are provided to serve the mobile application and the OpenNoiseMap website.

Website

ALERT! http://www.opennoisemap.org is currently down.

The website contains a map client to request measurements with some fitering options. Also it is possible to set up an OpenNoiseMap account and do more account relevant management.

App servlet

The mobile application exchanges measurements with the server using the AppServlet endpoint:
http://server.url/NoiseServerServlets/AppServlet
The communication is handled via HTTP Post requests sent by the application as defined in the following and underlies access restrictions set by the server.

Client side requests

Basic structure
<Requests>
<Selfdescription>…</Selfdescription>
<Request type="Type1">…</Request>
<Request type="Type2">…</Request>
</Requests>

Selfdescription: The selfdescription node contains the productname of the client device.
Selfdescription example
<Selfdescription>
<Device value="htc_legend" />
</Selfdescription>
Request types
Register, Login, ResetPassword

These requests are for handling the OpenNoiseMap account. Passwords can be passed as MD5-checksum.
Request type Request type value Required nodes
Register Register Username, Password, Email
Login Login Username, Password
Reset password request_type_reset_password Username, Email

register example
<Request type="Register">
<Username value="test" />
<Email value="test" />
<Password value="f868315c1b…a223" />
</Request>

login example
<Request type="Login">
<Username value="test" />
<Password value="f868315c1b…a223" />
</Request>

reset password example request
<Requests>
<Request type="request_type_reset_password">
<Username value="testuser" />
<Email value="testmail" />
</Request>
</Requests>
GetInfo

The GetInfo request informs about the current version, the "measurement-moral" and other settings.
GetInfo example request
<Request type="GetInfo"/>
HasMeasures

This request is for determining if there are measurements with certain attributes. Nodes and their attributes are defined as in the GetMeasures request, but the response is a boolean.
HasMeasures request example
<Request type="HasMeasures">
<Source name="" />
<Filter>
<Time from="" to="" />
<BBox top="" bottom="" left="" right="" />
<Tags mode="all/some">
<Tag value="" />

</Tags>
<Description contains="" />
<Dist from="" to="" />
<Noise from="" to="" />
<Limit value="" />
<Offset value="" />
<OrderBy attr="" dir="" />
</Filter>
</Request>
GetMeasures

Requests measurements from the server. The request consists of "Filter" nodes, which describe the data to request. See the fitering constraints in the table below:
NodeSorted ascending Description Notes
OrderBy Sorts the measurements "attr" can be "NOISE", "TIME", "SERVERID", "TYPE", "NONE" or "DISTANCE". "dir" can be "ASC" or "DESC".
BBox Spatial constraint WGS84 information
Description The desctiption of the measurements has to match the given description  
Dist Only measurements in a ceratin distance are returned  
Limit Maximum number of returned measurements The nodes offset and limit realise the serverside paging, to minimize data transfer
Noise Only measurements in a certain volume are returned  
Offset Skips the first measurements by a given value  
Source Datasource constraint "NOISEDROID" or "NOISETUBE"
Tags Constraint by given tags Attribute "mode" sets if all tags has to match ("all") or at least one ("some")
Time Time constraint "from" or "to" can be left out

GetMeasures request example
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<Requests>
<Request type="GetMeasures">
<Filter>
<BBox top="51.971344" bottom="51.944263" left="7.602539" right="7.646484" />
<Dist longitude="7.6" latitude="51.945" from="0" to="10000"/>
<Noise from="40" to="80"/>
<Time from="2010-01-11T16:53:42" to="2011-06-11T16:53:42"/>
<OrderBy attr="TIME" dir="ASC"/>
<Limit value="15" />
<Offset value="0" />
</Filter>
</Request>
</Requests>
AddMeasures

Request to send measure to the OpenNoiseMap community.
addMeasures example request
<Request type="!AddMeasures">
<Measures>

</Measures>
</Request>

Inside the „Measures“-node of the request, all the measurments are listed depending their typ:
addMeasures node (manual measurement) addMeasures node (automatic measurement) Combination of manual and automatic
<Measure id="0" type="manual">
<Time value="2011-02-11 16:53:42" />
<LocationMeasure
longitude="7.000000"
latitude="51.000000"
accuracy="131.0"
provider="network" />
<Noise value="42.451363" />
<Moral value="100.0" />
<Description>Test</Description>
<Distance value="0.0" />
<Rating value="0.0" />
<Tags>
<Tag value="traffic"/>
<Tag value="construction"/>
</Tags>
<LocationSource
longitude="7.000000"
latitude="51.000000" />
</Measure>
<Measure id="1" type="automatic">
<Time value="2011-02-11 17:01:01" />
<LocationMeasure
longitude="7.000000"
latitude="51.000000"
accuracy="131.0"
provider="network" />
<Noise value="42.539665" />
<Moral value="100.0" />
</Measure>
<MeasureSeries id="134" >
<Description>Test</Description>
<Title value="" />
<Time value="2011-02-16 18:03:25" />
<Tags>
<Tag value="traffic"/>
<Tag value="construction"/>
</Tags>

<Measure id="6" type="manual">

</Measure>

<Measure id="7" type="automatic">

</Measure>

</MeasureSeries>
UpdateSeries

This request is for adding measurements to already uploaded measurements series. This series is identified by its server ID.
UpdateSeries example request
<Request type="UpdateSeries">
<MeasureSeries id="76" serverid="7">
<Measure id="78" type="manual">

</Measure>
<Measure id="89" type="automatic">

</Measure>
</MeasureSeries>
</Request>

Server side responses

Basic structure
<Responses>
<Response type="Type1">…</Response>
<Response type="Type2">…</Response>
</Responses>

Register, Login, ResetPassword

Register success response Register failure response (invalid username)
<Response type="Register">
<Successful />
</Response>
<Response type="Register">
<Error type="invalid_username" />
</Response>

Login success response Register failure response Register failure response (already logged in)
<Response type="Login">
<Success />
</Response>
<Response type="Login">
<Error type="wrong_data" />
</Response>
<Response type="Login">
<Error type="logged_in" />
</Response>

GetInfo

GetInfo example response
<Response type="GetInfo">
<MoralConf version="5" url="www.xyz.de/moralconf.xml"/>
<MeasureConf version="2" url="www.xyz.de/measureconf.xml"/>
<TagConf version="1" url="www.xyz.de/tagconf.xml"/>
</Response>

GetMeasures

A list of measurements found for the given filter contraints is returned. Error nodes are listed seperately (see addMeasures response). An empty "Measures"-node means no results found for the given filters.

AddMeasures

The response lists the successfully added and not successfully added measurements seperately. The measurements are referenced by the ID which was used for them in the request.
AddMeasures example response
<Response type="AddMeasures">
<Successful>
<Measure id="0"/>

</Successful>
<Error>
<Measure id="1"/>

</Error>
</Response>

Successfully added measurements not added measurements
<Successful>
<Measure id="0"/>
<Measure id="1"/>

</Successful>
<Error>
<Measure id="3"/>
<Measure id="4"/>

</Error>

UpdateSeries

The response has the same structure like the addMeasures response. In addition the error type "series_not_found" can be returned.

List Servlet

The website requests measurement data for its list view via the ListServlet endpoint: http://server.url/NoiseServerServlets/ListServlet Form based parameters are sent via HTTP Post to get a corresponding JSON encoded set of measurements in return.

The following parameters are supported:
Parameter Value Description
sort One of NOISE, TIME, SERVERID,
TYPE, NONE, DISTANCE
Sets the sorting to apply to the measurements before returning the specified set of measurements.
dir One of ASC, DESC Sets the sorting direction.
start Integer value greater than or equal to zero The index for the beginning of the subset of measurements to return.
limit Integer value greater than or equal to zero The length of the subset of measurements to return.
userid Integer value greater than or equal to zero Restrict returned measurements to those of the user with that user identification. Only allowed if currently logged in as that user or with an elevated security role.

Simple testing interface

A simple test interface can be found at http://server.url/NoiseServerServlets/test.jsp.

With this minimal testing interface one can request the server by uploading XML files, containing the specified request. See "App Servlet" under the "Client side requests" section for how to build such a request.

The information and images for this side were gathered from the project group documentation.

Server Installation Instructions

Prerequisites

  • Java EE 6 Application Server (tested with GlassFish 3.1 community edition)
  • A “spatially enabled” PostgreSQL database using the PostGIS extension configured to be accessible within the Java EE infrastructure by the JNDI name “jdbc/noiseserver”
    • It may be necessary to manually add the PostgreSQL Jdbc drivers to the server’s libraries in order to configure these settings
    • In short: Create a database user with the rights to create tables and an empty database called "noiseserver" (based on the PostGIS template) and note these down for installation in Glassfish.
  • The following JAAS settings within the Java EE container
    • JdbcRealm called “noiseuserauth” using the “jdbc/noiseserver” datasource
    • User table “users”
    • Username column “username”
    • Password column “pass”
    • Group table “usergroups”
    • Groupname column “groupname”
    • Digest algorithm “none”
  • A current GeoServer installation listening on the same host as the NoiseDroid server components to install with the following settings
    • PostGIS data source called “noiseserver” with the “jdbc/noiseserver” data as connection parameters (JNDI) using its “geoservermeasures” resource
    • WFS layer called “measures” in the default workspace “cite” publishing all attributes available from the “geoservermeasures” resource
As the GeoServer configuration depends on the successful creation of all tables and views within the supplied “jdbc/noiseserver” database, these settings should be completed after initially publishing the NoiseDroid components in the application server since they will create all relevant tables and data views. The components do not depend on the installation of further libraries as they are completely includ-ed into the EAR.

Deployment

All NoiseDroid components are deployed as a single Enterprise Archive (EAR) to be added as a single new application within a Java EE 6 Application Server. During this process, all necessary database tables and views are created automatically. This includes the tables to persist measurements (see Figure below) as well as the tables to store user and access data for the Java Authentication and Authorization Service (see below) which is also controlled automatically. Furthermore, the registration of the utilized spatial PostGIS type table columns and views in the appropriate tables of the spatially enabled database is also handled by the NoiseDroid application itself to further reduce installation time and effort.

noisedroid-db-schema-measures.png

Database schema automatically created during deployment to persist measurements.

noisedroid-db-schema-security.png

Database schema created during deployment to map security roles.

Team

Contributors

  • Marius Appel
  • Arne de Wall
  • Theodor Förster
  • Holger Hopmann
  • André Roß
  • Raphael Rupprecht
  • Umut Tas
  • Stefan Voß
  • Martin Wilden

Point of Contact

Daniel Nüst: DanielNuest, d.nuest@52north.org
I Attachment Action Size Date Who Comment
OpenNoiseMap-01-2013.zipzip OpenNoiseMap-01-2013.zip manage 2 MB 07 Jan 2013 - 11:56 UnknownUser SVN Export 01-2013
OpenNoiseMap-Intro.pdfpdf OpenNoiseMap-Intro.pdf manage 2 MB 07 Jan 2013 - 12:17 DanielNuest  
de.noisedroid.apkapk de.noisedroid.apk manage 478 K 24 Mar 2015 - 12:21 DanielNuest  
noisedroid-db-schema-measures.pngpng noisedroid-db-schema-measures.png manage 25 K 03 Apr 2013 - 14:44 DanielNuest  
noisedroid-db-schema-security.pngpng noisedroid-db-schema-security.png manage 9 K 03 Apr 2013 - 14:44 DanielNuest  
slice1.pngpng slice1.png manage 93 K 07 Jan 2013 - 13:02 DanielNuest  
Topic revision: r19 - 24 Mar 2015, DanielNuest
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback