the remote sensing and gis software library - rsgislibgoogling an application and python). ......

23
Outline The OSGEO System Course Overview The Remote Sensing and GIS Software Library Pete Bunting and Daniel Clewley December 2, 2013 Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Upload: trandieu

Post on 03-Feb-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

The Remote Sensing and GIS Software Library

Pete Bunting and Daniel Clewley

December 2, 2013

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 2: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

1 The OSGEO SystemOpen Source Remote Sensing SoftwareUsage Examples

2 Course OverviewComputing Environment

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 3: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

About Us

Pete Bunting

Senior Lecturer at Aberystwyth UniversityHead of Earth Observation and Ecosystem Dynamics Group atAU.Ph.D. supervised by Richard Lucas 2004 - 2007

Dan Clewley

Post Doctoral Research Associate at the University ofSouthern California.Working with Mahta Moghaddam in the Microwave Systems,Sensors and Imaging Lab (MiXIL).Ph.D. supervised by Richard Lucas 2008 - 2011

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 4: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

Paradigm

Shifting from small datasets to large.

For years scientists have demonstrated techniques on singleimages / study sites.We now have large spatial and time series datasets available tous - opportunity to demonstrate techniques on larger datasets.

From single core to multicore

How many Universities and institutions have invested in HPCequipment?How can we effectively utilise this capability for RemoteSensing?

Software licensed per core?

Does open source provide a better more flexible solution?

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 5: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

Raster Processing

1 Storage

Image data (with attribute tables)Compression

2 Processing Tools

Needs to be scriptableAbility to process large datasets and number of input imagesEasy to use and extendible

3 Visualisation

Easy to useCross platform.

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 6: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

The Remote Sensing and GIS Software Library

Started by Pete Bunting in April 2008 as a means of groupingtogether code developed as part of his research and to providea better platform for development of new functions.

Released under an open source (GPL) license in November2009.

Contains over 300 functions for processing vector and rasterdata.

There are two main interfaces for RSGISLib, XML scripts andPython bindings - For this worksheet we focus on the newerPython bindings.

Paper recently published in Computers & Geosciences[Bunting et al.(2014)Bunting, Clewley, Lucas, and Gillingham]

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 7: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

Software used in Combination with RSGISLib

RSGISLib is not a complete solution and we use in combinationwith a number of open source projects. The main ones, which we’llbe using during this workshop, are:

GDAL

The KEA image format

RIOS

TuiView

With Python used to join together the different packages andproduce processing chains.

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 8: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

Geospatial Data Abstract Library (GDAL)

Provides a library for reading and writing image and vectorformats

Supports a very wide variety of formats

Includes a set of useful tools, such as

Translation between file formats (e.g., GeoTIFF to ENVI)Reprojecting dataPolygonise / Rasterise

Widely used in many software packages

Good, broad and activity community

http://www.gdal.org

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 9: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

KEA image file format

HDF5 based image file format

GDAL driver

Therefore the format can be used in any GDAL compatiblesoftware (e.g., ArcMap)

Support for large raster attribute tables

Used for classification

zlib based compression

Small file sizes10 m SPOT mosaic of New Zealand 5GB per island (Eachapprox. 65000, 84000 pixels)

Development funded and supported by Landcare Research,New Zealand.

[Bunting and Gillingham(2013)]

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 10: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

Raster I/O Simplification (RIOS)

A flexible Python framework for image processing

Numpy and Scipy functions are easily accessible

Very fast and simple development but scalable

Framework for accessing GDAL raster attribute tables (RATs)

Object Oriented classification

Developed by Sam Gillingham and Neil Flood

Queensland Government and Landcare Research, NZ

[Gillingham and Flood(2013)]

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 11: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

TuiView

Free and open source imageviewer

Using GDAL and Python

Fast and easy to use

Light weight can be usedfrom a remote server

Developed by SamGillingham, LandcareResearch, NZ

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 12: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

Python

High level scripting language which is interpreted, interactiveand object-oriented.

