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!!




14 November 2014

Flooding emergency management with SITGAP2

In the last months the geomatic division of the IST-SUPSI has developed, in collaboration with the civil protection of the Locarno and Vallemmagia region, a renewed application for flooding management named SITGAP 2.

Born from the ashes of an old project, this application takes advantage of the latest geospatial technologies using an innovative approach while is providing to the civil protection and their partner a essential information for the optimal planning and management of the emergency.




SITGAP 2, accessible only using a secured user and password, provides base maps, real-time lake levels and its evolution forecasted by hydrological models run by the IST-SUPSI, details of exposed elements (including population, private properties, oil cisterns etc.), evacuation tools, and many other essential features specifically designed and implemented.

Even if still in test phase, the application is already proving its utility and stability in supporting the current alarm (level 5 of 5) operations.

For those interested, more insight will be provided in Fribourg (Switzerland) the next SGM 2014 (Swiss Geoscience Meeting) the November 22nd at 11:20.


SITGAP 2 appeared in the national media:
  1. RSI 2014-11-10 19:45: http://goo.gl/ng4aZK 
  2. RSI 2014-11-13 06:17: http://goo.gl/vbpeuv 
  3. Ticinonline 2014-11-14 15:42: http://goo.gl/RuOjYm
  4. T+ 2014-11-14 18:57: http://goo.gl/KKpsZz
Credits go to:






30 October 2014

SITGAP2 - MANAGEMENT, ALARM AND EVACUATION SYSTEM FOR LOCARNO AND VALLEMAGGIA CIVIL PROTECTION


An early warning system for lake flooding in support of civil protection

Object of the Study:
DESIGN AND IMPLEMENTATION OF NEW SOLUTIONS FOR THE IMPLEMENTATION OF AN EASY-TO-UPDATE SYSTEM SUPPORTING CIVIL PROTECTION ACTIVITIES

Several studies on predict an increase in high-intensity precipitations in Europe, which is likely increase the frequency and magnitude of flood events.



Early warning systems (EWS) are used for predicting, communicating, and responding to floods. An existing EWS was renewed to meet new requirements. The new system design was based on the Service Oriented Architecture pattern. Open source software was used throughout the system. Open source approach was found desirable for several reasons: cost reduction, independence from proprietary policies, the right to access and modify the source code, and because of the good support provided by the open source software community.


The SITGAP RESTful web API are developed in Python language and rely on Tornado Web Server [1] which is capable to handle a large number of clients at the same time. The requests and responses use the JSON open standard format. The data store is the PostgreSQL with the PostGIS extension.

The interface was developed using Sencha Ext JS [2] and orchestrates the services to provide the desired business logic of the application. It integrates hydro- meteorological data concerning the areas surrounding the Verbano basin, it runs a conceptual hydrological model that combines the collected data and high- resolution meteorological forecasting to forecast lake level, and dispatches alerts to local stakeholder. 



Hydro-meteorological data are collected and managed in real-time thanks to the usage of the SOS standard by means of two istSOS [3] platform which serve more than 240 sensors and 30 million of observations coming from the monitoring networks of Canton Ticino, MetwoSwiss, Swiss Federal Environmental Office, Piemonte Region Environmental Agency and Lombardy Region Great Lake Consortium. 



The hydrological model is a SCS-CN-based conceptual model that applies the Nash method. It is activated in case of meteorological alert only. Every model run, after a first phase of calibration based on measured observations collected from the istSOS services, it provides 72 hours lake level forecasts by using COSMO-7 meteorological model [4] rainfall outputs by MeteoSwiss and elaborated thanks to a local WPS service.






12 March 2014

Apply for istSOS ideas within the Google Summer of Code program

Google Summer of Code students application period is now open

Also this year, as an hosted project of OSGeo (Open Source Geospatial Foundation), istSOS welcome students who may want to contribute to the project by implementing new ideas (see istSOS ideas page).
Selected students can receive 5'000 USD from Google to work on the Open Source project !!!


