|
World Ocean Simulation System (WOSS) library
|
NetCDF specialization of WossNetcdfDb for GEBCO database. More...
#include <bathymetry-gebco-db.h>


Public Member Functions | |
| BathyGebcoDb (const std::string &name) | |
| virtual | ~BathyGebcoDb () override=default |
| virtual bool | insertValue (const Coord &coordinates, const Bathymetry &bathymetry_value) override |
| virtual Bathymetry | getValue (const Coord &coords) const override |
| virtual bool | finalizeConnection () override |
| void | setGebcoType (const GEBCO_BATHY_TYPE &type) |
| GEBCO_BATHY_TYPE | getGebcoType () const |
Public Member Functions inherited from woss::WossNetcdfDb | |
| WossNetcdfDb (const std::string &name) | |
| virtual | ~WossNetcdfDb () override |
| virtual bool | openConnection () override |
| virtual bool | closeConnection () override |
Public Member Functions inherited from woss::WossDb | |
| WossDb (const std::string &name) | |
| virtual | ~WossDb ()=default |
| void | setDbName (const std::string &pathname) |
| std::string | getDbName () const |
| void | setDebug (double flag=true) |
| bool | isUsingDebug () const |
| virtual bool | isValid () const |
Public Member Functions inherited from woss::WossBathymetryDb | |
| WossBathymetryDb ()=default | |
| virtual | ~WossBathymetryDb ()=default |
Protected Member Functions | |
| long | get1DBathyIndex (const Coord &coords) const |
| Gebco2DIndexes | get2DBathyIndexes (const Coord &coords) const |
Protected Member Functions inherited from woss::WossDb | |
| PathName | getPathName (const std::string &complete_path) const |
Protected Attributes | |
| GEBCO_BATHY_TYPE | gebco_type |
| netCDF::NcVar | bathy_var |
| NcVar * | bathy_var |
| netCDF::NcVar | lat_var |
| NcVar * | lat_var |
| netCDF::NcVar | lon_var |
| NcVar * | lon_var |
Protected Attributes inherited from woss::WossNetcdfDb | |
| std::unique_ptr< netCDF::NcFile > | netcdf_db = nullptr |
| std::unique_ptr< NcFile > | netcdf_db = nullptr |
Protected Attributes inherited from woss::WossDb | |
| std::string | db_name |
| bool | debug |
NetCDF specialization of WossNetcdfDb for GEBCO database.
NetCDF specialization of WossNetcdfDb for GEBCO database. It creates a NetCDF variable used to get requested bathymetry values
| BathyGebcoDb::BathyGebcoDb | ( | const std::string & | name | ) |
BathyGebcoDb constructor
| name | pathname of database |
|
overridevirtualdefault |
|
overridevirtual |
Post openConnection() actions. It create and initializes a NetCDF variable
Implements woss::WossDb.
References bathy_var, woss::WossDb::debug, woss::GEBCO_1D_1_MINUTE_BATHY_TYPE, woss::GEBCO_1D_30_SECONDS_BATHY_TYPE, gebco_type, lat_var, lon_var, and woss::WossNetcdfDb::netcdf_db.
|
protected |
Returns the GEBCO 1D index corresponding the given coordinates. This index will be used to access the NetCDF variable and thus retrieving the bathymetry value
| coords | const reference to a valid Coord object |
References woss::WossDb::debug, woss::GEBCO_1D_1_MINUTE_BATHY_TYPE, woss::GEBCO_1D_30_SECONDS_BATHY_TYPE, gebco_type, woss::Coord::getLatitude(), and woss::Coord::getLongitude().
Referenced by getValue().

|
protected |
Returns the GEBCO 2D indexes corresponding the given coordinates. These indexes will be used to access the NetCDF variable and thus retrieving the bathymetry value
| coords | const reference to a valid Coord object |
References woss::WossDb::debug, woss::GEBCO_2D_15_SECONDS_BATHY_TYPE, woss::GEBCO_2D_1_MINUTE_BATHY_TYPE, woss::GEBCO_2D_30_SECONDS_BATHY_TYPE, gebco_type, woss::Coord::getLatitude(), and woss::Coord::getLongitude().
Referenced by getValue().

|
inline |
Returns which GEBCO version is in use #return GEBCO_BATHY_TYPE instance
References gebco_type.
|
overridevirtual |
Returns the positive depth value ( bathymetry ) of given coordinates, if present in the database. If given coordinates are on land ( original retrieved value is positive ) HUGE_VAL is returned.
| coords | const reference to a valid Coord object |
Implements woss::WossBathymetryDb.
References bathy_var, woss::WossDb::debug, woss::GEBCO_1D_1_MINUTE_BATHY_TYPE, woss::GEBCO_1D_30_SECONDS_BATHY_TYPE, woss::GEBCO_2D_15_SECONDS_BATHY_TYPE, woss::GEBCO_2D_1_MINUTE_BATHY_TYPE, woss::GEBCO_2D_30_SECONDS_BATHY_TYPE, gebco_type, get1DBathyIndex(), get2DBathyIndexes(), woss::Coord::getLatitude(), woss::Coord::getLongitude(), lat_var, and lon_var.

|
overridevirtual |
Inserts the given woss::Bathymetry value in the database for given coordinates
| coordinates | const reference to a valid Coord object |
| bathymetry_value | const reference to woss::Bathymetry value to be inserted |
Implements woss::WossBathymetryDb.
|
inline |
Notify the database which GEBCO version is in use
| type | GEBCO_BATHY_TYPE instance |
References gebco_type.
|
protected |
NetCDF bathymetry variable
Referenced by finalizeConnection(), and getValue().
|
protected |
|
protected |
GEBCO version in use
Referenced by finalizeConnection(), get1DBathyIndex(), get2DBathyIndexes(), getGebcoType(), getValue(), and setGebcoType().
|
protected |
NetCDF latitude variable
Referenced by finalizeConnection(), and getValue().
|
protected |
|
protected |
NetCDF longitude variable
Referenced by finalizeConnection(), and getValue().
|
protected |