Has clear and understandable syntax.

Many libraries available for a variety of applications (tryGoogling an application and Python).

To fully utilise the Python bindings of RSGISLib, and the othertools described here, knowledge of Python syntax is required.

For this course a basic knowledge of Python will be helpfulbut is not required.

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 13: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course Overview

Open Source Remote Sensing SoftwareUsage Examples

Examples of research using the software presented

Biomass mapping in Australia - associated pre-processing.

Regrowth Classification in Queensland, Australia using FPCand PALSAR data.

National Land Cover Database in New Zealand.

Biodiversity Multi-SOurce Monitoring System: From Space ToSpecies (BIO SOS)

Wetland mapping in North America using JERS-1 andPALSAR data.

Numerous PhD and MSc dissertations at AberystwythUniversity.

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 14: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

Topics covered

Some of the utility programs included with GDAL

Data visualisation using TuiView

Creating scripts with Python

RSGISLib

Pre-processingImage segmentationClassificationChange detection

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 15: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

Course structure

Series of worked examples.

We’ll provide an overview of each script then you’ll be giventime to run.

Highlights of scripts covered in slides.

Complete scripts, with comments (lines starting with #), innotes and with course material.

Brief description of commands in notes - links to moredetailed explanation.

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 16: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

Linux Virtual Machine

While a number of open source remote sensing projects arecross platform RSGISLib currently only runs under UNIX-likeoperating systems (e.g., Linux, OS X, Solaris).

You have been provided a virtual machine running xubuntu (avariant of ubuntu)

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 17: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

The XFCE Desktop

TerminalText editor

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 18: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

The command line

The software used for this course are accessed from thecommand line.

Steeper learning curve then GUI tools but offer more power.

Possible to script and batch process multiple data sets.

Easy to translate to High Performance Computing (HPC)environments.

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 19: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

EnvMaster

All the software used for this course have been built fromsource and installed to /share/osgeo

A separate folder is used for each software and version.

EnvMaster is used to update the paths load and unloadlibraries and swap versions.

This is a common practice on managed systems (e.g., HPCs)where users require multiple versions of software.

For personal machines it keeps things tidy and stops confusionbetween different versions.

Makes the software stack portable and easier to deploy acrossmultiple machines.

Written by Sam Gillingham.

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 20: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

Data Location

All the files used for this course are in the home folder under‘RSGISLibCourse’

Python scripts are within ‘Scripts’ and images are within‘Data’

Assume scripts are being run from data directory.

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 21: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

Data Location

Change your working directory to the data directory by opening aterminal window and typing:

cd ~/RSGISLibCourse/Data

The scripts are provided in a separate directory and must be copiedto the ‘Data’ directory, you can copy them one at a time, or all atonce by typing:

cp ../Scripts/*py .

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 22: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

Learning Python

For complete beginners to python the codecademy.com pythontutorials are recommend, covering:

‘Python Syntax’

‘Strings & Console Output’

‘Date and Time’

‘Conditionals & Flow Control’

‘Functions’

‘Python Lists and Dictionaries’

‘Lists and Functions’

‘Loops’

‘File Input / Output’

(http://www.codecademy.com/tracks/python)

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library

Page 23: The Remote Sensing and GIS Software Library - RSGISLibGoogling an application and Python). ... Wetland mapping in North America using JERS-1 and ... Pete Bunting and Daniel Clewley

OutlineThe OSGEO System

Course OverviewComputing Environment

Bibliography

Bunting, P., Clewley, D., Lucas, R. M., Gillingham, S., Jan.2014. The Remote Sensing and GIS Software Library(RSGISLib). Computers and Geosciences 62, 216–226.

Bunting, P., Gillingham, S., 2013. The KEA image file format.Computers and Geosciences 57, 54–58.

Gillingham, S., Flood, N., 2013. Raster I/O SimplificationPython Library.URL https://bitbucket.org/chchrsc/rios/overview

Pete Bunting and Daniel Clewley The Remote Sensing and GIS Software Library