Skip to content

Commit

Permalink
test station coordinate types (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Jul 3, 2023
1 parent 5c55e2b commit 0bdaa91
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions wis2box-management/wis2box/metadata/station.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@ def publish_station_collection() -> None:
station_list.append(wigos_station_identifier)
topics = list(check_station_datasets(wigos_station_identifier))
topic = None if len(topics) == 0 else topics[0]['title']

LOGGER.debug('Verifiying station coordinate types')
for pcs in ['longitude', 'latitude', 'elevation']:
value = get_typed_value(row[pcs])
if not isinstance(value, (int, float)):
msg = f'Invalid station {pcs} value: {value}'
LOGGER.error(msg)
raise RuntimeError(msg)

feature = {
'id': wigos_station_identifier,
'type': 'Feature',
Expand Down

0 comments on commit 0bdaa91

Please sign in to comment.