Skip to content

Commit

Permalink
Fixed ExtractionCollection naming in catalogue_builder #118
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentVerelst committed Nov 6, 2024
1 parent 19f728b commit 5a83d79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/stac/catalogue_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _parse_item(path: Path, collection: ExtractionCollection) -> pystac.Item:
builder_log.error("Failed to parse the sample_id from %s.", path)
return None

if collection == ExtractionCollection.SENTINEL1:
if collection == ExtractionCollection.PATCH_SENTINEL1:
sample_id = match.group(2)
else:
sample_id = match.group(1)
Expand All @@ -100,7 +100,7 @@ def _parse_item(path: Path, collection: ExtractionCollection) -> pystac.Item:
CRS.from_epsg(epsg), CRS.from_epsg(4326), always_xy=True
)

if collection == ExtractionCollection.SENTINEL1:
if collection == ExtractionCollection.PATCH_SENTINEL1:
if "orbit_state" not in attributes:
# Attempting to parse the orbit state from the path
file_name = Path(path).name
Expand Down Expand Up @@ -138,7 +138,7 @@ def _parse_item(path: Path, collection: ExtractionCollection) -> pystac.Item:

item.extra_fields["epsg"] = epsg

if collection == ExtractionCollection.SENTINEL1:
if collection == ExtractionCollection.PATCH_SENTINEL1:
item.properties["orbit_state"] = orbit_state

constellation_name = CONSTELLATION_NAMES[collection]
Expand Down

0 comments on commit 5a83d79

Please sign in to comment.