Skip to content

Commit 312a081

Browse files
authored
Implement Extension: Render (#1464) (#1465)
* Initial implementation of render extension * Return Render objs from renders getter * Add closing greater than symbol to Render repr * Fix instance type check logic * Add render extension tests * Remove item-assets and virtual assets extensions * Add docstrings to render extension * Replace Landsat-8 example Item with Sentinel-2 Item * Remove validation tests * Remove other extensions, simplify Item * Update render extension for v2.0.0 conformance * Add render test episodes * Add #1465 render extension * Fix references to xarray in docstrings
1 parent e90b945 commit 312a081

File tree

8 files changed

+1187
-0
lines changed

8 files changed

+1187
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- Top-level `item_assets` dict on `Collection`s ([#1476](https://github.com/stac-utils/pystac/pull/1476))
8+
- Render Extension ([#1465](https://github.com/stac-utils/pystac/pull/1465))
89

910
### Changed
1011

pystac/extensions/ext.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from pystac.extensions.pointcloud import PointcloudExtension
2121
from pystac.extensions.projection import ProjectionExtension
2222
from pystac.extensions.raster import RasterExtension
23+
from pystac.extensions.render import Render, RenderExtension
2324
from pystac.extensions.sar import SarExtension
2425
from pystac.extensions.sat import SatExtension
2526
from pystac.extensions.scientific import ScientificExtension
@@ -44,6 +45,7 @@
4445
"pc",
4546
"proj",
4647
"raster",
48+
"render",
4749
"sar",
4850
"sat",
4951
"sci",
@@ -66,6 +68,7 @@
6668
PointcloudExtension.name: PointcloudExtension,
6769
ProjectionExtension.name: ProjectionExtension,
6870
RasterExtension.name: RasterExtension,
71+
RenderExtension.name: RenderExtension,
6972
SarExtension.name: SarExtension,
7073
SatExtension.name: SatExtension,
7174
ScientificExtension.name: ScientificExtension,
@@ -118,6 +121,10 @@ def cube(self) -> DatacubeExtension[Collection]:
118121
def item_assets(self) -> dict[str, ItemAssetDefinition]:
119122
return ItemAssetsExtension.ext(self.stac_object).item_assets
120123

124+
@property
125+
def render(self) -> dict[str, Render]:
126+
return RenderExtension.ext(self.stac_object).renders
127+
121128
@property
122129
def sci(self) -> ScientificExtension[Collection]:
123130
return ScientificExtension.ext(self.stac_object)
@@ -172,6 +179,10 @@ def pc(self) -> PointcloudExtension[Item]:
172179
def proj(self) -> ProjectionExtension[Item]:
173180
return ProjectionExtension.ext(self.stac_object)
174181

182+
@property
183+
def render(self) -> RenderExtension[Item]:
184+
return RenderExtension.ext(self.stac_object)
185+
175186
@property
176187
def sar(self) -> SarExtension[Item]:
177188
return SarExtension.ext(self.stac_object)

0 commit comments

Comments
 (0)