WSL/SLF GitLab Repository

  1. 20 Jul, 2010 1 commit
    • Mathias Bavay's avatar
      Several bugs have been fixed in Coords: the setEPSG was not working, the... · 3e406fd0
      Mathias Bavay authored
      Several bugs have been fixed in Coords: the setEPSG was not working, the altitude was not displayed with the << operator and the formatting of decimal_to_dms was broken in its handling of seconds...
      
      The documentation for the resampling has been expanded and several other modules' documentation have been updated so their structure is built along the same lines. 
      
      An error message in IOHandler (when failing to load a plugin) was not clear and has been changed.
      
      Several bugs in SMEIO have been fixed (improper column names mapping, improper handling of easting/northing, unclear error message).
      
      The example data set has been tagged as GMT+1 and the meteo_reading and 2D_interpolations modified accordingly (so the argument read on the command line is assumed to be in GMT+1 too)
      3e406fd0
  2. 16 Jul, 2010 1 commit
    • Thomas Egger's avatar
      Bugfix: Inside the ConfigReader keys were added to the properties map by using... · d24a2873
      Thomas Egger authored
      Bugfix: Inside the ConfigReader keys were added to the properties map by using the this pointer. That leads to some weird behaviour when copying the ConfigReader object. Solution: Don't use the this pointer on private member variables if not necessary.
      
      IOUtils.h: getValueForKey now internally uses find when searching the map<string,string>, it used to do a cast, not being able to distinguish between a key with no value and a non-existent key. Now a key value pair like this is allowed:
      TEST = 
      
      i.e. an empty value.
      d24a2873
  3. 29 Jun, 2010 1 commit
    • Mathias Bavay's avatar
      Fixed the behavior of ConfigReader when throwing exceptions: it rethrows so... · adf44d82
      Mathias Bavay authored
      Fixed the behavior of ConfigReader when throwing exceptions: it rethrows so that the error message can be turned off by the receiver of the exception (if simply not printing e.what() when catching the exception). 
      
      The warnings in FilterAlgorithms have been turned off cast to void) since this is an algorithm that has to be re-written anyway. The documentation has been fixed (missing documentation, broken link, etc)
      adf44d82
  4. 28 Jun, 2010 1 commit
    • Thomas Egger's avatar
      Added new plugin for WSMDF format. gzipped version of format currently not... · 8750dd19
      Thomas Egger authored
      Added new plugin for WSMDF format. gzipped version of format currently not supported. binary version works, but since the julian date does not fit into a 4 byte (32bit) float, it is unusable. ASCII format works, although unit_multiplier and unit_offset are currently not supported. For location information the easting, northing version is not yet supported.
      
      Added function IOUtils::stripComments(string&) it, deletes everything after # or ; from the string&
      8750dd19
  5. 21 Jun, 2010 1 commit
    • Thomas Egger's avatar
      Directory structure change: src folder now called meteoio · 752c0068
      Thomas Egger authored
      Overall all include statements within in the library have been replaced by angle brackets, the default install path for the include file is $CMAKE_INSTALL_DIR/include/meteoio, the meteoio libraries (static and shared) will be installed in $CMAKE_INSTALL_DIR/lib per default.
      
      The plugins will be installed in the subdirectory $CMAKE_INSTALL_DIR/lib/meteoio/plugins
      752c0068
  6. 16 Jun, 2010 1 commit
    • Thomas Egger's avatar
      Added a function that seeks for a given date within a vector of MeteoData.... · 041c2742
      Thomas Egger authored
      Added a function that seeks for a given date within a vector of MeteoData. There are two modes of operation, depending on a boolean argument (true per default value): 
      1) the date must exactly match one within the vector
      2) the date doesn't have to exactly match up, in that case the vector must "contain" the date given an the index returned is for the first element of the vector with the a date greater than the one sought for.
      
      In case of failure, the function returns IOUtils::npos
      
      Added a missing include in ARPSIO.h
      041c2742
  7. 28 May, 2010 1 commit
    • Mathias Bavay's avatar
      First, the issue 57 (angle/bearing conversion) has been addressed. · 68605c9a
      Mathias Bavay authored
      Then, the remaining namespace issues with doxygen have been fixed, by enclosing the full class implementation in the namespace (as seen for the libstdc++). This removes all these irritating issues. But the popc version has been broken by the change (as seen in LegacyIO).
      68605c9a
  8. 21 Apr, 2010 1 commit
  9. 16 Apr, 2010 1 commit
    • Mathias Bavay's avatar
      Two public methods have been added to Date_IO (getJulianDayNumber and... · 3a1f6e9b
      Mathias Bavay authored
      Two public methods have been added to Date_IO (getJulianDayNumber and isLeapYear). The documentation has been slightly improved. A helper function has been added to IOUtils: getTimeZoneParameters. It will be used by the plugins in order to correctly set the timezone of their data.
      
      The Median Absolute Deviation filter has been implemented, documented and checked (in FilterAlgorithms).
      
      
      3a1f6e9b
  10. 13 Apr, 2010 1 commit
    • Thomas Egger's avatar
      changed the way we deal with the projection parameters within the io.ini.... · 31474cb6
      Thomas Egger authored
      changed the way we deal with the projection parameters within the io.ini. COORDSYS must be declared in the [Input] section and is optional for the [Output] section (it becomes mandatory if a function is to be used, that creates output)
      
      The parsing of the ConfigReader object is done in IOUtils, this is not the final solution on that.
      31474cb6
  11. 04 Mar, 2010 1 commit
  12. 22 Feb, 2010 1 commit
    • Mathias Bavay's avatar
      A few issues have been fixed in Coords: the copyProj method had a bug, the... · c930a817
      Mathias Bavay authored
      A few issues have been fixed in Coords: the copyProj method had a bug, the distance method now uses cartesian calculation if both projections are equal, a new getProj() method is now available (but it should be rarely needed). The GridxDObject::gridify method now correctly handles "NULL" projection and the Meteo2DInterpolator makes sure that all projections agree before doing the interpolations.
      c930a817
  13. 19 Feb, 2010 1 commit
    • Mathias Bavay's avatar
      Finally, the implementation of issue 35 is here... A few bugs left with the... · cdc01c4b
      Mathias Bavay authored
      Finally, the implementation of issue 35 is here... A few bugs left with the Coords class have been fixed (namely, the methods take 1 optional parameter and not more, because for this usage scenario it was way too dangerous and the user (myself in this case!) could call the method with the wrong parameter left empty). New mebers have been added: grid_i and grid_j as well as methods to deal with them. These contain the grid indices matching the position. Since these indices depend on the chosen DEM/grid, they are NOT updated by Coords but by Grid2DObject or Grid3DObject instead. If the user calls Coords::setLatLon() or Coords::setXY(), then these grid parameters are reset to nodata.
      
      A bug in a constructor of StationData has also been fixed (assigning a temporary object to a member of the class). Some bugs/unlucky deletes in the examples have been fixed (this is the price to pay for work too late at night!)
      
      New constants "lat_epsilon" and "lon_epsilon" have been created in IOUtils. They represent the smallest latitude/longitude resolution (ie: two points within lat_epsilon are considered to have the same latitude)
      cdc01c4b
  14. 18 Feb, 2010 1 commit
    • Mathias Bavay's avatar
      The constructor Coords(ConfigReader) was a bad idea... Convenient, but way too... · e02fa994
      Mathias Bavay authored
      The constructor Coords(ConfigReader) was a bad idea... Convenient, but way too specific. It has been removed. The documentation in the Coords class has been updated.
      
      A saner handling of nodata values by the plugins has been implemented. Now, each plugin should properly get its own internal definition of nodata and return data using IOUtils::nodata to the caller. A new method has been implemented in IOUtils to help cleaning a parameter for nodata.
      
      A check for xmlParseFile (used for compiling the Boschung plugin) was working poorly and has been commented out in configure.ac.
      
      Finally, more cleanup in the ph files has been performed.
      e02fa994
  15. 16 Feb, 2010 1 commit
    • Mathias Bavay's avatar
      The class Stationdata now properly uses the new Coords class. All usual... · b40dedb4
      Mathias Bavay authored
      The class Stationdata now properly uses the new Coords class. All usual dependencies have been fixed (A3DIO.cc) but not (yet) the optional plugins. The Coords class has been modified so that it computes the matching coordinates as soon as possible instead of the previous implementation that was delaying it as much as possible (thus making "const Coords..." impossible).
      
      The includes have been cleaned up (compilation was failing because of multiple "using namespace" in header files) and all "using namespace" have been removed from header files (please don't put any of these back!!). The doxygen comments has been updated.
      b40dedb4
  16. 10 Feb, 2010 1 commit
  17. 05 Feb, 2010 1 commit
    • Mathias Bavay's avatar
      In the MapProj class, a new conversion has been added: UTM to/from WGS84.... · ba74049c
      Mathias Bavay authored
      In the MapProj class, a new conversion has been added: UTM to/from WGS84. Simply give "UTM" as the coordinate system and specify in the optional arguments the zone number (for example, 31T).
      
      A (tricky) error has been fixed in the VincentyDistance. The bearing that was chosen was the average between the initial and reverse bearing. That seemd a good idea at the time, but this made reprojecting a local grid computed using Vincenty impossible: the required bearing (starting from the reference point) is the initial bearing, the average one was sending us hundreds of kilometers away from the correct coordinate (when doing (lat,lon) -> local -> (lat,lon)). 
      
      Finally, a few more powN() methods have been added to IOUtils for convenience (yes, the projection business loves these!!)
      ba74049c
  18. 09 Dec, 2009 1 commit
  19. 11 Nov, 2009 1 commit
    • Mathias Bavay's avatar
      The doxygen comments have been fixed and largely expanded: the welcome page is... · 6a54ca7e
      Mathias Bavay authored
      The doxygen comments have been fixed and largely expanded: the welcome page is now populated and some general documentation proposed. 
      
      The prototypes of the filters have been fixed (doxygen was complaining) so that we always use std:: when necessary.
      
      The Grid3DObject checkCoordinates has been implemented along the same lines as Grid2DObject. The altitude is still missing though...
      
      The check for POPC++ has been added to the autotools configuration. 
      
      A small improvement to the way the A3DIO plugins handles incoming nodata has been done. A few HACKS have been fixed and removed. Some error messages (in libinterpol2D) have been improved, their printf relpaced by a std::cerr and an extra check (using assert) has been added so that no Td would be computed if Rh<0 (and we would throw an exception).
      6a54ca7e
  20. 05 Nov, 2009 1 commit
  21. 03 Nov, 2009 1 commit
    • Mathias Bavay's avatar
      The constructor for local grid in MapProj has been changed and its prototype... · 656de316
      Mathias Bavay authored
      The constructor for local grid in MapProj has been changed and its prototype modified. It should now make more sense and allow using LOCAL in io.ini like any other projection keyword.
      
      The code that was doing IO buffering in LegacyIO when POPC was used has been deleted (this is not the right place to do caching). A method prototype has been slightly tweaked (using const string instead of char*).
      
      Since Laws.c/h is already a file that is part of Snowpack and since making it a separate library does not make so much sense (it is quite small and only 3 short functions from it are used in MeteoIO), the necessary code has been transfered to libinterpol2D and these two files have been deleted.
      
      A warning in IOUtils has been silenced.
      656de316
  22. 02 Nov, 2009 1 commit
    • Mathias Bavay's avatar
      All the code that has to do with geographic calculations (projections,... · 7b9e2bd6
      Mathias Bavay authored
      All the code that has to do with geographic calculations (projections, conversions to/from swiss coordinates, geodesic distances, etc) has been moved to the MapProj class. An elegant solution for checking the Grid2DObject coordinates (lat/long against xcoord/ycoord) in underway... (almost there!)
      
      Includes issues have been found and fixed (IOInterface and Grid2DObjet.h)
      
      7b9e2bd6
  23. 30 Oct, 2009 1 commit
    • Mathias Bavay's avatar
      A new method has been added to IUtils: cosineInverse, that computes the... · a96ccfbc
      Mathias Bavay authored
      A new method has been added to IUtils: cosineInverse, that computes the position of a point (lat, long) given a starting point and an angle using the spherical law of cosine. This is used by the WGS84_to_local and local_to_WGS84 methods that now accept an optional argument, bool fast. If fast is enable, the spherical law of cosine is used, otherwise Vincenty.
      
      Two new method have been added to Grid2DObject: WGS84_to_grid and grid_to_WGS84 that allow getting the cell's coordinates (i,j) of a geographical position given by its (lat, long) (back and forth). This is specially useful in order to extract a sub-dem from: (lat, long) and (dist_x, dist_y) or (lat1, long1) (lat2, long2). Using the first method, the grid's coordinates can be computed (nx) and ceil(dist_x/cellsize_x) gives the ncols, thus providing the parameters for the sub-set constructor.
      
      Code tagging (HACK and TODO).
      a96ccfbc
  24. 28 Oct, 2009 1 commit
  25. 27 Oct, 2009 1 commit
    • Mathias Bavay's avatar
      DEMObject and IOHandler have been modified so that the DEMObject is more or... · 1057ac03
      Mathias Bavay authored
      DEMObject and IOHandler have been modified so that the DEMObject is more or less intelligently updated while retaining the possibility to provide an optional argument turning it off (constructors which fill the DEMObject with real data by default now update the slope/curvatures/normals except if giving as a last argument *false*).
      
      The first code for using the proj4 library for coordinates conversion has been writen in MapProj. It is still disabled by default since it suffers (at least) from a parsing bug: the coordinates argument is truncated when going through cfg.getValue() and therefore not valid (at least my checks work!).
      
      A missplaced define (for PI) has been moved in IOUtils.
      
      LegacyIO popc code has been cleaned up, removing the timers (that are not portable and thus a problem for WIN32 systems).
      
      A typo in an error message has been fixed in Grid2DObject. A few unnecessary (ie: ugly) white spaces removed at some places (A3DIO.cc, etc)
      1057ac03
  26. 22 Oct, 2009 1 commit
    • Mathias Bavay's avatar
      A new define (DEBUG_ARITHM) has been added that activates the non-catching of... · 85135ebd
      Mathias Bavay authored
      A new define (DEBUG_ARITHM) has been added that activates the non-catching of arithmetic exceptions. This is specially required for parallel execution when the code from the library might execute in a process different from the caller (thus not having the required flag set on the cpu for its process). This is enabled/disabled in the Makefile.in (or the Makefile for the end user). 
      
      The std:: namespace declaration has been added to a lots of places, making the "use namespace std" usage irrelevant (and thus suppressed). Other namespaces that were called with a "use" have been found not to be used anymore and therefore also removed.
      
      Several bugs in the doxygen comments have been fixed: typo (misplaced space), comments not matching the declaration anymore, etc Doxygen now executes without warnings.
      
      85135ebd
  27. 19 Oct, 2009 1 commit
    • Thomas Egger's avatar
      1. Added more doxygen comments to plugins · db9c23cd
      Thomas Egger authored
      2. ConfigReader has a new function called getValue(key, vector<T>) that can deal with multiple white space separated values for one key.
      e.g. MYNUMBERS = 19.99 -27.89 777.0007
      
      can be read by:
      
      vector<double> myVec;
      ConfigReader cfg("test.ini");
      getValue("mynumbers", myVec);
      db9c23cd
  28. 14 Sep, 2009 1 commit
    • Thomas Egger's avatar
      CMake introduced as build system. It currently supports the non-popc versions... · 07bb5c87
      Thomas Egger authored
      CMake introduced as build system. It currently supports the non-popc versions of meteoio. You can choose which plugin to compile, whether this is a debug or a release version and what the destination is (zeus, grid or safe).
      
      Just run ccmake . in the trunk directory.
      
      Also fixed a few minor Syntax issues in IOUtils.h and IOExceptions.h
      07bb5c87
  29. 06 Sep, 2009 1 commit
    • Thomas Egger's avatar
      IMPORTANT: the io.ini files need to be changed: either no section header at... · 23f89957
      Thomas Egger authored
      IMPORTANT: the io.ini files need to be changed: either no section header at all or [General] instead of [Parameters]
      
      ConfigReader:
      * able to deal with sections
      * if no section indicated in file then it defaults to section "GENERAL"
      * getValue can deal with sections
      * there is an option to turn off the throwing of exceptions in getValue
      
      IOUtils:
      * toUpper(string& str) converts a string to uppercase
      
      
      23f89957
  30. 27 Aug, 2009 1 commit
  31. 13 Aug, 2009 1 commit
  32. 10 Aug, 2009 1 commit
  33. 03 Aug, 2009 1 commit
    • Thomas Egger's avatar
      Main changes: · 33cd0e50
      Thomas Egger authored
      * GeotopIO plugin, to read GeoTOP formatted files
      * IOHandler: code reduction for the loading and unloading of plugins
      * MeteoData: added one files "p"
      * IOUtils: added one more readLineToVec for different delimiters (comma, column, ...) - there was only one for whitespaces 
      33cd0e50
  34. 27 Jul, 2009 1 commit
    • Thomas Egger's avatar
      New design for MeteoIO library: · e569ad90
      Thomas Egger authored
      * function readMeteoData is there to read an interval of data
      	readMeteoData(fromDate, toDate, vector< vector<MeteoData> >, vector< vector<MeteoData> >)
      * BufferedIOHandler is constructed with another child of IOInterface (e.g. IOHandler) as parameter and deals with all intrinsic issues of buffering, resampling, filtering: so if you have an IOHandler and you want to add buffering:
      	BufferedIOHandler(iohandler, configreader)
      and then you can access all IOInterface functions, plus a few convenient ones that only BufferedIOHandler exposes:
      	getNextMeteoData(date, vector<MeteoData>, vector<StationData>)
      	readMeteoData(date, vector<MeteoData>, vector<StationData>)
      you can enable and disable buffering:
      	bufferediohandler.enableResampling(true);
      
      * A3DIO and IOHandler had to be adapted to the changes in IOInterface 
      * added a getYear() function to Date_IO
      * MeteoData has a new member variable "resampled" to indicate whether data has been resampled or not
      e569ad90
  35. 20 Jul, 2009 1 commit
    • Mathias Bavay's avatar
      A new class has been created, DEMObject. It inherits from Grid2DObject but... · 3258099c
      Mathias Bavay authored
      A new class has been created, DEMObject. It inherits from Grid2DObject but also contains DEM specific functionality: computation of slope, azimuth, normal vector's components and curvature. 
      
      A new method has been created for both DEMObject and Grid2DObject: the sub() method that allows extracting a subset of a given grid (usefull for distributed computing).
      
      The Grid2DObject class has been tweaked in order to make it rely on IOUtils::nodata instead of its own nodata. The required changes have been made in A3DIO and libinterpol2D.
      
      The Makefile.in and configure.ac have been adapted and slightly improved (still a long way to go...)
      3258099c
  36. 10 Jul, 2009 1 commit
  37. 07 Jul, 2009 2 commits
    • Mathias Bavay's avatar
      Fixed some warnings that were showing up on g++ 3.xx: · 228b136b
      Mathias Bavay authored
      	*lack of virtual destructor for FilterValue (also missing for some other filters, but not triggering any warnings). A closer look would be welcomed into these destructors...
      	*unsigned ints are badly handled by convertString: it returns -999 as nodata, which is not good... calls for unsigned ints have been replaced by calls to int, with a check for nodata manually performed. A better solution would be needed for the long term (return -1 for unsigned_nodata?).
      	*strings indexes are now using a specific type for this, std::string::size_type. This is better than assuming unsigned int
      228b136b
    • Mathias Bavay's avatar
      The doxygen code has been cleaned up in order to fix several warnings and... · 4f72cd4b
      Mathias Bavay authored
      The doxygen code has been cleaned up in order to fix several warnings and several issues with the generated html documentation.
      
      A constant has been defined for holding the IMIS buffer size (in ImisIO.h).
      4f72cd4b
  38. 16 Jun, 2009 1 commit
    • Mathias Bavay's avatar
      Some issues with the local grid computation have been fixed. Namely, its was... · 0a1dbb48
      Mathias Bavay authored
      Some issues with the local grid computation have been fixed. Namely, its was stupid to compute the x-axis distance at 0 deg latitude... The coordinates are now computed using distance and bearing instead of two distances.
      
      A3DIO now checks if the provided xcoord/ycoord and lat/long are consistent (both being given in meteo1d). If not, we throw an exception.
      
      meteoio_demo has been updated to use the local grid instead of swiss coordinates (the issue of the output grid still remains unsolved).
      0a1dbb48
  39. 15 Jun, 2009 1 commit
    • Mathias Bavay's avatar
      The Grid2DObjects have been modified by adding a latitude and a longitude... · 4c18869b
      Mathias Bavay authored
      The Grid2DObjects have been modified by adding a latitude and a longitude field. These have to be provided alongside the other parameters, the goal being to consider that the east and north coordinates are convenience coordinates (for example for calculating distances), but that the reference coordinates are latitude/longitude.
      
      The required changes have been implemented into BoschungIO and A3DIO. The latter now also computes latitude/longitude automatically out of the CH1903 coordinates (after checking if the lat/long are not already provided, like for meteo1d). 
      
      The required formulas for implementing a local grid system have been put into IOUtils. These allow to compute the distance between two points, given their lat/long or the coordinate of a point given a starting lat/long, a distance and a bearing. This allows to define a local grid system, for example using the lower left corner of the dem as the origin.
      
      The convertString for Date_IO is now used by meteoio_demo and createA3DFiles instead of a hand made equivalent. 
      
      The Makefiles have been tweaked in order to remove unecessay dependencies (in test) and to add a missing compilation rule (main Makefile). 
      4c18869b