63
63
64
64
# hard-coded STAC templates
65
65
CUR_CWD = pathlib .Path .cwd ()
66
- STAC_DIR = CUR_CWD .parent / "current"
66
+ STAC_DIR = CUR_CWD / "STAC/data/current"
67
+ # STAC_DIR = r"D:\Projects\STAC\Repositories\global-coastal-atlas\STAC\data\current"
67
68
68
69
# hard-coded input params which differ per dataset
69
70
METADATA = "metadata_subsidence.json"
@@ -136,7 +137,7 @@ def create_collection(
136
137
start_datetime = datetime .datetime (2024 , 1 , 18 , tzinfo = datetime .timezone .utc )
137
138
138
139
extent = pystac .Extent (
139
- pystac .SpatialExtent ([[- 180 , - 89.9999999999 , 180 , 90.0000000001 ]]),
140
+ pystac .SpatialExtent ([[0 , 299900 , 280000 , 624900 ]]),
140
141
pystac .TemporalExtent ([[start_datetime , None ]]),
141
142
)
142
143
@@ -150,12 +151,8 @@ def create_collection(
150
151
]
151
152
152
153
keywords = [
153
- "Coast" ,
154
- "Population" ,
155
154
"Projection" ,
156
- "Shared Socioeconomic Pathways" ,
157
155
"Europe" ,
158
- "European" "CoCliCo" ,
159
156
"Deltares" ,
160
157
"Cloud Optimized GeoTIFF" ,
161
158
]
@@ -168,7 +165,7 @@ def create_collection(
168
165
169
166
collection = pystac .Collection (
170
167
id = COLLECTION_ID ,
171
- title = "Population Projections " ,
168
+ title = "Subsidence Prediction Maps of the Netherlands " ,
172
169
description = description , # noqa: E502
173
170
license = metadata ["LICENSE" ],
174
171
providers = providers ,
@@ -426,9 +423,8 @@ def get_paths(folder_structure, base_dir=""):
426
423
# NOTE: make sure the resulting path_list (based on folder structure) matches the tif_list
427
424
# NOTE: shortcut taken by calling every year twice, because there are two tif's per year.
428
425
folder_structure = {
429
- "SSP1" : ["2010" , "2030" , "2050" , "2100" , "2150" ],
430
- "SSP2" : ["2010" , "2030" , "2050" , "2100" , "2150" ],
431
- "SSP5" : ["2010" , "2030" , "2050" , "2100" , "2150" ],
426
+ "mild" : [],
427
+ "sterk" : [],
432
428
}
433
429
434
430
# Get list of paths for the folder structure
@@ -443,9 +439,11 @@ def get_paths(folder_structure, base_dir=""):
443
439
# Update current data being processed
444
440
print ("now working on: " + cur_path )
445
441
# Define tif_list for the cog's created using ../notebooks/26_pp.ipynb
446
- tif_list = pathlib .Path .joinpath (cog_dirs , cur_path ).glob ("*.tif" )
442
+ tif_list = pathlib .Path .joinpath (cog_dirs , cur_path )
443
+ tif_list = tif_list .glob ("*.tif" )
447
444
448
445
for cur_tif in tif_list :
446
+ print (cur_tif )
449
447
450
448
# Open original dataset
451
449
pp = xr .open_dataset (cur_tif , engine = "rasterio" , mask_and_scale = False )
0 commit comments