Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dynamic Exposure
Global Dynamic Exposure
exposure-coquimbo
Commits
0200a4e7
Commit
0200a4e7
authored
Dec 07, 2021
by
Danijel Schorlemmer
Browse files
Quick fix for the Padang case
parent
17f85f7f
Pipeline
#35802
failed with stage
in 1 minute and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
exposurecoquimbo/saradata.py
View file @
0200a4e7
...
...
@@ -9,8 +9,11 @@ from pygeotile.tile import Tile
import
numpy
COQUIMBO_LONGITUDE
=
[
-
71.5
,
-
71.0
]
COQUIMBO_LATITUDE
=
[
-
30.25
,
-
29.25
]
COQUIMBO_LONGITUDE
=
[
90
,
110
]
COQUIMBO_LATITUDE
=
[
-
10
,
10
]
# COQUIMBO_LONGITUDE = [-71.5, -71.0]
# COQUIMBO_LATITUDE = [-30.25, -29.25]
def
start_sara_database
(
database_filepath
):
...
...
@@ -361,15 +364,24 @@ def output_exposure(conn, exposure_filepath):
def
main
():
conn
=
create_sara_database
(
'../
skr/testdb
.sqlite'
)
conn
=
create_sara_database
(
'../
data/padang/exposure-gem
.sqlite'
)
# conn = start_sara_database('../skr/testdb.sqlite')
read_sara_exposure_into_database
(
conn
,
'../data/Exposure_Res_
Chile
.csv'
,
'Res'
)
read_sara_exposure_into_database
(
conn
,
'../data/
padang/
Exposure_Res_
Indonesia
.csv'
,
'Res'
)
add_voronoi_cells
(
conn
)
add_buildings
(
conn
,
'../data/
obm
.building.gpkg'
)
add_buildings
(
conn
,
'../data/
padang/padang
.building
s
.gpkg'
)
classify_buildings
(
conn
)
output_tiles
(
conn
,
'../skr/tiles.csv'
)
output_building_polygons
(
conn
,
'../skr/polygons.csv'
)
output_exposure
(
conn
,
'../skr/exposure.csv'
)
output_tiles
(
conn
,
'../data/padang/tiles.csv'
)
output_building_polygons
(
conn
,
'../data/padang/polygons.csv'
)
output_exposure
(
conn
,
'../data/padang/exposure-gem.csv'
)
# conn = create_sara_database('../skr/testdb.sqlite')
# # conn = start_sara_database('../skr/testdb.sqlite')
# read_sara_exposure_into_database(conn, '../data/Exposure_Res_Chile.csv', 'Res')
# add_voronoi_cells(conn)
# add_buildings(conn, '../data/obm.building.gpkg')
# classify_buildings(conn)
# output_tiles(conn, '../skr/tiles.csv')
# output_building_polygons(conn, '../skr/polygons.csv')
# output_exposure(conn, '../skr/exposure.csv')
main
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment