14#ifndef SEIMS_REACH_CLS_H
15#define SEIMS_REACH_CLS_H
26using namespace db_mongoc;
43 FLTPT
Get(
const string& key);
49 void Set(
const string& key, FLTPT value);
61 vector<FLTPT> coor_x_;
62 vector<FLTPT> coor_y_;
69 map<string, FLTPT> param_map_;
73 vector<int> group_number_;
78 map<string, map<int, int> > group_index_;
137 vector<vector<int> > reach_up_streams_;
141 map<int, int> reach_down_stream_;
145 map<int, vector<int> > reach_layers_;
151 map<int, clsReach *> reaches_obj_;
156 map<string, FLTPT*> reaches_properties_;
Class to store parameter item information.
Base type of all interfaces.
Definition: basic.h:407
A simple wrapper of the class of MongoDB Client mongoc_client_t.
Definition: db_mongoc.h:46
Simple wrappers of the API of MongoDB C driver mongo-c-driver, see MongoDB C Driver for more informat...
void Update(map< string, ParamInfo< FLTPT > * > &caliparams_map, IntRaster *mask_raster)
Update reach/channel parameters according to calibration settings.
void Set(const string &key, FLTPT value)
Set parameters by name.
int GetGroupIndex(const string &method, int size)
Get group index.
map< int, vector< int > > & GetReachLayers()
Get map of reach layers.
Definition: clsReach.h:122
void DerivedParameters()
Calculate derived parameters after updating the input parameters.
map< int, int > & GetDownStreamID()
Get downstream ID.
Definition: clsReach.h:119
clsReach(const bson_t *&bson_table)
Constructor.
FLTPT Get(const string &key)
Get parameters by name.
clsReaches(MongoClient *conn, const string &db_name, const string &collection_name, LayeringMethod mtd=UP_DOWN)
Constructor, query reach table from MongoDB.
void SetPositions(IntRaster *mask_raster)
Set positions according to MASK data.
void GetReachesSingleProperty(const string &key, FLTPT **data)
Get 1D array of reach property.
int GetReachNumber() const
Get reach number.
Definition: clsReach.h:106
vector< vector< int > > & GetUpStreamIDs()
Get upstream IDs.
Definition: clsReach.h:116
clsReach * GetReachByID(int id)
Get single reach information by subbasin ID (1 ~ N)
Class to store and manage parameter information from the parameter database.
Definition: ParamInfo.h:37
Class to store reach related parameters from REACHES table.
Definition: clsReach.h:34
Read and store all reaches information as input parameters.
Definition: clsReach.h:88
LayeringMethod
Grid layering method for routing and parallel computing.
Definition: seims.h:25
Common Cross-platform Geographic Library (CCGL)
The SEIMS related definitions and utilities header.
#define IntRaster
Integer-typed raster.
Definition: seims.h:126
@ UP_DOWN
layering-from-source method, default
Definition: seims.h:26