Timesliding canvas maplayer

After someone saw my BAG building data movie YouTube Preview Image he asked if it would be possible to create an interactive map of the entire Netherlands. This made me think, since creating the movie was a very time consuming action. The problem is that there are about 6 million buildings in the BAG database. This makes the data a bit unwieldy to use directly in the browser. The old fashioned way to do time series on maps involves creating a new layer for each time-moment (year in this case). This would mean that there would be over 150 layers to be loaded on the map and switching between those for the ‘time sliding’ effect. Apart from the hideous task to set up 150 almost the same layers, it would end up with too much images for a browser to handle.

However modern browsers have the <canvas> element. This element allows for the manipulation of single pixels within this element. So I figured if I could encode the building-dates in a PNG and use canvas to display only those pixels which represent a building older than the given date it should be possible to time-slide through the buildings. Fortunately the fancy new mapping library Leaflet.js has a canvas tile layer build in. The BAG data is already available through EduGIS, so I only needed it to encode the data differently in the PNGs.

The encoding is very simple: per pixel there are 4 values available: red, green, blue and alpha. Since I only needed to encode 200-odd values I used just the red value. The years before 1850 are encoded as groups, since the data is so sparse, after 1850 each year is individually encoded. This means that from 1850 onwards the red value increases with 1. The client retrieves the encoded PNGs as normal tiles and look like this:

The image appears grey because I kept the green and blue values of the PNG the same as the red. This image is loaded into canvas and the imageData is retrieved using ctx.getImageData(0, 0, 256, 256) and stored as a jQuery data object on the canvas. This is important, since for visual effect we will manipulate the imageData on the canvas and we want to keep track of the original values. Once the imageData is attached to the canvas the colors are being calculated. It will take the original values, compares them to the current year and will decide whether or not to show the pixel and in which color.

Since only the grey tile is needed, the actual sliding through time is really fast because it doesn’t need to retrieve more data. With 4 bands of 255 values each you can encode an insane amount of data into a PNG, readily available through canvas for direct manipulation. Apart from time sliding, is detailed representation of DEM data an obvious use case.

Dike break at Woltersum

During the high water levels a few days ago there was some fear the dike at Woltersum might break. People were evacuated and the dike was monitored closely (see eg http://www.denverpost.com/breakingnews/ci_19686918).

The dike did not break fortunately. However, it would be interesting to see what would have happened if it did break. So one of our colleagues, Tom van Tilburg, installed the Anuga flooding model (http://anuga.anu.edu.au/). In record time this model was configured using GIS data and executed for this specific polder.

Below the situation (water depth) is shown after 45 minutes.The dike broke in this simulation just southwest of Woltersum (in the middle of the dark blue polygon).

The results are just an indication, and absolutely not accurate, validated or whatever. For example, a random speed of 450 cubic meters per second is used for the flooding in stead of a flooding based on the canal properties itself.

Despite the result being just an indication, the speed at which the model van installed and configured using GIS data like height data (AHN) and topographic data (Top10NL) was impressive. Within two hours after downloading the model we had results. And a result based on real, large scale GIS data. With just a bit more accurate estimation of the flooding speed, the results would be more than just an indication.

Social media in crisis management

Since its launch in 2006 the microblog platform Twitter has become more and more popular. Private persons and organizations use this social medium to interact and communicate about all possible matters. Especially in times of crisis people intensively use Twitter to keep in touch with the rest of the world, so scientists have discovered. Twitterers are sharing their feelings or  are retweeting information supplied by official channels. Eyewitnesses are logging their own observations, which could include photos or videos. This behaviour was observed during many crises, such as Pukkelpop in 2011, Haiti in 2010 or the Love Parade in 2010. Disaster relief organizations like the Red Cross use this information to investigate the state of the crisis, the need for relief supplies, or the number of victims.

Organizations concerned with disaster relief at first used social media to supply the public with information and instructions. We now see more and more opportunities to turn this one-way flow of information into two-way traffic: Information supplied by the public could greatly enhance the view on a developing crises for crisis management teams. It is a form of crowdsourcing: With or without being asked for it, the general public is supplying much needed data for information systems.

Stages in a developing crisis

A crisis or disaster typically goes through several phases until it is entirely dealt with. We see that crowdsourcing with social media is especially fruitful when a crisis is being actively repressed. Much needed information like the location of victims, their immediate needs, missing person reports or the state of the infrastructure can be supplied by social media.
After the active phase of a crisis, the affected area and population will go through a phase of recovery. Social media can be used as a data source in that stage too. Crowdsourcing can supply data needed for damage calculations and to assess the needs for physical and psychological post-trauma humanitarian aid.
Whether social media can effectively be used as an early warning system to identify new crises before they are reported through official channels is still under investigation.

Social media as an information source: potential

Undoubtedly there is a huge potential for social media as an information source for crisis management, especially in crises where a large number of people that are capable to use social media are involved. A huge amount of data can be collected in a short time, and members of the public typically are earlier on the scene of a crisis than officials. Furthermore, information shared through social media can immediately be effective as a source for information for the general public. Lastly, data obtained from social media can be used to validate official data: Is the gas cloud really where we thought it would be or do people smell something in a different area?

Social media as an information source: concerns

Although crowdsourcing through social media can valuable source of information in crisis management, some care has to be taken in getting the right information. There is a risk of polluting the crisis management information pool if data from social media are not carefully selected. One aspect is filtering data on relevance. For example, not everything that is being twittered is of relevance for crisis management. Filtering on location and hash tags can help in separating the wheat from the chaff. A further help can be sorting data on reliability of its source.

Using social media in the Dutch national crisis management system

Geodan Research is implementing crowd sourcing for the research project i-Bridge. Two plug-ins provide additional information input from social media.
One of the plug-ins is the Twitter-searcher, which collects data from Twitter. Both location and hash tags are used a filter. Tweets filtered in this way are visible to the crisis manager, who can decide whether the information is important or not.
The other plug-in uses Ushahidi as a data source. Ushahidi is an open source software platform used for the collection, visualization and interactive mapping of information. The software was used in different cases, such as natural disasters, or the Arabic Spring. Ushahidi provides data in a more structured way. For example, it used categories that are of immediate use to a crisis manager.