Application rules and references (from OSgeo GSoC Admins)

Google Summer of Code [0] students application period is now open.
The application period closes on March 21st.

Here [1] is a link to all common questions on GSoC, that cover the basics about the program and also specific questions on how to apply and what are the requirements for students and mentors.

OSGeo homepage on Melange shows the application template [2] that students shall use and will contain the direct link for application submission.

Our suggestions to students are summarized as follows: 
  • check the eligibility requirements first (see the link to common questions) 
  • get inspiration and info from the OSGeo Ideas wiki page [3] 
  • if you are new, introduce yourself to the developer team you wish to join 
  • register on Melange and submit the application, even as draft, not later than next week. You are able to edit it or withdraw it anytime during the application period.Interested students and mentors are welcome to ask for clarification on the soc list soc@lists.osgeo.org or, if privacy is needed, to the admins directly.. 
Let us remind that you don't need to already be an expert to take part to GSoC - if you are unsure, just ask what are the required skills for a given idea!

[0] GSoC homepage https://www.google-melange.com/gsoc/homepage/google/gsoc2014
[1] GSoC FAQ https://www.google-melange.com/gsoc/document/show/gsoc_program/google/gsoc2014/help_page
[2] OSGeo application template for students https://www.google-melange.com/gsoc/org2/google/gsoc2014/osgeo
[3] OSGeo Ideas http://wiki.osgeo.org/wiki/Google_Summer_of_Code_2014_Ideas

12 February 2014

istSOS 2.1 released

The istSOS developer Team is proud to announce the release of istSOS 2.1.


The 2.1 release brings numerous features, enhancements and fixes to previous versions, and also guarantee its compliance with OGC SOS version 1.0.0 thanks to the passing of OGC conformance test.


Release Highlights

  • passed OGC SOS 1.0 Conformance Test
  • new internal scheduler for data acquisition operations
  • updated automatic data validation based on setted constraints
  • improved interface (REST and HTML) for "virtual procedure" creation, modification, deletion
  • new scripts for: data migration from istSOS 1.0, service configuration and raw data aggregation
  • minor bugs fixed

About istSOS

istSOS is an OGC SOS server implementation written in Python. istSOS allows for managing and dispatching observations from monitoring sensors according to the Sensor Observation Service standard.
The project provides also a Graphical User Interface that allows for easing the daily operations and a RESTFull Web api for automatizing administration procedures.
istSOS is released under the GPL License, and runs on all major platforms.


Download here

31 January 2014

Water Protection Areas Editor

Screenshot - basemap PK25 (c) swisstopo
The Water Protection Areas Editor (pre-release) has been developed in the context of the cantonal government mandate (Division for air, water and soil protection of the Canton Ticino - SPAAS) for management of surveys, boreholes and springs (GESPOS). The aim of this Web Application, is to provide remote editing capabilities to the attributes table of the spatial database.

Screenshot - basemap PK25 (c) swisstopo
The application is mainly composed of a dynamic map visualizing WMS and WFS vector and raster data, a grid view and an extra panel including a legend graphics view, various attributes filtering capabilities, geographic filters (freehand drawn or based on existing boundaries), coordinate search and user settings.
Selections, filtering and search are graphically represented within the map and the grid view with an elegant adoption of the mvc pattern.

Screenshot - basemap PK25 (c) swisstopo
The Water Protection Areas Editor is entirely developed with Open Source Software and relies on OGC Standards for client-server interaction.

Unfortunately this app interact with some sensible data, so it is not freely accessible to unauthorized humans.

15 January 2014

istSOS passed OGC SOS 1.0 Conformance Test

istSOS Dev Team is proud to announce that istSOS 2.1 (currently trunk version and available by end of January 2014) passed the "Compliance test suite for Sensor Observation Service (SOS) 1.0" provided by the web testing facility by OGC Compliance Program (CITE).

Thanks to this test a minor compliance issues were resolved, in particular Exception reports, SensorML mandatory element and time zone format have been patched.