WSL/SLF GitLab Repository

Commit 93f96306 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Replacing "special points" by "Points Of Interest" in the documentation and...

Replacing "special points" by "Points Of Interest" in the documentation and the examples. Fixing warnings for BormaIO.
parent ac7b3114
......@@ -79,7 +79,7 @@ namespace mio {
* - DEM, for Digital Elevation Maps
* - LANDUSE, for land cover information
* - GRID2D, for generic 2D grids (they can contain meteo fields and be recognized as such or arbitrary gridded data)
* - SPECIALPTS, for a list of points that can be used for providing extra information at some specific location (extracting time series at a few selected points, etc)
* - POI, for a list of Points Of Interest that can be used for providing extra information at some specific location (extracting time series at a few selected points, etc)
*
* A plugin is "connected" to a given data source category simply by giving its keyword as value for the data source key:
* @code
......@@ -94,7 +94,7 @@ namespace mio {
* So far the following plugins have been implemented (by keyword for the io.ini key/value config file). Please read the documentation for each plugin in order to know the plugin-specific keywords:
* <center><table border="1">
* <tr><th>Plugin keyword</th><th>Provides</th><th>Description</th><th>Extra requirements</th></tr>
* <tr><td>\subpage a3d "A3D"</td><td>meteo, specialpts</td><td>original Alpine3D meteo files</td><td></td></tr>
* <tr><td>\subpage a3d "A3D"</td><td>meteo, poi</td><td>original Alpine3D meteo files</td><td></td></tr>
* <tr><td>\subpage arc "ARC"</td><td>dem, landuse, grid2d</td><td>ESRI/ARC ascii grid files</td><td></td></tr>
* <tr><td>\subpage arps "ARPS"</td><td>dem, grid2d</td><td>ARPS ascii formatted grids</td><td></td></tr>
* <tr><td>\subpage borma "BORMA"</td><td>meteo</td><td>Borma xml meteo files</td><td><A HREF="http://libxmlplusplus.sourceforge.net/">libxml++</A></td></tr>
......@@ -106,7 +106,7 @@ namespace mio {
* <tr><td>\subpage imis "IMIS"</td><td>meteo</td><td>connects to the IMIS database</td><td><A HREF="http://docs.oracle.com/cd/B12037_01/appdev.101/b10778/introduction.htm">Oracle's OCCI library</A></td></tr>
* <tr><td>\subpage pgmio "PGM"</td><td>dem, grid2d</td><td>PGM grid files</td><td></td></tr>
* <tr><td>\subpage pngio "PNG"</td><td>dem, grid2d</td><td>PNG grid files</td><td><A HREF="http://www.libpng.org/pub/png/libpng.html">libpng</A></td></tr>
* <tr><td>\subpage smetio "SMET"</td><td>meteo, specialpts</td><td>SMET data files</td><td></td></tr>
* <tr><td>\subpage smetio "SMET"</td><td>meteo, poi</td><td>SMET data files</td><td></td></tr>
* <tr><td>\subpage snowpack "SNOWPACK"</td><td>meteo</td><td>original SNOWPACK meteo files</td><td></td></tr>
* </table></center>
* <i><SUP>1</SUP>In order to rebuild the soap bindings for GSN, <A HREF="http://gsoap2.sourceforge.net/">gsoap</A> is required. This is only relevant to the plugin developers.</i>
......
......@@ -173,8 +173,8 @@ namespace mio {
* - [General] : The documentation about this section is found in ??. It currently contains the PLUGIN_PATH key that
* points to the place where to find the plugins as well as some buffering keys (see BufferedIOHandler).
* - [Input] : This section contains the list of all the plugins that you want to use as well as their parameters. You can
* use one plugin for the meteorological data (key=METEO), one for grids (key=GRID2D), one for special points
* (key=SPECIALPTS), one for data assimilation (key=DA), one for landuse (key=LANDUSE) and one for Digital
* use one plugin for the meteorological data (key=METEO), one for grids (key=GRID2D), one for the Points Of Interest
* (key=POI), one for data assimilation (key=DA), one for landuse (key=LANDUSE) and one for Digital
* Elevation Model (key=DEM). Please see \ref plugins for the available plugins. Afterwards, each plugin comes
* with its own set of keys, as specified in the plugin's documentation. Morevover, the geographic coordinate
* system should often be specified, as explained in \ref coords. For the meteorological parameters, it is also
......
......@@ -53,7 +53,7 @@ namespace mio {
* - COORDPARAM: extra input coordinates parameters (see Coords) specified in the [Input] section
* - COORDSYS: output coordinate system (see Coords) specified in the [Output] section
* - COORDPARAM: extra output coordinates parameters (see Coords) specified in the [Output] section
* - SPECIALPTSFILE: a path+file name to the a file containing grid coordinates of special points of interest (for special outputs)
* - POIFILE: a path+file name to the a file containing grid coordinates of Points of Interest (for special outputs)
*/
const double A3DIO::plugin_nodata = -9999.0; //plugin specific nodata value
......
......@@ -50,32 +50,22 @@ const double BormaIO::default_tz = +1.; //default timezone
const double BormaIO::pivot_year = 80.; //pivot year for Y2K suppport
const std::string BormaIO::dflt_extension = ".xml";
BormaIO::BormaIO(const std::string& configfile) : cfg(configfile)
BormaIO::BormaIO(const std::string& configfile)
: vecStationName(), cfg(configfile), coordin(), coordinparam(), coordout(), coordoutparam(),
in_tz(default_tz), nr_stations(0)
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
in_tz = default_tz;
cfg.getValue("TIME_ZONE","Input",in_tz,IOUtils::nothrow);
}
BormaIO::BormaIO(const Config& cfgreader) : cfg(cfgreader)
BormaIO::BormaIO(const Config& cfgreader)
: vecStationName(), cfg(cfgreader), coordin(), coordinparam(), coordout(), coordoutparam(),
in_tz(default_tz), nr_stations(0)
{
IOUtils::getProjectionParameters(cfg, coordin, coordinparam, coordout, coordoutparam);
in_tz = default_tz;
cfg.getValue("TIME_ZONE","Input",in_tz,IOUtils::nothrow);
}
BormaIO::~BormaIO() throw()
{
cleanup();
}
void BormaIO::cleanup() throw()
{
if (fin.is_open()) {//close fin if open
fin.close();
}
}
void BormaIO::read2DGrid(Grid2DObject&, const std::string&)
{
//Nothing so far
......
......@@ -48,7 +48,6 @@ class BormaIO : public IOInterface {
BormaIO(const std::string& configfile);
BormaIO(const BormaIO&);
BormaIO(const Config&);
~BormaIO() throw();
virtual void read2DGrid(Grid2DObject& dem_out, const std::string& parameter="");
virtual void read2DGrid(Grid2DObject& grid_out, const MeteoGrids::Parameters& parameter, const Date& date);
......@@ -81,7 +80,6 @@ class BormaIO : public IOInterface {
xmlpp::Node* xmlGetNode(xmlpp::Node* parentNode, const std::string& nodename);
Date stringToDate(const std::string& tmp) const;
bool validFilename(const std::string& tmp) const;
void cleanup() throw();
void getFiles(const std::string& stationsname, const Date& start_date, const Date& end_date,
std::vector<std::string>& vecFiles, std::vector<Date>& vecDate);
void readStationNames(void);
......@@ -89,17 +87,18 @@ class BormaIO : public IOInterface {
std::vector< std::vector<MeteoData> >& vecMeteo,
const unsigned int& stationnr);
size_t nr_stations; //number of stations to read from
double in_tz;
std::ifstream fin; //Input file streams
std::vector<std::string> vecStationName;
const Config cfg;
std::string coordin, coordinparam, coordout, coordoutparam; //projection parameters
double in_tz;
size_t nr_stations; //number of stations to read from
static const double plugin_nodata; //plugin specific nodata value, e.g. -999
static const double default_tz; //default timezone
static const double pivot_year; //pivot year for Y2K suppport
static const std::string dflt_extension;
std::string coordin, coordinparam, coordout, coordoutparam; //projection parameters
const Config cfg;
};
} //end namespace mio
......
......@@ -81,7 +81,7 @@ namespace mio {
* - GRID2DEXT: grib file extension, or <i>none</i> for no file extension (default: ".grb")
* - GRIB_DEM_UPDATE: recompute slope/azimuth from the elevations when reading a DEM (default=false,
* that is we use the slope and azimuth included in the GRIB file)
* - METEOPATH: path where to find the grids for extracting time series at special points
* - METEOPATH: path where to find the grids for extracting time series at the given points
* - METEOEXT: file extension, or <i>none</i> for no file extension (default: ".grb")
* - STATION#: coordinates for virtual stations (if using GRIB as METEO plugin). Each station is given by its coordinates and the closest
* grid point will be chosen. Coordinates are given one one line as "lat lon" or "xcoord ycoord epsg_code". If a point leads to duplicate grid points,
......
......@@ -25,7 +25,7 @@ namespace mio {
* @page smetio SMET
* @section template_format Format
* The Station meteo data files is a station centered, ascii file format that has been designed with flexibility and ease of use in mind. Please refer to its <a href="../SMET_specifications.pdf">official format specification</a> for more information (including the list of standard parameters: TA, TSS, TSG, RH, VW, DW, ISWR, OSWR, ILWR, OLWR, PINT, PSUM, HS).
* This plugin can also provide special points, given as a SMET file containing either latitude/longitude/altitude or easting/northing/altitude. For the latter, the header must contain the epsg code (see example below).
* This plugin can also provide Points Of Interest, given as a SMET file containing either latitude/longitude/altitude or easting/northing/altitude. For the latter, the header must contain the epsg code (see example below).
*
* Non-standard parameters can also be given, such as extra snow temperatures. These parameters will then take the name that has been given in "fields", converted to uppercase. It is usually a good idea to number these parameters, such as TS1, TS2, TS3 for a serie of temperatures at various positions.
*
......@@ -37,7 +37,7 @@ namespace mio {
* - STATION#: input filename (in METEOPATH). As many meteofiles as needed may be specified
* - METEOPATH: meteo files directory where to read/write the meteofiles; [Input] and [Output] sections
* - METEOPARAM: output file format options (ASCII or BINARY that might be followed by GZIP)
* - SPECIALPTSFILE: a path+file name to the a file containing grid coordinates of special points of interest (for special outputs)
* - POIFILE: a path+file name to the a file containing grid coordinates of Points Of Interest (for special outputs)
*
* Example:
* @code
......@@ -52,7 +52,7 @@ namespace mio {
* METEOPARAM = ASCII GZIP
* @endcode
*
* Below is an example of special points input:
* Below is an example of Points Of Interest input:
* @code
* SMET 1.1 ASCII
* [HEADER]
......
Supports Markdown
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