-
Notifications
You must be signed in to change notification settings - Fork 265
/
sentinel-1_filtering.py
28 lines (22 loc) · 1.1 KB
/
sentinel-1_filtering.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import ee
from ee_plugin import Map
# Load the Sentinel-1 ImageCollection.
sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD') \
.filterBounds(ee.Geometry.Point(-122.37383, 37.6193))
# Filter by metadata properties.
vh = sentinel1 \
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV')) \
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH')) \
.filter(ee.Filter.eq('instrumentMode', 'IW'))
# Filter to get images from different look angles.
vhAscending = vh.filter(ee.Filter.eq('orbitProperties_pass', 'ASCENDING'))
vhDescending = vh.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'))
# Create a composite from means at different polarizations and look angles.
composite = ee.Image.cat([
vhAscending.select('VH').mean(),
ee.ImageCollection(vhAscending.select('VV').merge(vhDescending.select('VV'))).mean(),
vhDescending.select('VH').mean()
]).focal_median()
# Display as a composite of polarization and backscattering characteristics.
Map.setCenter(-122.37383, 37.6193, 10)
Map.addLayer(composite, {'min': [-25, -20, -25], 'max': [0, 10, 0]}, 'composite')