Presentation is loading. Please wait.

Presentation is loading. Please wait.

Canada’s Natural Resources – Now and for the Future Using Open Source to analyze Canada’s National Forest Inventory. Chris West and Brian Low Pacific Forestry.

Similar presentations


Presentation on theme: "Canada’s Natural Resources – Now and for the Future Using Open Source to analyze Canada’s National Forest Inventory. Chris West and Brian Low Pacific Forestry."— Presentation transcript:

1 Canada’s Natural Resources – Now and for the Future Using Open Source to analyze Canada’s National Forest Inventory. Chris West and Brian Low Pacific Forestry Centre Canadian Forest Service Natural Resources Canada

2 Canada’s Natural Resources – Now and for the Future Who we are (1)  Canada’s new National Forest Inventory (NFI) is designed to assess and monitor the extent, state and sustainable development of Canada’s forests.

3 Canada’s Natural Resources – Now and for the Future Who we are (2)  Canada’s National Forest Information System (NFIS Canada) is an inter-governmental initiative that is funded jointly by the Federal, Provincial, and Territorial Governments of Canada.  Working together with its partners, NFIS provides authoritative information/data about sustainable forest management in Canada.

4 Canada’s Natural Resources – Now and for the Future Canada’s Forest Sector Facts  Canada has 10% of the world’s forests.  41% of Canada’s surface area is forest or other wooded lands.  In 2004, the forest sector contributed $36.8 billion to the Canadian Economy (3.1% of Canada’s GDP)  (Facts taken from “Important Facts on Canada’s Natural Resources” 2005)

5 Canada’s Natural Resources – Now and for the Future FOSS Technologies  Open Source Technologies utilized include:  Mapserver / Proj4.  Linux  Apache  PostgreSQL  PostGIS.  GDAL suite of tools.  GeoTools / JTS  Java / Eclipse

6 Canada’s Natural Resources – Now and for the Future Project Overview  NFI employs a “plot-based design consisting of permanent observational units located on a national grid.”  Repeated measurements are conducted over a set time frame and changes in these plots are summarized and reported over time.  NFI is designed to “be able to provide quantitative information on Canada’s Forests and related resources.”

7 Canada’s Natural Resources – Now and for the Future NFI Data  At least 25,000 2km by 2km plots with six layers/themes of data per plot consisting of:  Land Cover photo interpreted (Vector Polygons).  Land Use photo interpreted (Vector Polygons).  Land Ownership photo interpreted (Vector Polygons).  Land Protected Status photo interpreted (Vector Polygons).  Canadian Terrestrial Ecozones (Vector WMS).  Land Cover classified from satellite (Raster).

8 Canada’s Natural Resources – Now and for the Future NFI Data Layers Visual

9 Canada’s Natural Resources – Now and for the Future Spatial Analysis  Required for NFI reporting.  Needs to support area queries at a national level down to queries at a much finer level.  Generally deal with spatial operations that include the “by” or “within” (union or intersection) spatial operands operating on area.

10 Canada’s Natural Resources – Now and for the Future A Sample of NFI Reporting Questions  What is the total forested area within a specified region?  What is the area of forested types within a specified region?  What is the area of forest type by age within a specified region?  What is the area of forest types by protection status within a specified region?

11 Canada’s Natural Resources – Now and for the Future Issues to overcome 1.Spatial analysis requires thousands upon thousands of spatial overlays. 2.Mixed raster and vector data make spatial overlays difficult. 3.Large amounts of attribute data are stored in external databases. 4.Data collection is conducted over a long period of time, requiring spatial analysis to be done at regular intervals.

12 Canada’s Natural Resources – Now and for the Future General Approach 1.Load vector NFI spatial data into a Spatial Database (PostGIS). 2.Resample 2km by 2km NFI plots to 5m by 5m cells (Mapserver, SLD, GDAL, custom code). 3.Load resampled data into a RDBMS (PostgreSQL). 4.Run simple SQL queries to generate NFI reports.

13 Canada’s Natural Resources – Now and for the Future Step 1: Load Spatial Data  Load NFI vector plot data into PostGIS.  UTM Zones were created to partition the data  Mapserver used to publish data as raster images (OGC WMS).

14 Canada’s Natural Resources – Now and for the Future Resample plot data (1)  Mapserver is used as a “Vector to raster” engine to create raster images of an NFI plot layer and an NFI plot grid. Each NFI plot has a corresponding “grid file”  A 5m by 5m uniquely colored grid (160,000 cells) was created.  The grid files are aggregated into UTM zones using ogrtindex. The index files are referenced in a Mapfile.

15 Canada’s Natural Resources – Now and for the Future Resample plot data (2) Mapserver Grid Image Plot Image Plot Layer Spatial Data (PostGIS + SLD) Grid Data

16 Canada’s Natural Resources – Now and for the Future Resample plot data (3)  The WMS getmap requests contains the bounding box of 2100 m by 2100 m with a width of 2100 pixels and a height of 2100 pixels.  The request returns a one metre resolution image.  Each 5m by 5m cell in the grid has 25 pixels.

17 Canada’s Natural Resources – Now and for the Future Resample plot data (4)  A service was created to take the images and resample them.  This approach allowed spatial data to be stored in a text file.

18 Canada’s Natural Resources – Now and for the Future Resample plot data (5)  Simple Overlay example with two four pixel images: Image 1 Image 2 Overlay 1,1 0,0 1,0 1,1 1,0 0,1 Output file red, green, 2 blue, black, 1 blue, yellow, 1

19 Canada’s Natural Resources – Now and for the Future Resample plot data (6)  The output CSV file is resampled to find the highest number of pixels for each grid cell. The resulting document contains 160,000 rows (one for each 5m by 5m cell) consisting of each resampled colour pair.  The colour representing the plot layer in each record is replaced by its unique polygon identifier.

20 Canada’s Natural Resources – Now and for the Future Example of Resampling 5m Grid Image (5X5 pixels) Land cover Image (5X5 pixels) Raster Overlay Output file green,blue,10 green,yellow,7 green,pink,8

21 Canada’s Natural Resources – Now and for the Future Resampled 5X5 Cell green,blue,10 green,yellow,7 green,pink,8 Raster Overlay Output Resampling Process green,blue

22 Canada’s Natural Resources – Now and for the Future Load Resampled data into PostgreSQL  Resampled data gets loaded into one table in PostgreSQL.

23 Canada’s Natural Resources – Now and for the Future SQL Queries to Generate NFI Reports  Because the spatial data and the attribute data are both located in a RDBMS, SQL queries can be written to handle the “by” and “within” spatial operands.

24 Canada’s Natural Resources – Now and for the Future Example Cell Summaries Generation Query  The SQL statement adds the following records in the CELL_SUMMARIES table: SELECT DISTINCT 'plot1_pelo' as TILE_THEME_ID, c1.theme_value c2.theme_value c3.theme_value c4.theme_value as THEME_VALUE, count(*) as VALUE_COUNT FROM cell_values c1, cell_values c2, cell_values c3, cell_values c4 WHERE c1.tile_theme_id = 'plot1_landcover' AND c2.tile_theme_id = 'plot1_landuse' AND c3.tile_theme_id = 'plot1_ownership' AND c4.tile_theme_id = 'plot1_protectedstatus' AND c1.cell_num = c2.cell_num AND c2.cell_num = c3.cell_num AND c3.cell_num = c4.cell_num GROUP BY c1.theme_value,c2.theme_value,c3.theme_value,c4.theme_value;

25 Canada’s Natural Resources – Now and for the Future Sample Output  Sample output from query.

26 Canada’s Natural Resources – Now and for the Future Why this Approach  Allows the combination of vector and raster data to be spatially analyzed.  Allows user to do spatial queries using SQL.  Utilizes the power of a RDBMS.  Allows spatial data to be easily joined (SQL) to attribute data.  Easily scalable because open source software is used.

27 Canada’s Natural Resources – Now and for the Future Acknowledgments  Canadian Council of Forest Ministers (CCFM)  Canadian Forest Service, Natural Resources Canada (CFS, NRCan)  National Forest Inventory staff including:  Mark Gillis  Katja Power  Alex Song  Past Contributors:  Robin Quenet  Rick Morrison

28 Canada’s Natural Resources – Now and for the Future References  Low, B. (2005). ExPAND Expanding Primary Attributes for National Decision Making, M.Sc. Thesis University of Victoria.  Gillis et al. (2004). About NFI.  Natural Resources Canada (2005). Important Facts on Canada’s Resources.

29 Canada’s Natural Resources – Now and for the Future Questions???


Download ppt "Canada’s Natural Resources – Now and for the Future Using Open Source to analyze Canada’s National Forest Inventory. Chris West and Brian Low Pacific Forestry."

Similar presentations


Ads by Google