Skip to content

Commit 5bd3f4b

Browse files
committed
Update in scripts for Land subsidence prediction
Update in scripts for Land subsidence prediction
1 parent 576a01a commit 5bd3f4b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,9 @@ dmypy.json
152152
# Dask
153153
*dask-worker-space*
154154
.vscode/settings.json
155+
STAC/data/current/SPMN/collection.json
156+
STAC/data/current/SPMN/items/Mild/2050.json
157+
STAC/data/current/SPMN/items/mild/2050.json
158+
STAC/data/current/SPMN/items/Mild/2100.json
159+
STAC/data/current/SPMN/items/sterk/2050.json
160+
STAC/data/current/SPMN/items/sterk/2100.json

STAC/data/scripts/10_Land_subsidence_prediction_maps_updated_stacs.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
# hard-coded STAC templates
6565
#TODO:Modify cur_cwd to adapt to your computer.
6666
CUR_CWD = pathlib.Path.cwd()
67-
STAC_DIR = CUR_CWD / "STAC/data/current"
67+
STAC_DIR = CUR_CWD / "global-coastal-atlas/STAC/data/current"
6868
# STAC_DIR = r"D:\Projects\STAC\Repositories\global-coastal-atlas\STAC\data\current"
6969

7070
# hard-coded input params which differ per dataset
@@ -117,6 +117,7 @@
117117
def create_collection(
118118
description: str | None = None, extra_fields: dict[str, Any] | None = None
119119
) -> pystac.Collection:
120+
120121
providers = [
121122
pystac.Provider(
122123
name="Deltares",
@@ -135,7 +136,7 @@ def create_collection(
135136
),
136137
]
137138

138-
start_datetime = datetime.datetime(2024, 1, 18, tzinfo=datetime.timezone.utc)
139+
start_datetime = datetime.datetime(2024, 7, 16, tzinfo=datetime.timezone.utc)
139140

140141
extent = pystac.Extent(
141142
pystac.SpatialExtent([[0, 299900, 280000, 624900]]),
@@ -224,7 +225,7 @@ def create_collection(
224225

225226
# %%
226227
def create_item(block, item_id, antimeridian_strategy=antimeridian.Strategy.SPLIT):
227-
dst_crs = rasterio.crs.CRS.from_epsg(4326)
228+
dst_crs = rasterio.crs.CRS.from_epsg(28992)
228229

229230
# when the data spans a range, it's common practice to use the middle time as the datetime provided
230231
# in the STAC item. So then you have to infer the start_datetime, end_datetime and get the middle

0 commit comments

Comments
 (0)