MeteoIODoc 2.11.0
mio::EditingMetadata Class Reference

Detailed Description

METADATA input editing command.

This Input Data Editing algorithm allows to manipulate the metadata of a given station. it takes the following arguments:

  • NAME: set a new station name;
  • ID: set a new station ID;
  • LATITUDE: set a new latitude (then the longitude argument MUST also be provided);
  • LONGITUDE: set a new longitude (then the latitude argument MUST also be provided);
  • ALTITUDE: set a new altitude;
  • SLOPE: set a new slope (then the aziumth argument MUST also be provided);
  • AZIMUTH: set a new azimuth (then the slope argument MUST also be provided).

Please note that setting a new ID in effect creates a new station. If there are no time restrictions, the old station will disappear and be replaced by the new one. If there are time restrictions, both stations will remain side by side, although with an obviously different time coverage. Since there is a dependency resolution, you can declare some Input Data Editing on the new station ID, it will be applied properly and any editing declared after the ID editing command will only apply for data outside of time restrictions (if any) for the renaming command. When creating a new station, it makes sense to also provide the geographic coordinates for it...

SLF2::edit1 = METADATA
SLF2::arg1::altitude = 1560 ;set the altitude to 1560m
FLU2::edit1 = METADATA
FLU2::arg1::id = TST2
FLU2::arg1::WHEN = 2020-01-01 - 2020-02-01 ;all data in this time range will move to the new TST2 station
FLU2::edit2 = EXCLUDE ;this will only be applied to data outside the above-defined range
FLU2::arg2::params = TA
TST2::edit1 = SWAP ; data in the above-defined range will come to this new station
TST2::arg1::dest = TA1 ; and then this SWAP will be applied
TST2::arg1::src = TA2

#include <DataEditingAlgorithms.h>

Public Member Functions

 EditingMetadata (const std::string &i_stationID, const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg)
 
virtual void editTimeSeries (std::vector< METEO_SET > &vecMeteo)
 Apply this editing block. More...
 
virtual void editTimeSeries (STATIONS_SET &vecStation)
 Apply this editing block to the StationData. More...
 
std::set< std::string > providedIDs () const
 Get the station IDs this editing block provides based on this station. More...
 
- Public Member Functions inherited from mio::EditingBlock
 EditingBlock (const std::string &i_stationID, const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg)
 
virtual ~EditingBlock ()
 
virtual void editTimeSeries (std::vector< METEO_SET > &vecMeteo)
 Apply this editing block. More...
 
virtual void editTimeSeries (STATIONS_SET &vecStation)
 Apply this editing block to the StationData. More...
 
virtual std::set< std::string > requiredIDs () const
 Get the station IDs this editing block depends on for this station. More...
 
virtual std::set< std::string > providedIDs () const
 Get the station IDs this editing block provides based on this station. More...
 
virtual std::set< std::string > purgeIDs () const
 Get the station IDs to purge after using them for this station ID. More...
 
const std::string toString () const
 

Additional Inherited Members

- Protected Member Functions inherited from mio::EditingBlock
std::string getName () const
 
bool skipStation (const std::vector< MeteoData > &vecMeteo) const
 Return true if this station ID should be skipped. More...
 
METEO_SET timeFilterFromStation (const METEO_SET &vecMeteo) const
 Prepare a station that will be merged in case of time restrictions. More...
 
- Static Protected Member Functions inherited from mio::EditingBlock
static std::set< std::string > initStationSet (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &keyword)
 
- Protected Attributes inherited from mio::EditingBlock
const std::set< std::string > excluded_stations
 
const std::set< std::string > kept_stations
 
const std::vector< DateRangetime_restrictions
 
const std::string stationID
 
const std::string block_name
 

Constructor & Destructor Documentation

◆ EditingMetadata()

mio::EditingMetadata::EditingMetadata ( const std::string &  i_stationID,
const std::vector< std::pair< std::string, std::string > > &  vecArgs,
const std::string &  name,
const Config cfg 
)

Member Function Documentation

◆ editTimeSeries() [1/2]

void mio::EditingMetadata::editTimeSeries ( STATIONS_SET vecStation)
virtual

Apply this editing block to the StationData.

This applies the editing block for its station that has been declared in the constructor on the provided StationData timeseries.

Parameters
vecStationStationData timeseries for all stations

Reimplemented from mio::EditingBlock.

◆ editTimeSeries() [2/2]

void mio::EditingMetadata::editTimeSeries ( std::vector< METEO_SET > &  vecMeteo)
virtual

Apply this editing block.

This applies the editing block for its station that has been declared in the constructor on the provided MeteoData timeseries.

Parameters
vecMeteoMeteoData timeseries for all stations

Reimplemented from mio::EditingBlock.

◆ providedIDs()

std::set< std::string > mio::EditingMetadata::providedIDs ( ) const
virtual

Get the station IDs this editing block provides based on this station.

Returns
a set of station IDs it provides

Reimplemented from mio::EditingBlock.


The documentation for this class was generated from the following files: