Skip to content

Commit

Permalink
fix STAC Item provider output (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Mar 8, 2025
1 parent c4cea16 commit 6ac5cd9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pygeometa/schemas/stac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def write(self, mcf: dict, stringify: str = True) -> Union[dict, str]:
},
'properties': {
'title': title[0],
'description': description[0]
'description': description[0],
'providers': []
},
'links': []
}
Expand All @@ -123,7 +124,9 @@ def write(self, mcf: dict, stringify: str = True) -> Union[dict, str]:
if 'revision' in mcf['identification']['dates']:
stac_item['properties']['updated'] = mcf['identification']['dates']['revision'] # noqa

stac_item['properties']['providers'] = [{'name': mcf['contact']['pointOfContact']['organization']}] # noqa
for value in mcf['contact'].values():
stac_item['properties']['providers'].append({
'name': value['organization']})

for value in mcf['distribution'].values():
title = get_charstring(value.get('title'), lang1, lang2)
Expand Down

0 comments on commit 6ac5cd9

Please sign in to comment.