0% found this document useful (0 votes)
116 views24 pages

Advanced Analysis of Satellite Imagery Using Python: Hong Xu, Kaixi Zhang

This workshop will focus on using Python and ArcPy to analyze satellite imagery in ArcGIS. It will cover managing imagery data with mosaic datasets and multidimensional rasters, performing image analysis tasks like classification and change detection using raster functions, and analyzing time series imagery through examples analyzing Landsat data to identify annual maximum NDVI trends and detect land cover changes using linear spectral unmixing. The examples will demonstrate constructing raster collections, filtering, mapping analysis functions to each raster, and reducing the results.

Uploaded by

Prabha Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views24 pages

Advanced Analysis of Satellite Imagery Using Python: Hong Xu, Kaixi Zhang

This workshop will focus on using Python and ArcPy to analyze satellite imagery in ArcGIS. It will cover managing imagery data with mosaic datasets and multidimensional rasters, performing image analysis tasks like classification and change detection using raster functions, and analyzing time series imagery through examples analyzing Landsat data to identify annual maximum NDVI trends and detect land cover changes using linear spectral unmixing. The examples will demonstrate constructing raster collections, filtering, mapping analysis functions to each raster, and reducing the results.

Uploaded by

Prabha Mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Advanced Analysis of Satellite Imagery

Using Python
Hong Xu, Kaixi Zhang
Workshop Outline

• ArcGIS is a platform for imagery


• ArcGIS has rich image analysis APIs
- This workshop will focus on Python, specifically ArcPy in Pro 2.5 release
• Use cases
- Annual Max NDVI Trend Analysis using time series Landsat images
- Analyze land cover changes using linear spectral unmixing
ArcGIS Provides a Comprehensive Platform for Imagery and Remote Sensing
Analysis
Visualization & Indexes

Exploration Change Analysis


Management Image Space
and Mensuration
& Dissemination

Classification
Image
Analyst
Raster
Oriented Imagery Processing
AI / Deep Learning Functions
Full-Motion Video
Charting
Image Server
Map Production
Street Views Ortho Mapping
Spectral Profile
Drone Mapping
Content Stereo
Temporal
Profile

Small Sats
High-Resolution Satellites Seamless
Orthophotos
Drone2Map
DTM Ortho Maker
Generation
Aerial Photos All Major Sensors
Integrated and Massively Scalable
Drones
Data Management
Making Imagery Accessible – Image Management and Dissemination

• Mosaic datasets - optimal data model for managing imagery and rasters
• 20+ satellite data: Landsat, MODIS, Sentinel, etc.
• Reference imagery and maintain metadata
• Define processing to be applied
• Scalable and flexible

• Multidimensional raster
• Supports multidimensional raster analysis

• Image server
• Dynamic Mosaicking
• On-the-fly processing
• Persist large datasets as required
• Scalable
• Server as Image Services, WMS, WCS, KML
Image Analysis
Extracting Information from Imagery

Classification, deep learning, machine learning, prediction,


multidimensional raster analysis

• Image Analyst tools and ArcGIS Pro UX

-Complete image classification


workflow

-Interface with deep learning


toolkits to create training data

-Inferencing to identify, label, or


classify imagery

• Raster functions - fast on-the-fly and persisted image processing


• Raster analytics - scale up and distribute analysis for large datasets
ArcGIS Python Environment for Image Processing and Analysis

• Python packages
- ArcPy
- ArcPy.ia (Image Analyst)
- ArcGIS API for Python

• Code snippets and demos use


- ArcPy in Pro 2.5
- ArcGIS Notebooks
Processing One Image Raster Function

• Raster
NDVI

band
...

band
Process a Collection of Images

• Landsat time series imagery


- 16-day cycle, 40 years
- 30m/10m
- Blue, Green, Red, NIR, SWIR-1, SWRI-2, TIR, Pan

• To discover
- What is the water occurrence rate in past 10 years?
- Did deforestation happen in this area?
- What are the land cover changes?
- What are the pattern and trend?
- Etc.
Workflow of Processing a Collection of Images Using Python

Raster Filter Map Reduce


Collection
Use Case 1 : Annual Max NDVI Trend Analysis using time series Landsat
images

