-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuglab_demo.py
62 lines (49 loc) · 2.1 KB
/
uglab_demo.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
from ChainJobs.CoastLineJob import CoastLineJob
from ChainJobs.CorineJob import CorineJob
from ChainJobs.DemJob import DemJob
from ChainJobs.GeoStatsJob import GeoStatsJob
from ChainJobs.MlDataTranslateJob import MlDataTranslateJob
from ChainJobs.ModelJob import ModelJob
from ChainJobs.OsmJob import OsmJob
from ChainJobs.RasterProducerJob import RasterProducerJob
from Config.Constants import Constants
# this is where all produced data will be placed
PROJECT_PATH = '_uglab_demo_project/'
# this is mandatory to start. It is the MBR of your study area. Munich MBR is for demo.
PROJECT_SHAPE_MBR = PROJECT_PATH + 'MUNICH_MBR.shp'
# this is the DEM containing the study area.
# Depending on your area choose and download DEM from --> https://land.copernicus.eu/imagery-in-situ/eu-dem/eu-dem-v1.1
INPUT_DEM_FILE = Constants.SOURCE_DATA_PATH + 'eu_dem_v11_E40N20.TIF'
def run_demo():
print('start corine job')
CorineJob(PROJECT_PATH, PROJECT_SHAPE_MBR).execute()
print('finish corine job')
print('start DEM job'+PROJECT_PATH)
DemJob(
INPUT_DEM_FILE,
PROJECT_SHAPE_MBR,
PROJECT_PATH
).execute()
print('finish DEM job')
print('start geostats job')
GeoStatsJob(PROJECT_PATH, PROJECT_SHAPE_MBR).execute()
print('\n finish geostats job')
print('start osm job' )
OsmJob(PROJECT_PATH, PROJECT_SHAPE_MBR).execute()
print('\n finish osm job')
print('start coastline job')
CoastLineJob(PROJECT_PATH, PROJECT_SHAPE_MBR).execute()
print('\n finish coastline job')
print('start MlDataTranslateJob job')
MlDataTranslateJob(PROJECT_PATH).execute()
print('\n finish MlDataTranslateJob job')
print('start running sequential model job')
ModelJob(PROJECT_PATH, 'seq', 200, 1500).execute()
print('\n finish running sequential model job')
print('start running random forest model job')
ModelJob(PROJECT_PATH, 'rf').execute()
print('\n finish running random forest model job')
print('start running geotif producer job')
RasterProducerJob(PROJECT_PATH).execute()
print('\n finish running geotif producer job')
run_demo()