23#include <meteoio/thirdParty/picojson.h>
29 #pragma warning(disable:4512)
50 std::vector< std::vector<MeteoData> >& vecMeteo);
52 typedef struct METEOPARAM {
53 METEOPARAM() : param(), units_multiplier(1.), units_offset(0.) {}
55 : param(i_param), units_multiplier(1.), units_offset(0.) {}
57 : param(i_param), units_multiplier(multiplier), units_offset(offset) {}
60 double convertValue(
const double& val)
const {
return (units_multiplier*val + units_offset);}
63 std::ostringstream os;
74 void readData(
const StationData& sd, std::vector<MeteoData> &vecMeteo);
75 void readTime(
const picojson::value &v,
const StationData& sd, std::vector<MeteoData> &vecMeteo)
const;
76 void readParameter(
const picojson::value &v,
const std::string& paramname, std::vector<MeteoData> &vecMeteo)
const;
77 static picojson::value goToJSONPath(
const std::string& path,
const picojson::value& v);
78 static size_t data_write(
void* buf,
const size_t size,
const size_t nmemb,
void* userp);
79 bool curl_read(
const std::string& url, std::ostream& os)
const;
82 std::vector<StationData> vecMeta;
83 std::string coordin, coordinparam;
84 std::string endpoint, apikey, packages;
88 static std::map< std::string, meteoParam > params_map;
89 static const std::string dflt_endpoint;
90 static const int http_timeout_dflt;
91 static const bool __init;
92 static bool initStaticData();
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class representing the IO Layer of the software Alpine3D. For each type of IO (File,...
Definition: IOInterface.h:98
This class enables the access to the MeteoBlue RESTful web service.
Definition: MeteoBlue.h:42
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: MeteoBlue.cc:197
virtual void readMeteoData(const Date &dateStart, const Date &dateEnd, std::vector< std::vector< MeteoData > > &vecMeteo)
Fill vecMeteo with a time series of objects corresponding to the interval indicated by dateStart and ...
Definition: MeteoBlue.cc:203
MeteoBlue(const MeteoBlue &)
MeteoBlue(const std::string &configfile)
Definition: MeteoBlue.cc:140
static const std::string getParameterName(const size_t &parindex)
Definition: MeteoData.cc:85
Parameters
this enum provides names for possible meteogrids (from an ARPS file, etc)
Definition: MeteoData.h:46
Definition: MeteoBlue.h:52
MeteoGrids::Parameters param
Definition: MeteoBlue.h:68
std::string getParameterName() const
Definition: MeteoBlue.h:59
METEOPARAM(const MeteoGrids::Parameters &i_param)
Definition: MeteoBlue.h:54
METEOPARAM(const MeteoGrids::Parameters &i_param, const double &multiplier, const double &offset)
Definition: MeteoBlue.h:56
std::string toString() const
Definition: MeteoBlue.h:62
double units_multiplier
Definition: MeteoBlue.h:69
METEOPARAM()
Definition: MeteoBlue.h:53
double convertValue(const double &val) const
Definition: MeteoBlue.h:60