• Input: a folder contains 173 Landsat scenes


• Output: a time series Annual Maximum NDVI and a trend raster
Raster Collection Raster
Collection Filter Map Reduce

RasterCollection (rasters, {attribute_dict})

RasterCollection

item Raster

Attribute_1
...

...

Attribute_N
item
Raster Collection Raster
Collection Filter Map Reduce

• Created from
- List of rasters

- mosaic dataset , Image service, multidimensional raster

https://pro.arcgis.com/en/pro-app/help/data/imagery/mosaic-datasets.htm
https://pro.arcgis.com/en/pro-app/help/data/imagery/an-overview-of-multidimensional-raster-data.htm
Filter Raster
Collection Filter Map Reduce

• Filter items by
- Spatial extent
- Time extent
- Geometry
- Where clause and attributes
- Raster properties
Map Raster
Collection Filter Map Reduce

• Map a function for each item in the RasterCollection


- N -> N
• RasterCollection.map(func)
N -> N
def MyFunc(item):
in_raster = item[‘Raster’]
processed_raster = process_function(in_raster…)
return {‘raster’:processed_raster, …}

processed_rc = rc.map(MyFunc)
Map Raster
Collection Filter Map Reduce

• Support many built-in functions


Band index functions
BandArithmatic, Cig, Cire,ClayMinerals, EVI, FerroursMinerals, GEMI, GNDVI, GVITM, IronOxide, MSAVI, MTVI2, NDVI,
NDVIre, NDWI, PVI, RTVICore, SAVI, SRre, Sultan, TSAVI, VARI

Classification
Random Tree, Support Vector Machine, Maximum Likelihood, ISO Cluster, Linear Spectral Unmixing.

Pixel stretch functions


Stretch, convolution, Pansharpen, and etc.

Analysis functions
TasseledCap, Threshold, HeatIndex, WindChill, Apply and etc.
arcpy.ia.Apply (in_raster, raster_function, {raster_function_arguments})

- more…
• Custom functions
Reduce Raster
Collection Filter Map Reduce

• Reduce by computing pixel values from items


- N->1
• Supported methods
- Min, Max, Mean, Sum, Median, Majority
- Mosaic (Frist, Last)

N -> 1
Multidimensional Analysis Raster
Collection Filter Map Reduce

• Convert to a multidimensional raster Multi-


dimensional
- RasterCollection::ToMultidimensionalRaster Analysis

• Perform analysis using functions N -> M N -> 1


- Aggregate
- Anomaly
- Trend
- Multidimensional algebra
- …
Annual Max NDVI
Trend Analysis using
time series Landsat
images
Kaixi
Analyze land cover
changes using linear
spectral unmixing
Kaixi
Use Case 2: Analyze Land Cover Change Using Linear Unmixing

• Input: a mosaic dataset contains 1087 Images


• Processing: linear unmixing function
• Output: time series fraction + statistics output
Mosaicking a Collection of Images

• RasterCollection.mosaic (mosaic_method)
- rc.mosaic(‘LAST’)
- rc.mosaic(‘FIRST’)

• Code snippet: mosaic RGB band of most recent images


Processing Settings

• Output formats
- CRF (.crf) : output one item or multiple items as a multidimensional raster
- TIFF (.tif) : Output single item

• Output compression
arcpy.env.compression = "LERC 0.01" # for controlled accuracy
arcpy.env.compression = "LERC 0" # lossless
arcpy.env.compression = " LZ77 75" # lossless
arcpy.env.compression = " JPEG 75" # lossy
• Parallel processing factor
- arcpy.env.parallelprocessingfactor = "6"
- arcpy.env.parallelprocessingfactor = "90%"
Help References

• https://pro.arcgis.com/en/pro-app/arcpy/image-analyst/rastercollection-class.htm
• https://pro.arcgis.com/en/pro-app/arcpy/image-analyst/an-overview-of-the-image-
analyst-functions.htm

• Same capabilities and APIs for ArcGIS for Python will be available in ArcGIS 10.8.1
Understanding Urban Expansion Using Nightlight Imagery

• Yearly nightlight images (1992-


2013)
• Trend function
• Render as RGB

You might also like