01 December 2015

istSOS 2.3.0-RC1 released

The istSOS developer Team is proud to announce the release of istSOS 2.3.0-RC1

With version 2.3.0 istSOS along with several bugfixes and improvements is introducing three interesting features: authentication, data viewer and notification.

First of all we have implemented an integrated authentication & authorization system and adapted the Web interface. Depending on the role assigned to the logged user the interface automatically adapts to show permitted tasks and hide non-permitted actions.
The second feature is a renewed DataViewer interface that now includes a new map panel showing sensors positions.
The third feature is the consolidated istSOS Notification Service which thanks to several bug fixes has reached its maturity.

For those using istSOS 2.2.1, the upgrade to 2.3.0 should be painless and would need only an upgrade of the source code and a copy of the 'service' folder.

Authentication & authorization system

Up to now a standard installation of istSOS comes without any kind of protection and administrator needed to use external authentication tools. Now, with version 2.3.0 istSOS came with embedded five security modes and four accessing roles.

Security modes:

  • Fully open: the simplest and that’s the way istSOS is installed by default. No protection is applied, everything is open.
  • Closed: this mode blocks all unauthenticated requests to istSOS lib, WAlib and the HTML files.
  • Closed, with welcome page open: blocks all unauthenticated requests to istSOS lib and WAlib. The HTML part remains open showing the welcome page with few informations.
  • Hybrid: The Hybrid mode blocks all unauthenticated interaction with the HTML and the WaLib (REST API), but opens completely the access to the istSOS lib api (Sensor Observation Service).
  • Hybrid with InsertObservation and RegisterSensor close: this mode inhibit the ability for unauthenticated users to register new sensors and send observation. All the other Sensor Observation Sensor requests remains publicly open

Accessing roles:

  • admin: users with admin role have access to all the istSOS features
  • networkmanager: The network manager has the permissions to modify everything in the domain of one or more predefined istSOS service instance. He can’t create new instances and change default istSOS configurations
  • datamanager: can modify measures, update rating discharge parameters and change procedures metadata
  • visitor: can view measures 
For more details see the documentation at: http://istsos.org/en/trunk/doc/security.html

Data Viewer with map panel

A new panel showing sensor position is added in the Data Viewer page. According to user preferences panels can be re-sized.

We are testing it right now on our production server so the final stable 2.3.0 release will be available soon on our repository on SourceForge http://sourceforge.net/projects/istsos/files/ .

21 October 2015

FOSS4G applied in Tourism

This summer (2015) the Geomatic Division at IST-SUPSI has finished the implementation of various web services in support of a new integrated ecosystem sponsored by the local touristic agency (Ticino Tourism Agency). The project #hiketicino aims to "create a network of remote and on-site services able to enhance the hiking experience for tourists and residents, thus increasing usage of the hiking trails" (Ticino New Digital Experience).

In particular we were involved in the implementation of three components: a Processing Services, a Javascript Map Widget API and a WMS Server with OpenStreetMap data.

Processing Services

Developed using Python, GRASS and PostGIS, in order to offer an easy to use remote geospatial service for the project partners, we have implemented three services offering specific processing capabilities:

Identification of point of interest along an itinerary

Given three parameters (path identifier, distance/buffer, datetime), the service returns an array identifying the points of interest included in the buffer. Mainly used by the administration interface to filter nearby point of interests.

Itinerary elevation profile calculation

Given the path identifier and optionally an extra parameter (info), the service returns the elevation profile represented as an array with each element represented by coordinates, distance in meters from start point and elevation in meters. This is used by the mobile application and the JavaScript Api to print an elevation profile chart. The response time for this service in average is of 136 ms with a size of 10.1 KB.

Itinerary elevation profile data exposed in an interactive chart 
using the Javascript Map Widget API

Static map image generation

Given seven parameters (path identifiers, point of interest types, height/width in inches, dpi, epsg and output format), the service takes care of calculating the best way to fit the itinerary chosen. Relying on a Web Map Service as backend returns a static image that is used to generate PDF files, not interactive map views on big screens "Totem" and itinerary details on the mobile application.

Example of static map image generation used with a "Totem" display

Javascript Map Widget API

The JavaScript Map Widget Api is a performant and easy to use API. Based mainly on OpenLayers 3 (http://openlayers.org) and d3js (http://d3js.org), it makes strong use of the Google's Closure Compiler (https://developers.google.com/closure/compiler) making the code  lightweight and optimized. 

Except for the background maps, everything else is loaded once during initialization. That means that all the polygons and point are loaded once. All the code with vector data can be compressed into 693.5 KB (629 KB the MWA core, optional 2KB for charting, optional extra data 60 KB for pois, CSS 2.5 KB). In terms of performance, the response time for the core part is 272 ms and 51 ms for the optional extra data related to pois.

Using vectors to represent overlay information opens the doors for more interaction with the on-map information (changing styles on the fly, quicker data access, smooth animations, etc). The map goes faster, because network resources are used to load just optimized raster tiles that can be cached on the client side for reuse.

The usage is simple. Inserting a HTML div element and a configurable script tag, the project partners with the task of implementing the web site, were able to embed easily a dynamic map, optionally with an interactive chart representing the terrain profile of an itinerary.

The Map Widget APi offer to the user the freedom to control the map (paning, zooming, ect), to switch base layers and points of interest and locate himself.

Here are some notable features..

Embedded menu

A configurable menu is added automatically into the map frame. Available functionality are zoom to max extent, zoom in & out, geolocation, layers and points of interest switch.

Interacting with the manu

Animated marker clustering

In some cases point of interest are located at the same coordinate or are close to each others, in this case a nice animation has been developed from scratch using the d3js library. The cluster icon showing the count of inner features, once clicked explodes showing single icon representing every point of interest located at this position.

Marker cluster with OpenLayers 3

Interactive terrain profile chart

Configurable terrain profile chart. Passing over the chart the hiker marker appear showing the exact location in the map.

Interactive terrain profile chart with d3js

WMS Server with OpenStreetMap 

In order to offer an interactive map experience a Web Mapping Service has been deployed using GeoServer (http://geoserver.org). OpenStreetMap (http://www.openstreetmap.org/about) has been the choice for the default base map. Taking inspiration from the default OSM style it has been modified with a touch of personalization: changing fonts to integrate with main site style and adding shadows and contour lines using the Digital Terrain Model from the Helidem project (http://helidem.eu). To boost response speed all the tiles are served using caching techniques.

OSM data restyled

Please jump to http://hike.ticino.ch and look for the map!!