Closed altix closed 1 year ago
this is a fixed list and not suitable, we need to query the database for a current list of stations and build the dictionary on the fly. this code snippet should help
from icoscp.station import station stations = station.getIdList() values = stations.id.tolist() keys = [k.upper() for k in values] lookup = dict(zip(keys, values))
Right, I agree, but I used another approach in order to avoid to many sparql-runs.
Now the user will no need to use case-sensitive id of a station in order to create the station object. Added a lookup table.