LibCorr3D 2.2
All Classes Namespaces Files Functions
Public Member Functions | List of all members
geotess::LibCorr3DModel Class Reference

This is a LibCorr3D extension of the GeoTessModel for use by LibCorr3D. More...

#include <LibCorr3DModel.h>

Inheritance diagram for geotess::LibCorr3DModel:

Public Member Functions

 LibCorr3DModel (const string &filename, const string &relGridFilePath, vector< int > &attributeFilter, int handle)
 Standard constructor. More...
 
 LibCorr3DModel (const string &filename, const string &relGridFilePath="", int handle=-1)
 Standard constructor. More...
 
virtual ~LibCorr3DModel ()
 Destructor. More...
 
virtual string class_name ()
 Returns the class name. More...
 
const string & getBaseModel () const
 
const string & getBaseModelVersion () const
 
const string & getComments () const
 
double getDeasts () const
 
double getDnorth () const
 
const string & getFileName () const
 Return the file name string associated with this model. More...
 
int getHandle () const
 Return the handle associated with this model. More...
 
virtual LONG_INT getMemory ()
 Return the amount of memory currently occupied by this LibCorr3DModel object NOT INCLUDING THE GRIDS. More...
 
const string & getParameters () const
 
const string & getPhase () const
 
const string & getRefsta () const
 
const string & getStaName () const
 
double getStationDepth () const
 
double getStationElevation () const
 
double getStationEndTime () const
 
double getStationLatitude () const
 
double getStationLongitude () const
 
const string & getStationName () const
 
const double * getStationPosition () const
 
double getStationStartTime () const
 
const string & getStaType () const
 
const string & getSupportedPhaseList () const
 
string getVmodel () const
 
double interpolate2DModelUncertainty (const double *pos)
 Calculates the old 2D model uncertainty if this model was loaded as such. More...
 
bool is3DModel ()
 Returns true if this model is a LibCorr3D model derived off of GeoTessModel. More...
 
bool operator!= (const GeoTessModel &other) const
 Return true if this and the input other model are not equal. More...
 
bool operator== (const GeoTessModel &m) const
 Return true if this and the input other model are equal. More...
 
void setBaseModel (const string &bm)
 
void setBaseModelVersion (const string &bmv)
 
void setComments (const string &com)
 
void setParameters (const string &par)
 
void setPhase (const string &ph)
 
void setStationInfo (const string &name, const double &ontime, const double &offtime, const double &lat, const double &lon, const double &depth, const string &staname, const string &statype, const string &refsta, const double &dnorth, const double &deast)
 Set station information. More...
 
void setSupportedPhaseList (const string &ph)
 Set the list of supported phases, formatted like this: Pg, Pn, P. More...
 
virtual string toString ()
 

Detailed Description

This is a LibCorr3D extension of the GeoTessModel for use by LibCorr3D.

Specific capabilities, beyond those of the base class, include acting as a metadata container for various additional descriptive strings, and to provide a home for the overloaded functions GeoTessModel::loadModelBinary(...) and GeoTessModel::loadExtraData(...) binary read functions.

Additionally, this derived model provides backward compatibility functions to load older LibCorr 2D models. These models are actually converted to a new GeoTess 3D representation on the fly so that none of the older interpolation functionality is required.

Constructor & Destructor Documentation

◆ LibCorr3DModel() [1/2]

geotess::LibCorr3DModel::LibCorr3DModel ( const string &  filename,
const string &  relGridFilePath = "",
int  handle = -1 
)

Standard constructor.

Parameters
filenameis the name of the file containing the model to be loaded which can be either a new LibCorr3D model (extended from GeoTessModel), or an older LibCorr2D model.
relGridFilePaththe relative path from the directory where the model resides to the directory where the tessellation grid file resides.
handleinteger index of this model. This value is not processed in any way by LibCorr3DModel. It is specified here, stored in internal private variable, and returned by getHandle() method.

◆ LibCorr3DModel() [2/2]

geotess::LibCorr3DModel::LibCorr3DModel ( const string &  filename,
const string &  relGridFilePath,
vector< int > &  attributeFilter,
int  handle 
)

Standard constructor.

Parameters
filenameis the name of the file containing the model to be loaded which can be either a new LibCorr3D model (extended from GeoTessModel), or an older LibCorr2D model.
relGridFilePaththe relative path from the directory where the model resides to the directory where the tessellation grid file resides.
attributeFilterthe indexes of the attributes in the model file that should be loaded into memory. Used to load into memory only a subset of all the attributes available in the model file. By default, all attributes are loaded.
handleinteger index of this model. This value is not processed in any way by LibCorr3DModel. It is specified here, stored in internal private variable, and returned by getHandle() method.

◆ ~LibCorr3DModel()

virtual geotess::LibCorr3DModel::~LibCorr3DModel ( )
virtual

Destructor.

Member Function Documentation

◆ class_name()

virtual string geotess::LibCorr3DModel::class_name ( )
inlinevirtual

Returns the class name.

◆ getBaseModel()

const string & geotess::LibCorr3DModel::getBaseModel ( ) const
inline
Returns
base model string.

◆ getBaseModelVersion()

const string & geotess::LibCorr3DModel::getBaseModelVersion ( ) const
inline
Returns
base model version string.

◆ getComments()

const string & geotess::LibCorr3DModel::getComments ( ) const
inline
Returns
model comments string.

◆ getDeasts()

double geotess::LibCorr3DModel::getDeasts ( ) const
inline
Returns
dnorth (km).

◆ getDnorth()

double geotess::LibCorr3DModel::getDnorth ( ) const
inline
Returns
dnorth (km).

◆ getFileName()

const string & geotess::LibCorr3DModel::getFileName ( ) const
inline

