John Roberts, Dr Yaqing Gou - Copernicus · 3 commands for a change map $ extract_signatures...
Transcript of John Roberts, Dr Yaqing Gou - Copernicus · 3 commands for a change map $ extract_signatures...
C L C R
PYEOJohn Roberts, Dr Yaqing Gou
Change Detection map
Change Detection map
Change Detection map
3 commands for a change map
$ extract_signatures indonesia.tif indonesia_training.shp indonesia_sigs.csv
$ create_model_from_signatures indonesia_sigs.csv indonesia_basic.pkl
$ simple_classification indonesia.tif indonesia_basic.pkl indonesia_classes.tif
...and some other work
• Images needed to be found
• Images had to be downloaded
• Images had to be preprocessed
• Images had to be stacked for change detection
• Training data had to be defined and collected
• Map had to be made nice in QGIS
...and some other work
• Images needed to be found
• Images had to be downloaded
• Images had to be preprocessed
• Images had to be stacked for change detection
• Training data had to be defined and collected
• Map had to be made nice in QGIS Involves value judgements; needs humans
Does not need humans!
PYthon for Earth Observation (PYEO)• A set of building blocks for making
automatic GIS processing chains• Download to classification
• Goal: GIS without HPC• Many GIS profressionals are NOT
programmers
•3 ways of using• Pre-made processing chains
• Single step scripts
• As a Python library
Technical bits• Hosted on Github
• github.com/clcr/pyeo• Managed using Conda
• Built on the following core Python packages
• Numpy
• Scipy
• Scikit-learn
• GDAL
• Joblib
• And two Sentinel libraries
• sentinelhub
• sentinelsat
Pyeo structure• pyeo/
• Contains the core libraries
• apps/
• Processing chains and example scripts
• Built out of functions in pyeo/
• tests
• Test suite
• Contains examples of using individual functions
• docs
• Documentation for functions
Main libraries
raster_manipulation.py
• Creating rasters
• Stacking/clipping/managing rasters
• Creating base composites
• Preprocessing
• Cloud masking (fmask and sen2cor)
queries_and_downloads.py
• Querying data sources
• Filtering queries
• Downloading data
classification.py
• Extracting training data
• Creating models
• Applying pixel-wise models to rasters
– (segmentation to come)
filesystem_utilities.py
• Creating folders
• Logging
• Managing .SAFE files
• Querying metadata
Prototype libraries
validation.py
• Stratified sampling
• P-value calculation
• Implementation of Olafson etal
terrain_correction.py
• Applying
• Filtering queries
• Downloading data
your_library.py
Bring your work to the world?
Example complex data flow
Example application: Forest Sentinel
Satellite optical and radar
data acquisition
Forest Agency / Community field
based response to illegal logging
and deforestation
Cloud based data analysis and
forest cover change mapping
Web-based & smartphone
app deforestation alerts
and forest information
Sentinel-2 NRT change proc-chain
Auto data filtering/
downloadlatest
imagery
Preprocessing, sen2cor/ 6S
BOA correction
Scene classification,
Cloud masking
Repository of scene training
data
Sentinel 2 data
hub
Cloud free base image
Most recentS2
acquisition
Change detection
(RF)
Imagestack
Repository of change
training data
Thematic map of land
cover change (1)
Probability map of forest cover change
(2) Kmz alert file &Json
database (3)
Data download & atmospheric processing Data preparation for deforestation detectionDeforestation detection & output production
1 2
3
DEFORESTATION ALERT APP
DEFORESTATION ALERT APP
Future
Future
Thankyou for listening
Any questions?