-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeojson_TUM.py
67 lines (62 loc) · 1.34 KB
/
geojson_TUM.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
geo_json_geometry = {
"type": "Polygon",
"coordinates": [
[
[
-119.37053547704365,
37.87865845989373
],
[
-119.37053547704365,
37.872332969855776
],
[
-119.35644994030575,
37.872332969855776
],
[
-119.35644994030575,
37.87865845989373
],
[
-119.37053547704365,
37.87865845989373
]
]
]
}
# filter for items the overlap with our chosen geometry
geometry_filter = {
"type": "GeometryFilter",
"field_name": "geometry",
"config": geo_json_geometry
}
# filter images acquired in a certain date range
date_range_filter = {
"type": "DateRangeFilter",
"field_name": "acquired",
"config": {
"gte": "2019-01-01T00:00:00.000Z",
"lte": "2019-08-01T00:00:00.000Z"
}
}
# filter any images which are more than 50% clouds
cloud_cover_filter = {
"type": "RangeFilter",
"field_name": "cloud_cover",
"config": {
"lte": 0.05
}
}
# create a filter that combines our geo and date filters
# could also use an "OrFilter"
#domain = {
# "type": "AndFilter",
# "config": [geometry_filter, date_range_filter]
#}
# create a filter that combines our geo and date filters
# could also use an "OrFilter"
domain = {
"type": "AndFilter",
"config": [geometry_filter, date_range_filter, cloud_cover_filter]
}