Skip to content

Commit

Permalink
test: update for dem/dsm description wording (#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
amfage authored Feb 27, 2024
1 parent 37f0ac0 commit 3194b6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions scripts/stac/imagery/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def _description(self) -> str:
Urban Aerial Photos / Rural Aerial Photos:
Orthophotography within the [Region] region captured in the [Year(s)] flying season.
DEM / DSM:
[Digital Surface Model / Digital Elevation Model] within the [Region] region in [year(s)].
[Digital Surface Model / Digital Elevation Model] within the [Region] region captured in [year(s)].
Satellite Imagery / Scanned Aerial Photos:
[Satellite imagery | Scanned Aerial Photos] within the [Region] region captured in [Year(s)].
Expand All @@ -358,9 +358,9 @@ def _description(self) -> str:
elif self.metadata["category"] in [URBAN_AERIAL_PHOTOS, RURAL_AERIAL_PHOTOS]:
desc = f"Orthophotography within the {region} region captured in the {date} flying season"
elif self.metadata["category"] == DEM:
desc = f"Digital Elevation Model within the {region} region in {date}"
desc = f"Digital Elevation Model within the {region} region captured in {date}"
elif self.metadata["category"] == DSM:
desc = f"Digital Surface Model within the {region} region in {date}"
desc = f"Digital Surface Model within the {region} region captured in {date}"
else:
raise SubtypeParameterError(self.metadata["category"])

Expand Down
4 changes: 2 additions & 2 deletions scripts/stac/imagery/tests/generate_description_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_generate_description_elevation(metadata: Tuple[CollectionMetadata, Coll
metadata_auck, _ = metadata
metadata_auck["category"] = "dem"
collection = ImageryCollection(metadata_auck)
description = "Digital Elevation Model within the Auckland region in 2023."
description = "Digital Elevation Model within the Auckland region captured in 2023."
assert collection.stac["description"] == description


Expand All @@ -57,7 +57,7 @@ def test_generate_description_elevation_geographic_description_input(
metadata_auck["category"] = "dem"
metadata_auck["geographic_description"] = "Central"
collection = ImageryCollection(metadata_auck)
description = "Digital Elevation Model within the Auckland region in 2023."
description = "Digital Elevation Model within the Auckland region captured in 2023."
assert collection.stac["description"] == description


Expand Down

0 comments on commit 3194b6a

Please sign in to comment.