Return the file name string associated with this model.

Returns
the file name string associated with this model.

◆ getHandle()

int geotess::LibCorr3DModel::getHandle ( ) const
inline

Return the handle associated with this model.

This value is not processed in any way by LibCorr3DModel. It is specified in the constructore, stored in an internal private variable, and returned by this method.

Returns
handle

◆ getMemory()

virtual LONG_INT geotess::LibCorr3DModel::getMemory ( )
inlinevirtual

Return the amount of memory currently occupied by this LibCorr3DModel object NOT INCLUDING THE GRIDS.

To retrieve the size of the LibCorr3DGrid call model.getGrid().getMemory(). Note that multiple LibCorr3DModels may reference the same LibCorr3DGrid object so if you are working with multiple models and they might be sharing references to the same grids then the best way to find the memory requirements of the set of LibCorr3DGrid objects currently in use is to call the static method GeoTessModel::getReuseGridMapMemory().

Returns
memory in bytes.

◆ getParameters()

const string & geotess::LibCorr3DModel::getParameters ( ) const
inline
Returns
model parameters string.

◆ getPhase()

const string & geotess::LibCorr3DModel::getPhase ( ) const
inline
Returns
the phase string that was stored in the model file.

◆ getRefsta()

const string & geotess::LibCorr3DModel::getRefsta ( ) const
inline
Returns
refsta. For old 2D models, refsta is assumed equal to sta.

◆ getStaName()

const string & geotess::LibCorr3DModel::getStaName ( ) const
inline
Returns
descriptive information about the station

◆ getStationDepth()

double geotess::LibCorr3DModel::getStationDepth ( ) const
inline
Returns
station depth below sea level (km).

◆ getStationElevation()

double geotess::LibCorr3DModel::getStationElevation ( ) const
inline
Returns
station elevation above sea level (km).

◆ getStationEndTime()

double geotess::LibCorr3DModel::getStationEndTime ( ) const
inline
Returns
station end time (epoch seconds).

◆ getStationLatitude()

double geotess::LibCorr3DModel::getStationLatitude ( ) const
inline
Returns
station latitude (degrees).

◆ getStationLongitude()

double geotess::LibCorr3DModel::getStationLongitude ( ) const
inline
Returns
station longitude (degrees).

◆ getStationName()

const string & geotess::LibCorr3DModel::getStationName ( ) const
inline
Returns
station name.

◆ getStationPosition()

const double * geotess::LibCorr3DModel::getStationPosition ( ) const
inline
Returns
the location of the station as a unit vector.

◆ getStationStartTime()

double geotess::LibCorr3DModel::getStationStartTime ( ) const
inline
Returns
station start time (epoch seconds).

◆ getStaType()

const string & geotess::LibCorr3DModel::getStaType ( ) const
inline
Returns
staType. Either single station (ss) or array (ar)

◆ getSupportedPhaseList()

const string & geotess::LibCorr3DModel::getSupportedPhaseList ( ) const
inline
Returns
the list of supported phases.

◆ getVmodel()

string geotess::LibCorr3DModel::getVmodel ( ) const
inline

◆ interpolate2DModelUncertainty()

double geotess::LibCorr3DModel::interpolate2DModelUncertainty ( const double *  pos)

Calculates the old 2D model uncertainty if this model was loaded as such.

This function is not called if is3DModel() is true.

Parameters
posa 3-element array of doubles defining the unit vector that defines the geographic position where the uncertainty is to be evaluated.

◆ is3DModel()

bool geotess::LibCorr3DModel::is3DModel ( )
inline

Returns true if this model is a LibCorr3D model derived off of GeoTessModel.

Returns false if this model is an older LibCorr2D model.

Returns
true if this model is a LibCorr3D model derived off of GeoTessModel. Returns false if this model is an older LibCorr2D model.

◆ operator!=()

bool geotess::LibCorr3DModel::operator!= ( const GeoTessModel &  other) const
inline

Return true if this and the input other model are not equal.

◆ operator==()

bool geotess::LibCorr3DModel::operator== ( const GeoTessModel &  m) const

Return true if this and the input other model are equal.

◆ setBaseModel()

void geotess::LibCorr3DModel::setBaseModel ( const string &  bm)
inline

◆ setBaseModelVersion()

void geotess::LibCorr3DModel::setBaseModelVersion ( const string &  bmv)
inline

◆ setComments()

void geotess::LibCorr3DModel::setComments ( const string &  com)
inline

◆ setParameters()

void geotess::LibCorr3DModel::setParameters ( const string &  par)
inline

◆ setPhase()

void geotess::LibCorr3DModel::setPhase ( const string &  ph)
inline

◆ setStationInfo()

void geotess::LibCorr3DModel::setStationInfo ( const string &  name,
const double &  ontime,
const double &  offtime,
const double &  lat,
const double &  lon,
const double &  depth,
const string &  staname,
const string &  statype,
const string &  refsta,
const double &  dnorth,
const double &  deast 
)
inline

Set station information.

Parameters
namestation name
onTimeepoch time when station became active
offTimeepoch time when station ceased to be active
latlatitude in degrees
lonlongitude in degrees
depthdepth of station below surface of ellipsoid in km (negative elevation) @paraam staname descriptive name of the station
statypesingle station (ss) or array (ar)
refstareference station for arrays
dnorthnorthing from station to array beam point in km
deasteasting from station to array beam point in km

◆ setSupportedPhaseList()

void geotess::LibCorr3DModel::setSupportedPhaseList ( const string &  ph)
inline

Set the list of supported phases, formatted like this: Pg, Pn, P.

◆ toString()

virtual string geotess::LibCorr3DModel::toString ( )
virtual

The documentation for this class was generated from the following file: