-
Notifications
You must be signed in to change notification settings - Fork 8
/
export.py
59 lines (42 loc) · 1.25 KB
/
export.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
import sys
from pathlib import Path
from datetime import date
sys.path.append("..")
from src.exporters import (
GeoWikiExporter,
GeoWikiSentinelExporter,
RegionalExporter,
TogoSentinelExporter,
GDriveExporter,
cancel_all_tasks,
)
def export_geowiki():
exporter = GeoWikiExporter(Path("../data"))
exporter.export()
def export_geowiki_sentinel_ee():
exporter = GeoWikiSentinelExporter(Path("../data"))
exporter.export_for_labels(num_labelled_points=None, monitor=False, checkpoint=True)
def export_togo():
exporter = TogoSentinelExporter(Path("../data"))
exporter.export_for_labels(
num_labelled_points=None, monitor=False, checkpoint=True, evaluation_set=True
)
def export_region():
exporter = RegionalExporter(Path("../data"))
exporter.export_for_region(
region_name="Togo",
end_date=date(2020, 4, 20),
monitor=False,
checkpoint=True,
metres_per_polygon=None,
)
def export_gdrive():
exporter = GDriveExporter(Path("../data"))
exporter.export(region_name="Togo", max_downloads=1)
def cancel_tasks():
cancel_all_tasks()
if __name__ == "__main__":
export_geowiki_sentinel_ee()
export_togo()
export_region()
# cancel_all_tasks()