Visualizing Alaska’s Forest Damage in Twenty Years

Author: Anitha Muraleedharan
Geovis Project Assignment@RyersonGeo,
SA 8905, Fall 2018 (Rinner)

Forest Damage in Alaska

Alaska is a dynamic region and has a long history of changeable climate. Alaska has lost a lot of its forests due to insect infestation, fire, flood, landslides, and windthrow. Aerial surveys are conducted to monitor forest health for the State of Alaska and to identify insect and some disease pest trends. This time series map animation will visualize the forest damage in Kenai Peninsula, Tanana Region and Fort Yukon Region of Alaska during the years 1989 to 2010. This blog will cover the entire processes involved in creating this visualization.

Data

The spatial data of the forest damage survey conducted during the period from 1989 to 2010 by the Alaska Department of Natural Resources are readily available for download from AK State Geo-Spatial Data Clearinghouse (http://www.asgdc.state.ak.us/?#2952). The shapefiles are available individually for each year from 1989 to 2010 except for years from 2000 to 2007. These data were used for preparing this Time Series map animation.

Preparing Data for Animation in QGIS

QGIS 3.2.3 64bit was used to prepare the data for animated map visualization of Alaska’s forest damage. QGIS is a free and open-source cross-platform desktop geographic information system (GIS) application that supports viewing, editing, visualization and analysis of geospatial data. Since the data were available only as individual files, the first step in preparing the data was to merge this data together into one shapefile. For this task, I used the Merge Vector Layers Tool in QGIS which merged all the individual shapefiles into a single shapefile.

Steps to Merge multiple vector layers into one

  • Step1: Add all the vector layers, intended to be merged, into QGIS
  • Step2: Go to Vector →Data Management Tools → Merge Vector Layers in the menu
  • Step3: Click input layers button and select all the layers needed to be merged
  • Step4: Click Merged Layer button to give a name for the merged output layer
  • Step4: Click Run in Background button to create the merged layer and add it to QGIS

Fig. 1 Merge Vector Layer Tool in QGIS

The next task was to format the timestamp column to fit the QGIS Time Manager plugin tool that will be used to create the animated map visualization. The timestamp column for this data was “SURVEY_YR” which was in four-digit format. The QGIS Time Manager Plugin requires that the timestamp data be in YYYY-MM-DD format. For this, a new field was created with name “Damage_Yr” and type string and used the Field Calculator tool in Processing Toolbox of QGIS.

Fig. 2 Field Calculator Tool in QGIS

In the Field Calculator tool, the expression “tostring(SURVEY_YR) + ‘-01-01’ ” was used to concatenate data in the field “SURVEY_YR” and the “-01-01”  together to make the timestamp in YYYY-MM-DD format and copy the data to the new field “Damage_Yr”.

Fig. 3 Attribute table showing the Damge_Yr in YYYY-MM-DD format after update.

Visualizing the Time Series

The Time Manager plugin was downloaded and installed in QGIS. The forest damage data was then added as a layer in QGIS. The Google Terrain map was added as the base map for this time series animation. The following steps were performed to add the Google Terrain map to QGIS.

  • Step1: Add a new connection to XYZ Tiles in QGIS and give it a name, say “Google Terrain”
  • Step2: Use https://mt1.google.com/vt/lyrs=t&x={x}&y={y}&z={z} as the URL.
  • Step3. Click Ok and then double-click the created layer to add the “Google Terrain” as the layer.

After the data was added, it was time to apply symbology to the polygon data showing the forest damage in QGIS. The layer was styled using the attribute “Damage_Yr” and categorized with sequential symbology. Once the data was styled, the Time Manager plugin needed to be configured to visualize the time series animation.

In the Time Manager Settings window, the Forest damage layer which needs to be animated was added using the “Add layer” button. The Damage_Yr column was chosen for the Start and End time and “Accumulate features” option was selected to show the features accumulated on the map as the year changes during the animation. 500 milliseconds duration was set in the animation options to show each year for that many seconds in the animation before showing the next year. To display each year as a label in the map during the animation, time format was set as “%Y” and the font, font size, and text color were also set.

Fig. 4 Time manager settings window

Fig. 5 Time display options.

The time frame in the Time manager dock was set as years since the forest damage in each year will be animated and displayed. The time frame size for the animation was set as 1 since we have data for each year from 1989 to 2010. The animation can be played by clicking the play button and QGIS will show the forest damage of Alaska in each year from 1989 to 2010 on the map window for 500 milliseconds each.

Fig. 6 Time Manager dock showing settings for the animation in QGIS

Converting the Time Series into Video

The Time Manager allows exporting the animation to a video. However, there is no option to add a legend onto the rendered maps in the animation in QGIS. Therefore, the maps were exported as .PNG image files. The map frames were exported first with the full extent of the map and subsequently, two more times with map zoomed to areas Tanana and Fort Yukon respectively for showing different areas in one animation. The legend along with title and data source labels were then added for each exported map frame using photoshop.

Finally, VirtualDub software was used to convert the .PNG files to video for each series of maps. VirtualDub is a free and open-source video capture and video processing utility for Microsoft Windows written by Avery Lee.  The generated .PNG files were then renamed in ascending order sequence in the format “frameXXX.png” where XXX is the frame number. For example, frame000, frame001 and so on. This is required for VirtualDub to detect the files as a sequence of images and then combine it to a video. The steps followed to create the animated video is as given below.

  • Step1: Open VirtualDub software
  • Step2: Go to File → Open video file option in the menu and navigate to the images folder
  • Step3: Click the first image in the map image series and VirtualDub will automatically add all the other images that are in sequence
  • Step5: Go to Video → Frame rate and set fps as 0.5 to show each frame for 500 milliseconds in the video
  • Step6: Preview the video and save it using File → Save as AVI option in the menu

Fig. 7 Combining the png files in VirtualDub software

Results


Watch the visualization on YouTube