Skip to content

Commit

Permalink
manually set proj:epsg to ensure items are compatible with GDAL STACIT
Browse files Browse the repository at this point in the history
  • Loading branch information
hrodmn committed Feb 28, 2025
1 parent 98ae0f8 commit 838a991
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/GMW_N26W082_2020_v3/GMW_N26W082_2020_v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
0.0,
1.0
],
"proj:epsg": 4326,
"datetime": "2020-12-31T00:00:00Z"
},
"links": [
Expand Down
4 changes: 2 additions & 2 deletions examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@
"bbox": [
[
-180.0,
90.0,
-90.0,
180.0,
-90.0
90.0
]
]
},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "stactools-global-mangrove-watch"
version = "0.2.1"
version = "0.2.2"
description = "A stactools package for the Global Mangrove Watch dataset"
readme = "README.md"
authors = [{ name = "Henry Rodman", email = "[email protected]" }]
Expand Down
3 changes: 3 additions & 0 deletions src/stactools/global_mangrove_watch/stac.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ def create_item(
transform=rasterio.transform.from_bounds(*item_attributes["bbox"], *ITEM_SHAPE),
)

# ensure proj:epsg gets set (pystac bug)
item.properties["proj:epsg"] = EPSG

assert isinstance(item, Item)

return item

0 comments on commit 838a991

Please sign in to comment.