- add Laakirchen sensors
This commit is contained in:
parent
fb010174b7
commit
49d348678f
7 changed files with 347 additions and 22 deletions
|
@ -76,6 +76,8 @@ def main():
|
|||
.filter(Platform.sta_identifier == platform_sta_identifier) \
|
||||
.first()
|
||||
slope_dataset.fk_platform_id = sensor_platform.id
|
||||
|
||||
pg_session.commit()
|
||||
|
||||
format_exists: bool = pg_session.query(Format.id).filter_by(
|
||||
definition="http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement"
|
||||
|
@ -85,7 +87,8 @@ def main():
|
|||
.filter(Format.definition ==
|
||||
"http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement") \
|
||||
.first()
|
||||
slope_dataset.fk_format_id = sensor_format.id
|
||||
slope_dataset.fk_format_id = sensor_format.id
|
||||
pg_session.commit()
|
||||
|
||||
# create all the observation for the given sensor names
|
||||
create_observations(sensor, slope_dataset)
|
||||
|
|
|
@ -47,13 +47,13 @@ def main():
|
|||
slope_dataset.value_type = "quantity"
|
||||
pg_session.commit()
|
||||
|
||||
platform_exists: bool = pg_session.query(Platform.id).filter_by(
|
||||
sta_identifier=platform_sta_identifier).scalar() is not None
|
||||
if platform_exists:
|
||||
sensor_platform = pg_session.query(Platform.id) \
|
||||
.filter(Platform.sta_identifier == platform_sta_identifier) \
|
||||
.first()
|
||||
slope_dataset.fk_platform_id = sensor_platform.id
|
||||
# platform_exists: bool = pg_session.query(Platform.id).filter_by(
|
||||
# sta_identifier=platform_sta_identifier).scalar() is not None
|
||||
# if platform_exists:
|
||||
# sensor_platform = pg_session.query(Platform.id) \
|
||||
# .filter(Platform.sta_identifier == platform_sta_identifier) \
|
||||
# .first()
|
||||
# slope_dataset.fk_platform_id = sensor_platform.id
|
||||
|
||||
# create all the observation for the given sensor names
|
||||
create_observations(sensor, slope_dataset)
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue