# station_comments | pointing to annotations | stationmeta_annotations |
#
# converting old station_coordinates to PostGIS POINT structure
# converting type_of_environment to controlled vocabulary (ST_vocabulary)
# converting type_of_area to controlled vocabulary (TA_vocabulary)
# converting climatic_zone to controlled vocabulary (CZ_vocabulary)
# converting coordinate_validation_status to controlled vocabulary (CV_vocabulary)
# converting toar1_category to controlled vocabulary (TC_vocabulary)
# converting htap_region_tier1 to controlled vocabulary (TR_vocabulary)
# converting dominant_landcover_year2012 to controlled vocabulary (DL_vocabulary)
#
# new (not available in old DB):
# - coordinate_validation_date (now set to NOW())
# - station_coordinate_validator_id (now set to 1 (superuser: sschroeder))
#
# author: s.schroeder@fz-juelich.de
# date: 2020-07-05
# just for now: do one station after the other (with manual checks)
# surface_observations_toar=> select min(numid), max(numid) from stations WHERE network_name='UBA';
# min | max
# ------+-------
# 3336 | 19316
#psql -h zam10131.zam.kfa-juelich.de -U s.schroeder surface_observations_toar -W -c "\COPY (select numid from stations WHERE network_name='UBA' ORDER BY numid) TO 'UBA_stations.txt'"