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 bool | insertValue (const Coord &coordinates, const Bathymetry &bathymetry_value) |
virtual double | getValue (const Coord &coords) const |
virtual bool | finalizeConnection () |
void | setGebcoType (const GEBCO_BATHY_TYPE &type) |
GEBCO_BATHY_TYPE | getGebcoType () |
Public Member Functions inherited from woss::WossNetcdfDb | |
WossNetcdfDb (const ::std::string &name) | |
virtual bool | openConnection () |
virtual bool | closeConnection () |
Public Member Functions inherited from woss::WossDb | |
WossDb (const ::std::string &name) | |
void | setDbName (const ::std::string &pathname) |
::std::string | getDbName () const |
void | setDebug (double flag=true) |
bool | isUsingDebug () const |
virtual bool | isValid () |
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) |
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 | |
netCDF::NcFile * | netcdf_db |
NcFile * | netcdf_db |
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 |
References woss::GEBCO_2D_30_SECONDS_BATHY_TYPE.
|
virtual |
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.
|
virtual |
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.
|
virtual |
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.
Referenced by woss::BathyGebcoDbCreator::createWossDb().
|
protected |
NetCDF bathymetry variable
Referenced by finalizeConnection(), and getValue().
|
protected |
GEBCO version in use
Referenced by finalizeConnection(), get1DBathyIndex(), get2DBathyIndexes(), getGebcoType(), getValue(), and setGebcoType().
|
protected |
NetCDF latitude variable
Referenced by finalizeConnection(), and getValue().
|
protected |
NetCDF longitude variable
Referenced by finalizeConnection(), and getValue().