-
Notifications
You must be signed in to change notification settings - Fork 4
/
MainModule.py
35 lines (28 loc) · 1.28 KB
/
MainModule.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
__version__ = "1.4"
'''
__author__ = "Simon Geigenberger, Lukas Bug"
__copyright__ = "Copyright 2018, Esri Deutschland GmbH"
__license__ = "Apache-2.0"
__version__ = "1.4"
__email__ = "[email protected], [email protected]"
This module is used to set up the configuration data and call the functions in the OSMHelper and AGOLHelper modules.
'''
import OSMConfigHelper
import AGOLConfigHelper
import OSMHelper
import AGOLHelper
import datetime
print(datetime.datetime.now())
# The AGOL configuration is read in and validated.
agolConfig = AGOLConfigHelper.readConfig()
print('ArcGIS Online / Portal configuration read in.')
# The OSM configuration is read in and validated.
osmConfig = OSMConfigHelper.readConfig(agolConfig)
print('OpenStreetMap configuration read in.')
# The OSM data of the requested categories and geometries is loaded as point data with the requested attributes if available. The data is returned as a data frame.
OSMDataFrameList = OSMHelper.getDataFrameList(osmConfig)
print('OpenStreetMap data loaded.')
# The data of the data frame with the OSM data is uploaded as a Feature Collection to the ArcGIS Online or Portal account.
AGOLHelper.uploadToPortal(agolConfig, osmConfig, OSMDataFrameList)
print('Upload to ArcGIS Online / Portal finished.')
print(datetime.datetime.now())