Skip to content

Commit

Permalink
Merge pull request #194 from Open-EO/issue72_openeo-geotrellis-extens…
Browse files Browse the repository at this point in the history
…ions_put_proj_bbox_for_item_level_on_separate_field

Add proj:bbox to BatchJobsMetadata
  • Loading branch information
JohanKJSchreurs authored May 16, 2023
2 parents 72df087 + 5b37cca commit 739aa71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openeo_driver/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.48.1a1"
__version__ = "0.49.0a1"
2 changes: 2 additions & 0 deletions openeo_driver/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ class BatchJobMetadata(NamedTuple):
# TODO: #190 openEO API associates `links` with the job *result* metadata, not the job itself
links: List[Dict] = None
usage: Dict = None
# TODO #190 the STAC projection extension fields "proj:..." are not batch job metadata, but batch job *result* metadata:
proj_shape: List[int] = None
proj_bbox: List[int] = None

@property
def duration(self) -> Union[timedelta, None]:
Expand Down
5 changes: 5 additions & 0 deletions openeo_driver/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,9 @@ def _properties_from_job_info(job_info: BatchJobMetadata) -> dict:
if job_info.epsg:
properties["proj:epsg"] = job_info.epsg

if job_info.proj_bbox:
properties["proj:bbox"] = job_info.proj_bbox

if job_info.proj_shape:
properties["proj:shape"] = job_info.proj_shape

Expand Down Expand Up @@ -1178,6 +1181,8 @@ def _get_job_result_item(job_id, item_id, user_id):

if job_info.proj_shape:
properties["proj:shape"] = job_info.proj_shape
if job_info.proj_bbox:
properties["proj:bbox"] = job_info.proj_bbox

stac_item = {
"type": "Feature",
Expand Down

0 comments on commit 739aa71

Please sign in to comment.