Commit 9bda978d authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed issue during job information retrieval from database (Issue #29).

Former-commit-id: d767fe1b
Former-commit-id: 74a38eb9
parent 47e429d0
...@@ -939,8 +939,10 @@ class GMS_JOB(object): ...@@ -939,8 +939,10 @@ class GMS_JOB(object):
all_senIDs = gdf.sensorid.unique() .tolist() all_senIDs = gdf.sensorid.unique() .tolist()
satName_res = get_info_from_postgreSQLdb(self.conn, 'satellites', ['name'], {'id': all_satIDs}) satName_res = get_info_from_postgreSQLdb(self.conn, 'satellites', ['name'], {'id': all_satIDs})
senName_res = get_info_from_postgreSQLdb(self.conn, 'sensors', ['name'], {'id': all_senIDs}) senName_res = get_info_from_postgreSQLdb(self.conn, 'sensors', ['name'], {'id': all_senIDs})
id_satName_dict = dict(zip(all_satIDs, satName_res[0])) all_satNames = [i[0] for i in satName_res]
id_senName_dict = dict(zip(all_senIDs, senName_res[0])) all_senNames = [i[0] for i in senName_res]
id_satName_dict = dict(zip(all_satIDs, all_satNames))
id_senName_dict = dict(zip(all_senIDs, all_senNames))
gdf.insert(0, 'satellite', list(gdf.satelliteid.map(lambda satID: id_satName_dict[satID]))) gdf.insert(0, 'satellite', list(gdf.satelliteid.map(lambda satID: id_satName_dict[satID])))
gdf.insert(1, 'sensor', list(gdf.sensorid .map(lambda senID: id_senName_dict[senID]))) gdf.insert(1, 'sensor', list(gdf.sensorid .map(lambda senID: id_senName_dict[senID])))
gdf['polygons'] = list(gdf.geom.map(lambda wkb_hex: shapely.wkb.loads(wkb_hex, hex=True))) gdf['polygons'] = list(gdf.geom.map(lambda wkb_hex: shapely.wkb.loads(wkb_hex, hex=True)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment