CUAHSI / HydroDesktop

HydroDesktop is a free and open source GIS enabled desktop application that helps you search for, download, visualize, and analyze hydrologic and climate data registered with the CUAHSI Hydrologic Information System. HydroDesktop is part of the legacy CUAHSI toolkit and is not under active development. Click the "releases" link below to download the latest installer for Microsoft Windows.
73 stars 20 forks source link

HydroR - Add "deriveDataSeries" function #46

Open xhqiao89 opened 7 years ago

xhqiao89 commented 7 years ago

jirikadlec2[CodePlex]
When using HydroR it is currently difficult to create a new data series (based on an existing series) and save it to the database. One use case is forecasting: The forecast applies to an existing site and variable, but the value type and method are different. Also the ValueCount is different from any existing dataSeries in the DB. In order to reduce the number of code that must be written I propose adding a new method quotDeriveDataSeriesquot with following input parameters:

connectionString (the database connection) originalSeriesID (the ID of the original series) times (a vector of new observation dates/times) dataValues (a vector of new data values)

output: the derived series with the time/value arrays read from the times and dataValues vectors (both vectors must be same length). The derived series has the same site, source and quality control level as the original series but it can have a different number of data values. The method is set to quotDerived using HydroRquot. The variable$ValueType is changed to quotDerived Valuequot. After running deriveDataSeries, user can do some modification to its other attributes (if required) and then run saveDataSeries to save it to the DB.

xhqiao89 commented 7 years ago

cuylerfris[CodePlex]
Discussion required - leaving marked as proposed.