Skip to content

Commit

Permalink
Update in scripts for Land subsidence prediction
Browse files Browse the repository at this point in the history
Update in scripts for Land subsidence prediction
  • Loading branch information
Mares2022 committed Oct 29, 2024
1 parent 576a01a commit 5bd3f4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,9 @@ dmypy.json
# Dask
*dask-worker-space*
.vscode/settings.json
STAC/data/current/SPMN/collection.json
STAC/data/current/SPMN/items/Mild/2050.json
STAC/data/current/SPMN/items/mild/2050.json
STAC/data/current/SPMN/items/Mild/2100.json
STAC/data/current/SPMN/items/sterk/2050.json
STAC/data/current/SPMN/items/sterk/2100.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# hard-coded STAC templates
#TODO:Modify cur_cwd to adapt to your computer.
CUR_CWD = pathlib.Path.cwd()
STAC_DIR = CUR_CWD / "STAC/data/current"
STAC_DIR = CUR_CWD / "global-coastal-atlas/STAC/data/current"
# STAC_DIR = r"D:\Projects\STAC\Repositories\global-coastal-atlas\STAC\data\current"

# hard-coded input params which differ per dataset
Expand Down Expand Up @@ -117,6 +117,7 @@
def create_collection(
description: str | None = None, extra_fields: dict[str, Any] | None = None
) -> pystac.Collection:

providers = [
pystac.Provider(
name="Deltares",
Expand All @@ -135,7 +136,7 @@ def create_collection(
),
]

start_datetime = datetime.datetime(2024, 1, 18, tzinfo=datetime.timezone.utc)
start_datetime = datetime.datetime(2024, 7, 16, tzinfo=datetime.timezone.utc)

extent = pystac.Extent(
pystac.SpatialExtent([[0, 299900, 280000, 624900]]),
Expand Down Expand Up @@ -224,7 +225,7 @@ def create_collection(

# %%
def create_item(block, item_id, antimeridian_strategy=antimeridian.Strategy.SPLIT):
dst_crs = rasterio.crs.CRS.from_epsg(4326)
dst_crs = rasterio.crs.CRS.from_epsg(28992)

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

0 comments on commit 5bd3f4b

Please sign in to comment.