Skip to content

Commit

Permalink
Rename the S-1 mosaic to S-1 GeoMAD
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgleith committed Jan 23, 2025
1 parent afb2779 commit fb5f107
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 78 deletions.
6 changes: 3 additions & 3 deletions create_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
from dep_collections.dep_ls_geomad import dep_ls_geomad
from dep_collections.dep_ls_wofs_summary_annual import dep_ls_wofs_summary_annual
from dep_collections.dep_ls_wofl import dep_ls_wofl
from dep_collections.dep_s1_mosaic import dep_s1_mosaic
from dep_collections.dep_s1_geomad import dep_s1_geomad
from dep_collections.dep_s2_geomad import dep_s2_geomad
from dep_collections.dep_s2_mangroves import dep_s2_mangroves
from dep_collections.dep_s2s1_mrd import dep_s2s1_mrd

STAGING_URL = "https://stac.staging.digitalearthpacific.org"
STAGING_URL = "https://stac.staging.digitalearthpacific.io"
OUT_FOLDER = "collections"

out_dir = Path(OUT_FOLDER)
Expand All @@ -20,9 +20,9 @@
dep_ls_wofs_summary_annual,
dep_ls_wofl,
dep_ls_geomad,
dep_s1_geomad,
dep_s2_geomad,
dep_s2_mangroves,
dep_s1_mosaic,
dep_s2s1_mrd,
)

Expand Down
95 changes: 95 additions & 0 deletions dep_collections/dep_s1_geomad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
from datetime import datetime, timezone

from pystac import (
Collection,
Extent,
Provider,
SpatialExtent,
Summaries,
TemporalExtent,
)

dep_s1_geomad_extent = Extent(
SpatialExtent([[-180, -90, 180, 90]]),
TemporalExtent([[datetime(1980, 1, 1, 0, 0, 0, 0, timezone.utc), None]]),
)

S1_BANDS = [
"B02",
"B03",
"B04",
"B05",
"B06",
"B07",
"B08",
"B8A",
"B11",
"B12",
]
MAD_BANDS = [("emad", "Euclidean"), ("smad", "Spectral"), ("bcmad", "Bray-Curtis")]


# Create a Collection
dep_s1_geomad = Collection(
id="dep_s1_geomad",
description="Sentinel-1 mean and median annual geomad.",
title="Sentinel-1 Annual geomad",
extent=dep_s1_geomad_extent,
license="CC-BY-4.0",
keywords=["Sentinel-1", "Pacific"],
providers=[
Provider(
name="Digital Earth Pacific",
roles=["processor", "host"],
url="https://digitalearthpacific.org",
),
Provider(
name="Microsoft",
roles=["host"],
url="https://microsoft.com",
),
Provider(
name="ESA",
roles=["producer", "licensor"],
url="https://sentinel.esa.int/web/sentinel/missions/sentinel-2",
)
],
summaries=Summaries(
{
"gsd": [10],
"eo:bands": [
dict(
name=band,
common_name=band,
description=f"Median for {band} band",
min=0,
max=1,
nodata=0,
)
for band in S1_BANDS
]
+ [
dict(
name=band[0],
common_name=f"{band[1]} MAD",
description=f"{band[1]} median absolute deviations across all bands",
min=0,
max=1,
nodata=0,
)
for band in MAD_BANDS
]
+ [
dict(
name="count",
common_name="Count clear",
description="Count of clear observations",
min=0,
max=250,
nodata=0,
)
],
"platform": ["Sentinel-1A", "Sentinel-1B"],
},
),
)
74 changes: 0 additions & 74 deletions dep_collections/dep_s1_mosaic.py

This file was deleted.

2 changes: 1 addition & 1 deletion dep_collections/dep_s2_geomad.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"B11",
"B12",
]
MAD_BANDS = [("emad", "Euclidean"), ("smad", "Spectral"), ("bcmad", "Bray-curtis")]
MAD_BANDS = [("emad", "Euclidean"), ("smad", "Spectral"), ("bcmad", "Bray-Curtis")]

# Create a Collection
dep_s2_geomad = Collection(
Expand Down

0 comments on commit fb5f107

Please sign in to comment.