-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
33 lines (25 loc) · 762 Bytes
/
run.py
File metadata and controls
33 lines (25 loc) · 762 Bytes
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
import functions
def to_shp():
"""
Convert data within a .gz archive into gml and shapefiles.
"""
data_dir_input = ['']
data_dir_output = ''
functions.extract_archive(data_dir_input, data_dir_output)
def to_database():
"""
Convert data via geopandas and write to a postgres-postgis database, either as a single table or as a table per file. Input formats should be compatable with geopandas.
"""
database = ''
schema_name = ''
table_name = ''
username = ''
password = ''
host = ''
port = ''
format = ''
data_dir = ''
merge = True
functions.write_to_database(merge, data_dir, database, schema_name, table_name, username, password, host, port, format)
to_shp()
#to_database()