-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings_template.py
61 lines (47 loc) · 2.32 KB
/
settings_template.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
# settings_template.py
# The settings template file for the PSU CSAR AWDB Retrive tool.
# Please add all required values and edit any necessary defaults
# and save this file as settings.py.
# the dir containing this file
import os
repo = os.path.abspath(os.path.dirname(__file__))
## ArcGIS Server Settings
SERVER_ADDRESS = # hostname of server
SERVER_PORT = # port to connect to ArcGIS server
SERVER_USER = # ArcGIS admin account user name
SERVER_PASS = # ArcGIS admin account password
## Output Directories
ARCHIVE_WORKSPACE = r"C:\inetpub\ftproot\AWDB\Stations" # zip each shapefile here for FTP access
TEMP_WORKSPACE = os.path.join(repo, "temp") # location for intermediate files
LOG_DIR = os.path.join(repo, "log") # location for log files
MAP_DIR = os.path.join(repo, "maps") # location for map mxds
AWDB_FGDB_PATH = os.path.join(repo, "awdb-stations.gdb") # location for awdb geodatabase storing feature classes
## SDE target database -- for WFSs
SDE_WORKSPACE = os.path.join(repo, "awdb.sde") # ownership SDE database connection
SDE_READONLY = os.path.join(repo, "awdb_readonly.sde") # readonly SDE database connection
SDE_DATABASE = "awdbprod"
SDE_USERNAME = "awdb"
FDS_SDE_PREFIX = SDE_DATABASE + "." + SDE_USERNAME + "." # do not edit
# name of output feature dataset
FDS_NAME = "AWDB" # set to None to write to DB root, not dataset
## Source Web Service URLs
# url of the NRCS AWDB SOAP WDSL (defines the web API connection)
WDSL_URL = "https://wcc.sc.egov.usda.gov/awdbWebService/services?WSDL"
# url of the USGS site information REST service
USGS_URL = "https://waterservices.usgs.gov/nwis/site/"
# number of worker processes to get station records (max number of processes)
WORKER_PROCESSES = 10
# maximum number of records per metadata request
# (larger is faster but more likely to timeout)
MAX_REQUEST = 250
# number of attempts to retry getting station
RETRY_COUNT = 2
## ArcGIS Online Settings
AGO_PORTAL = "http://www.arcgis.com"
AGO_USER = # ArcGIS Online user name
AGO_PASSWORD = # ArcGIS Online password
## Path to ArcGIS Pro project that contains the maps
PRO_PROJECT_PATH = os.path.join(repo,r"projects\awdb\awdb.aprx")
## Suffixes for feature services
AGO_SUFFIX_ACTIVE = "ACTIVE"
AGO_ACTIVE_FCST_URL = f"https://services.arcgis.com/SXbDpmb7xQkk44JV/arcgis/rest/services/stations_FCST_{AGO_SUFFIX_ACTIVE}/FeatureServer/0"