Skip to content

Commit f90fb84

Browse files
authored
fix STAC Item provider output (#238) (#260)
1 parent c4cea16 commit f90fb84

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pygeometa/schemas/stac/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ def write(self, mcf: dict, stringify: str = True) -> Union[dict, str]:
106106
},
107107
'properties': {
108108
'title': title[0],
109-
'description': description[0]
109+
'description': description[0],
110+
'providers': []
110111
},
111112
'links': []
112113
}
@@ -123,7 +124,9 @@ def write(self, mcf: dict, stringify: str = True) -> Union[dict, str]:
123124
if 'revision' in mcf['identification']['dates']:
124125
stac_item['properties']['updated'] = mcf['identification']['dates']['revision'] # noqa
125126

126-
stac_item['properties']['providers'] = [{'name': mcf['contact']['pointOfContact']['organization']}] # noqa
127+
for value in mcf['contact'].values():
128+
stac_item['properties']['providers'].append({
129+
'name': value['organization']})
127130

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

0 commit comments

Comments
 (0)