h5geo 0.4.0
C++17 and python API to work with geo-data (seismic, wells, maps, other in process) based on HDF5. Aimed at geoscientists and developers.
Loading...
Searching...
No Matches
h5geo Namespace Reference

Basic namespace. More...

Classes

struct  _ccwSorter
 The _ccwSorter struct Used to sort points in _ccw order about a pivot. More...
 
struct  BinHeader
 
struct  EnableBitMaskOperators
 
class  ObjectDeleter
 Deleter for all H5Base inherited objects. More...
 
struct  Point1
 X maybe length or time (depending on Domain) More...
 
struct  Point2
 X, Y are always length. More...
 
struct  Point3
 X, Y are always length, Z either length or time (depending on Domain) More...
 
struct  Point4
 
struct  TraceHeader
 

Typedefs

typedef std::underlying_type< ContainerType >::type ContainerTypeUType
 
typedef std::underlying_type< ObjectType >::type ObjectTypeUType
 
typedef std::underlying_type< Domain >::type DomainUType
 
typedef std::underlying_type< SeisDataType >::type SeisDataTypeUType
 
typedef std::underlying_type< SurveyType >::type SurveyTypeUType
 
typedef std::underlying_type< TextEncoding >::type TextEncodingUType
 
typedef std::underlying_type< Endian >::type EndianUType
 
typedef std::underlying_type< SegyFormat >::type SegyFormatUType
 
typedef std::underlying_type< WellDataType >::type WellDataTypeUType
 
typedef std::underlying_type< WellName >::type WellNameUType
 
typedef std::underlying_type< LogDataType >::type LogDataTypeUType
 
typedef std::underlying_type< DevDataType >::type DevDataTypeUType
 
typedef std::underlying_type< WellType >::type WellTypeUType
 
typedef std::underlying_type< TrajectoryFormat >::type TrajectoryFormatUType
 
typedef std::underlying_type< CreationType >::type CreationTypeUType
 
typedef std::underlying_type< CaseSensitivity >::type CaseSensitivityUType
 
typedef std::underlying_type< Delimiter >::type DelimiterUType
 
typedef struct h5geo::Point1 Point1
 X maybe length or time (depending on Domain)
 
typedef std::vector< h5geo::Point1Point1Array
 
typedef struct h5geo::Point2 Point2
 X, Y are always length.
 
typedef std::vector< h5geo::Point2Point2Array
 
typedef struct h5geo::Point3 Point3
 X, Y are always length, Z either length or time (depending on Domain)
 
typedef std::vector< h5geo::Point3Point3Array
 
typedef struct h5geo::Point4 Point4
 
typedef std::vector< h5geo::Point4Point4Array
 

Enumerations

enum class  ContainerType : unsigned { MAP = 1 , WELL = 2 , SEISMIC = 3 , VOLUME = 4 }
 
enum class  ObjectType : unsigned {
  MAP = 1 , WELL = 2 , LOGCURVE = 3 , DEVCURVE = 4 ,
  SEISMIC = 5 , VOLUME = 6 , POINTS_1 = 7 , POINTS_2 = 8 ,
  POINTS_3 = 9 , POINTS_4 = 10 , WELLTOPS = 11 , HORIZON = 12
}
 
enum class  Domain : unsigned { TVD = 1 , TVDSS = 2 , TWT = 4 , OWT = 8 }
 
enum class  SeisDataType : unsigned { STACK = 1 , PRESTACK = 2 }
 
enum class  SurveyType : unsigned { TWO_D = 1 , THREE_D = 2 }
 
enum class  TextEncoding : unsigned { ASCII = 1 , EBCDIC = 2 }
 
enum class  Endian : unsigned { Little = 1 , Big = 2 }
 
enum class  SegyFormat : unsigned { FourByte_IBM = 1 , FourByte_IEEE = 2 , FourByte_integer = 3 }
 
enum class  WellDataType : unsigned {
  WELL = 1 , DEV = 2 , LOG = 3 , INTERVAL_VEL = 4 ,
  AVG_VEL = 5 , RMS_VEL = 6 , FWAL = 7 , CHECKSHOTS = 8 ,
  WELL_TIE = 9
}
 
enum class  WellName : unsigned { FROM_LAS = 0 , FROM_FILE_NAME = 1 }
 
enum class  LogDataType : unsigned { MD = 1 , VAL = 2 }
 
enum class  DevDataType : unsigned {
  MD = 1 , X = 2 , Y = 3 , Z = 4 ,
  TVD = 5 , TVDSS = 6 , DX = 7 , DY = 8 ,
  AZIM = 9 , INCL = 10 , OWT = 11 , TWT = 12
}
 
enum class  WellType : unsigned {
  PROPOSED = 1 , DRY = 2 , OIL = 4 , GAS = 8 ,
  WATER = 16 , CONDENSATE = 32
}
 
enum class  TrajectoryFormat : unsigned {
  MD_AZIM_INCL = 1 , TVD_X_Y = 2 , TVD_DX_DY = 3 , TVDSS_X_Y = 4 ,
  TVDSS_DX_DY = 5
}
 
enum class  CreationType : unsigned {
  OPEN = 1 , CREATE = 2 , OPEN_OR_CREATE = 3 , CREATE_OR_OVERWRITE = 4 ,
  CREATE_UNDER_NEW_NAME = 5
}
 
enum class  CaseSensitivity : unsigned { CASE_SENSITIVE = 1 , CASE_INSENSITIVE = 2 }
 
enum class  Delimiter : unsigned {
  TABULATION = 1 , SEMICOLON = 2 , DOT = 4 , SPACE = 8 ,
  COMMA = 16
}
 

Functions

H5GEO_EXPORT H5BaseContainercreateContainer (h5gt::File h5File, h5geo::ContainerType cntType, h5geo::CreationType createFlag)
 Factory function for creating geo-container.
 
H5GEO_EXPORT H5BaseContainercreateContainerByName (std::string &fileName, h5geo::ContainerType cntType, h5geo::CreationType createFlag)
 Factory function for creating geo-container.
 
H5GEO_EXPORT H5MapContainercreateMapContainer (h5gt::File h5File, h5geo::CreationType createFlag)
 Factory function for creating H5MapContainer.
 
H5GEO_EXPORT H5MapContainercreateMapContainerByName (std::string &fileName, h5geo::CreationType createFlag)
 Factory function for creating H5MapContainer.
 
H5GEO_EXPORT H5SeisContainercreateSeisContainer (h5gt::File h5File, h5geo::CreationType createFlag)
 Factory function for creating H5SeisContainer.
 
H5GEO_EXPORT H5SeisContainercreateSeisContainerByName (std::string &fileName, h5geo::CreationType createFlag)
 Factory function for creating H5SeisContainer.
 
H5GEO_EXPORT H5VolContainercreateVolContainer (h5gt::File h5File, h5geo::CreationType createFlag)
 Factory function for creating H5VolContainer.
 
H5GEO_EXPORT H5VolContainercreateVolContainerByName (std::string &fileName, h5geo::CreationType createFlag)
 Factory function for creating H5VolContainer.
 
H5GEO_EXPORT H5WellContainercreateWellContainer (h5gt::File h5File, h5geo::CreationType createFlag)
 Factory function for creating H5WellContainer.
 
H5GEO_EXPORT H5WellContainercreateWellContainerByName (std::string &fileName, h5geo::CreationType createFlag)
 Factory function for creating H5WellContainer.
 
H5GEO_EXPORT H5BaseContaineropenContainer (h5gt::File h5File)
 Factory function for opening geo-container.
 
H5GEO_EXPORT H5BaseContaineropenContainerByName (const std::string &fileName)
 Factory function for opening geo-container.
 
H5GEO_EXPORT H5BaseContaineropenBaseContainer (h5gt::File h5File)
 Factory function for opening H5BaseContainer.
 
H5GEO_EXPORT H5BaseContaineropenBaseContainerByName (const std::string &fileName)
 Factory function for opening H5BaseContainer.
 
H5GEO_EXPORT H5SeisContaineropenSeisContainer (h5gt::File h5File)
 Factory function for opening H5SeisContainer.
 
H5GEO_EXPORT H5SeisContaineropenSeisContainerByName (const std::string &fileName)
 Factory function for opening H5SeisContainer.
 
H5GEO_EXPORT H5VolContaineropenVolContainer (h5gt::File h5File)
 Factory function for opening H5VolContainer.
 
H5GEO_EXPORT H5VolContaineropenVolContainerByName (const std::string &fileName)
 Factory function for opening H5VolContainer.
 
H5GEO_EXPORT H5MapContaineropenMapContainer (h5gt::File h5File)
 Factory function for opening H5MapContainer.
 
H5GEO_EXPORT H5MapContaineropenMapContainerByName (const std::string &fileName)
 Factory function for opening H5MapContainer.
 
H5GEO_EXPORT H5WellContaineropenWellContainer (h5gt::File h5File)
 Factory function for opening H5WellContainer.
 
H5GEO_EXPORT H5WellContaineropenWellContainerByName (const std::string &fileName)
 Factory function for opening H5WellContainer.
 
H5GEO_EXPORT bool isGeoContainer (h5gt::File file)
 Check if the container belongs to any geo-type.
 
H5GEO_EXPORT bool isGeoContainerByType (h5gt::File file, const h5geo::ContainerType &cntType)
 Check if the container belongs to any geo-type.
 
H5GEO_EXPORT h5geo::ContainerType getGeoContainerType (h5gt::File file)
 Get container geo-type.
 
H5GEO_EXPORT H5BaseObjectopenObject (h5gt::Group group)
 Factory function for opening geo-object.
 
H5GEO_EXPORT H5BaseObjectopenObjectByName (const std::string &fileName, const std::string &objName)
 Factory function for opening geo-object.
 
H5GEO_EXPORT H5BaseObjectopenBaseObject (h5gt::Group group)
 Factory function for opening H5BaseObject.
 
H5GEO_EXPORT H5BaseObjectopenBaseObjectByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5BaseObject.
 
H5GEO_EXPORT H5MapopenMap (h5gt::Group group)
 Factory function for opening H5Map.
 
H5GEO_EXPORT H5MapopenMapByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Map.
 
H5GEO_EXPORT H5SeisopenSeis (h5gt::Group group)
 Factory function for opening H5Seis.
 
H5GEO_EXPORT H5SeisopenSeisByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Seis.
 
H5GEO_EXPORT H5VolopenVol (h5gt::Group group)
 Factory function for opening H5Vol.
 
H5GEO_EXPORT H5VolopenVolByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Vol.
 
H5GEO_EXPORT H5WellopenWell (h5gt::Group group)
 Factory function for opening H5Well.
 
H5GEO_EXPORT H5WellopenWellByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Well.
 
H5GEO_EXPORT H5DevCurveopenDevCurve (h5gt::Group group)
 Factory function for opening H5DevCurve.
 
H5GEO_EXPORT H5DevCurveopenDevCurveByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5DevCurve.
 
H5GEO_EXPORT H5LogCurveopenLogCurve (h5gt::Group group)
 Factory function for opening H5LogCurve.
 
H5GEO_EXPORT H5LogCurveopenLogCurveByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5LogCurve.
 
H5GEO_EXPORT H5BasePointsopenPoints (h5gt::Group group)
 Factory function for opening H5BasePoints derived points.
 
H5GEO_EXPORT H5BasePointsopenPointsByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5BasePoints derived points.
 
H5GEO_EXPORT H5Points1openPoints1 (h5gt::Group group)
 Factory function for opening H5Points1.
 
H5GEO_EXPORT H5Points1openPoints1ByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Points1.
 
H5GEO_EXPORT H5Points2openPoints2 (h5gt::Group group)
 Factory function for opening H5Points2.
 
H5GEO_EXPORT H5Points2openPoints2ByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Points2.
 
H5GEO_EXPORT H5Points3openPoints3 (h5gt::Group group)
 Factory function for opening H5Points3.
 
H5GEO_EXPORT H5Points3openPoints3ByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Points3.
 
H5GEO_EXPORT H5Points4openPoints4 (h5gt::Group group)
 Factory function for opening H5Points4.
 
H5GEO_EXPORT H5Points4openPoints4ByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Points4.
 
H5GEO_EXPORT H5WellTopsopenWellTops (h5gt::Group group)
 Factory function for opening H5WellTops.
 
H5GEO_EXPORT H5WellTopsopenWellTopsByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5WellTops.
 
H5GEO_EXPORT H5HorizonopenHorizon (h5gt::Group group)
 Factory function for opening H5Horizon.
 
H5GEO_EXPORT H5HorizonopenHorizonByName (const std::string &fileName, const std::string &objName)
 Factory function for opening H5Horizon.
 
H5GEO_EXPORT bool isGeoObject (const h5gt::Group &group)
 Check if HDF5 object belongs to any geo-type.
 
H5GEO_EXPORT bool isGeoObjectByType (const h5gt::Group &group, const h5geo::ObjectType &objType)
 Check if HDF5 object belongs to specified geo-type.
 
H5GEO_EXPORT bool isHorizon (const h5gt::Group &group)
 Check if HDF5 object is H5Horizon.
 
H5GEO_EXPORT bool isPoints1 (const h5gt::Group &group)
 Check if HDF5 object is H5Points1.
 
H5GEO_EXPORT bool isPoints2 (const h5gt::Group &group)
 Check if HDF5 object is H5Points2.
 
H5GEO_EXPORT bool isPoints3 (const h5gt::Group &group)
 Check if HDF5 object is H5Points3.
 
H5GEO_EXPORT bool isPoints4 (const h5gt::Group &group)
 Check if HDF5 object is H5Points4.
 
H5GEO_EXPORT bool isWellTops (const h5gt::Group &group)
 Check if HDF5 object is H5WellTops.
 
H5GEO_EXPORT bool isPoints (const h5gt::Group &group)
 Check if HDF5 object belongs to any H5BasePoints derived type.
 
H5GEO_EXPORT bool isMap (const h5gt::Group &group)
 Check if HDF5 object is H5Map.
 
H5GEO_EXPORT bool isWell (const h5gt::Group &group)
 Check if HDF5 object is H5Well.
 
H5GEO_EXPORT bool isLogCurve (const h5gt::Group &group)
 Check if HDF5 object is H5LogCurve.
 
H5GEO_EXPORT bool isDevCurve (const h5gt::Group &group)
 Check if HDF5 object is H5DevCurve.
 
H5GEO_EXPORT bool isSeis (const h5gt::Group &group)
 Check if HDF5 object is H5Seis.
 
H5GEO_EXPORT bool isVol (const h5gt::Group &group)
 Check if HDF5 object is H5Vol.
 
H5GEO_EXPORT h5geo::ObjectType getGeoObjectType (const h5gt::Group &group)
 Get HDF5 object's geo-type.
 
template<typename Object , typename T , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value >::type * = nullptr>
bool _overwriteResizableDataset (Object &node, const std::string &datasetPath, T *M, size_t nH5Rows, size_t nH5Cols, const std::string &unitsFrom="", const std::string &unitsTo="")
 Resize and overwrite DataSet or create it if not exists.
 
template<typename Object , typename D , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value) &&std::is_arithmetic< typename D::Scalar >::value >::type * = nullptr>
bool overwriteResizableDataset (Object &node, const std::string &datasetPath, Eigen::DenseBase< D > &M, const std::string &unitsFrom="", const std::string &unitsTo="")
 Resize and overwrite DataSet or create it if not exists.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value) &&std::is_arithmetic< T >::value >::type * = nullptr>
bool overwriteResizableDataset (Object &node, const std::string &datasetPath, std::vector< T > &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Resize and overwrite DataSet or create it if not exists.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value) &&std::is_arithmetic< T >::value >::type * = nullptr>
bool overwriteResizableDataset (Object &node, const std::string &datasetPath, T &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Resize and overwrite DataSet or create it if not exists.
 
template<typename Object , typename T , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value >::type * = nullptr>
bool _overwriteDataset (Object &node, const std::string &datasetPath, T *M, size_t nH5Rows, size_t nH5Cols, const std::string &unitsFrom="", const std::string &unitsTo="")
 Create or overwrite DataSet.
 
template<typename Object , typename D , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value) &&std::is_arithmetic< typename D::Scalar >::value >::type * = nullptr>
bool overwriteDataset (Object &node, const std::string &datasetPath, Eigen::DenseBase< D > &M, const std::string &unitsFrom="", const std::string &unitsTo="")
 Create or overwrite DataSet.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value) &&std::is_arithmetic< T >::value >::type * = nullptr>
bool overwriteDataset (Object &node, const std::string &datasetPath, std::vector< T > &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Create or overwrite DataSet.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value) &&std::is_arithmetic< T >::value >::type * = nullptr>
bool overwriteDataset (Object &node, const std::string &datasetPath, T &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Create or overwrite DataSet.
 
template<typename Object , typename T , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value >::type * = nullptr>
bool _readDataset (Object &node, const std::string &datasetPath, T *M, size_t nElem, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from DataSet to buffer.
 
template<typename Object , typename D , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_arithmetic< typename D::Scalar >::value >::type * = nullptr>
bool readDataset (Object &node, const std::string &datasetPath, Eigen::DenseBase< D > &M, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from DataSet.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
Eigen::MatrixXf readFloatEigenMtxDataset (Object &node, const std::string &datasetPath, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from DataSet.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
Eigen::MatrixXd readDoubleEigenMtxDataset (Object &node, const std::string &datasetPath, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from DataSet.
 
template<typename Object , typename T , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
bool _readAttribute (Object &holder, const std::string &attrName, T *v, size_t nElem, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename D , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_arithmetic< typename D::Scalar >::value >::type * = nullptr>
bool readAttribute (Object &holder, const std::string &attrName, Eigen::DenseBase< D > &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_arithmetic< T >::value >::type * = nullptr>
bool readAttribute (Object &holder, const std::string &attrName, std::vector< T > &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_arithmetic< T >::value >::type * = nullptr>
bool readAttribute (Object &holder, const std::string &attrName, T &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename T , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
bool _overwriteAttribute (Object &holder, const std::string &attrName, T *v, size_t nElem, const std::string &unitsFrom="", const std::string &unitsTo="")
 Create or overwrite Attribute.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
bool overwriteAttribute (Object &holder, const std::string &attrName, const std::string &str)
 Create or overwrite Attribute.
 
template<typename Object , typename D , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_arithmetic< typename D::Scalar >::value >::type * = nullptr>
bool overwriteAttribute (Object &holder, const std::string &attrName, Eigen::DenseBase< D > &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Create or overwrite Attribute.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_arithmetic< T >::value >::type * = nullptr>
bool overwriteAttribute (Object &holder, const std::string &attrName, std::vector< T > &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Create or overwrite Attribute.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_arithmetic< T >::value >::type * = nullptr>
bool overwriteAttribute (Object &holder, const std::string &attrName, T &v, const std::string &unitsFrom="", const std::string &unitsTo="")
 Create or overwrite Attribute.
 
template<typename Object , typename T , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
bool _overwriteEnumAttribute (Object &holder, const std::string &attrName, T *v, size_t nElem)
 Create or overwrite registered enum Attribute.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_enum< T >::value >::type * = nullptr>
bool overwriteEnumAttribute (Object &holder, const std::string &attrName, T &v)
 Create or overwrite registered enum Attribute.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_enum< T >::value >::type * = nullptr>
bool overwriteEnumAttribute (Object &holder, const std::string &attrName, std::vector< T > &v)
 Create or overwrite registered enum Attribute.
 
template<typename Object , typename T , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
bool _readEnumAttribute (Object &holder, const std::string &attrName, T *v, size_t nElem)
 Read enum data from Attribute.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_enum< T >::value >::type * = nullptr>
readEnumAttribute (Object &object, const std::string &attrName)
 Read data from Attribute.
 
template<typename Object , typename T , typename std::enable_if<(std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value) &&std::is_enum< T >::value >::type * = nullptr>
std::vector< T > readEnumVecAttribute (Object &object, const std::string &attrName)
 Read data from Attribute.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
std::string readStringAttribute (Object &object, const std::string &attrName)
 Read enum data from Attribute.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
float readFloatAttribute (Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
double readDoubleAttribute (Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
std::vector< float > readFloatVecAttribute (Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
std::vector< double > readDoubleVecAttribute (Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
Eigen::VectorXf readFloatEigenVecAttribute (Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
Eigen::VectorXd readDoubleEigenVecAttribute (Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
 Read data from Attribute.
 
template<typename D >
bool writeDataToIndexedDataset (h5gt::DataSet &dataset, const std::string &attrName, const Eigen::DenseBase< D > &v, bool resize)
 writeDataToIndexedDataset Try to write vector to dataset with attribute where attribute is a single value reflecting row index of a corresponding dataset
 
template<typename T >
Eigen::VectorX< T > getDataFromIndexedDataset (h5gt::DataSet &dataset, const std::string &attrName)
 Get data from indexed DataSet.
 
H5GEO_EXPORT std::optional< h5gt::File > openFile (const std::string &fileName)
 
H5GEO_EXPORT std::optional< h5gt::Group > openGroup (const std::string &fileName, const std::string &groupName)
 
H5GEO_EXPORT std::optional< h5gt::DataSet > openDataSet (const std::string &fileName, const std::string &dsetName)
 
H5GEO_EXPORT std::vector< std::string > getRawBinHeaderNames ()
 
H5GEO_EXPORT std::vector< std::string > getRawTraceHeaderNames ()
 
H5GEO_EXPORT bool generatePRESTKGeometry (H5Seis *seis, double src_x0, double src_dx, size_t src_nx, double src_y0, double src_dy, size_t src_ny, double src_z, double rec_x0, double rec_dx, size_t rec_nx, double rec_y0, double rec_dy, size_t rec_ny, double rec_z, double orientation, bool moveRec)
 As the generated geometry may be pretty big we write it to H5Seis object without returning any data.
 
H5GEO_EXPORT std::map< std::string, Eigen::VectorXd > generateSTKGeometry (double x0, double dx, size_t nx, double y0, double dy, size_t ny, double z, double orientation)
 Convenient function to generate STACK geometry.
 
H5GEO_EXPORT bool compareStrings (const std::string &bigger, const std::string &smaller, const CaseSensitivity &caseSensitivity=CaseSensitivity::CASE_INSENSITIVE)
 compareStrings Return true if strings are equal.
 
H5GEO_EXPORT void eraseSubStr (std::string &mainStr, const std::string &toErase)
 eraseSubStr First Occurrence of given substring from main string.
 
H5GEO_EXPORT void eraseAllSubStr (std::string &mainStr, const std::string &toErase)
 eraseAllSubStr Erase all Occurrences of given substring from main string.
 
H5GEO_EXPORT char getDelimiter (const Delimiter &delimiter)
 
H5GEO_EXPORT std::string generateName (const std::vector< std::string > &nameList, std::string baseName=std::string())
 generateName generates unique name by adding "_i"
 
H5GEO_EXPORT std::vector< std::string > splitString (const std::string &s, const std::string delimiter)
 
H5GEO_EXPORT void splitHeaderNames (const std::vector< std::string > &headerNamesToSplit, std::vector< std::string > &fullHeaderNames, std::vector< std::string > &shortHeaderNames)
 
H5GEO_EXPORT void splitHeaderBytes (const std::vector< std::string > &headerNamesToSplit, std::vector< int > &bytesStart, std::vector< int > &nBytes)
 
H5GEO_EXPORT std::vector< std::string > splitPath (std::string path)
 splitPath Split path of type /path///to/where/things/happen// to output vector {"path", "to", "where", "things", "happen"}. Path that starts from / is treated as absolute
 
H5GEO_EXPORT std::vector< std::string > splitPath (std::string path, std::string &filteredPath)
 splitPath Split path of type /path///to/where/things/happen// to output vector {"path", "to", "where", "things", "happen"} and to filtered path /path/to/where/things/happen. Path that starts from / is treated as absolute
 
H5GEO_EXPORT std::string splitPathToParentAndObj (const std::string &path, std::string &objName)
 splitPathToParentAndObj Return path to parent and object name. E.g. if path = /a/s then it returns /a as path and s as object name. If path is empty or path = / then both output path and object name are empty strings.
 
H5GEO_EXPORT std::string getRelativePath (const std::string &referencePath, const std::string &objPath, const CaseSensitivity &caseSensitivity=CaseSensitivity::CASE_INSENSITIVE)
 
H5GEO_EXPORT void getTraceHeaderNames (std::vector< std::string > &fullHeaderNames, std::vector< std::string > &shortHeaderNames)
 
H5GEO_EXPORT std::vector< std::string > getTraceHeaderShortNames ()
 
H5GEO_EXPORT std::vector< std::string > getTraceHeaderFullNames ()
 
H5GEO_EXPORT void getBinHeaderNames (std::vector< std::string > &fullHeaderNames, std::vector< std::string > &shortHeaderNames)
 
H5GEO_EXPORT std::vector< std::string > getBinHeaderShortNames ()
 
H5GEO_EXPORT std::vector< std::string > getBinHeaderFullNames ()
 
H5GEO_EXPORT void getTraceHeaderBytes (std::vector< int > &bytesStart, std::vector< int > &nBytes)
 
H5GEO_EXPORT void getBinHeaderBytes (std::vector< int > &bytesStart, std::vector< int > &nBytes)
 
H5GEO_EXPORT size_t getTraceHeaderCount ()
 
H5GEO_EXPORT size_t getBinHeaderCount ()
 
H5GEO_EXPORT ptrdiff_t getIndexFromAttribute (h5gt::DataSet &dataset, const std::string &attrName)
 getIndexFromAttribute Get row/col from Datasets with attributes where attribute reflects the row/col index (like tables)
 
H5GEO_EXPORT bool getSurveyInfoFromSortedData (const Eigen::Ref< const Eigen::VectorXf > &il, const Eigen::Ref< const Eigen::VectorXf > &xl, const Eigen::Ref< const Eigen::VectorXf > &x, const Eigen::Ref< const Eigen::VectorXf > &y, double &origin_x, double &origin_y, double &orientation, double &ilSpacing, double &xlSpacing, bool &isILReversed, bool &isXLReversed, bool &isPlanReversed)
 getSurveyInfoFromSortedData It is assumed that il, xl, x, y are IL_XL sorted: ind=sort_rows(il_xl), il=il(ind,all).eval(), xl=xl(ind,all).eval(), x=x(ind,all).eval(), y=y(ind,all).eval()
 
H5GEO_EXPORT bool getSurveyInfoFromSortedData (const Eigen::Ref< const Eigen::VectorXd > &il, const Eigen::Ref< const Eigen::VectorXd > &xl, const Eigen::Ref< const Eigen::VectorXd > &x, const Eigen::Ref< const Eigen::VectorXd > &y, double &origin_x, double &origin_y, double &orientation, double &ilSpacing, double &xlSpacing, bool &isILReversed, bool &isXLReversed, bool &isPlanReversed)
 
H5GEO_EXPORT bool getSurveyInfoFromUnsortedData (Eigen::Ref< Eigen::MatrixXf > il_xl, Eigen::Ref< Eigen::VectorXf > x, Eigen::Ref< Eigen::VectorXf > y, double &origin_x, double &origin_y, double &orientation, double &ilSpacing, double &xlSpacing, bool &isILReversed, bool &isXLReversed, bool &isPlanReversed)
 
H5GEO_EXPORT bool getSurveyInfoFromUnsortedData (Eigen::Ref< Eigen::MatrixXd > il_xl, Eigen::Ref< Eigen::VectorXd > x, Eigen::Ref< Eigen::VectorXd > y, double &origin_x, double &origin_y, double &orientation, double &ilSpacing, double &xlSpacing, bool &isILReversed, bool &isXLReversed, bool &isPlanReversed)
 
H5GEO_EXPORT bool isStraightLine (const Eigen::Ref< const Eigen::VectorXf > &x, const Eigen::Ref< const Eigen::VectorXf > &y, float eps=std::numeric_limits< float >::epsilon())
 check if all points lay on the same straight line taken from here: https://helloacm.com/algorithm-to-check-if-all-points-are-on-the-same-line/
 
H5GEO_EXPORT bool isStraightLine (const Eigen::Ref< const Eigen::VectorXd > &x, const Eigen::Ref< const Eigen::VectorXd > &y, double eps=std::numeric_limits< double >::epsilon())
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * = nullptr>
bool deleteAllAttributes (Object &object)
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value >::type * = nullptr>
bool unlinkContent (Object &object)
 unlinkContent Unlink everything in group
 
template<typename T >
Eigen::VectorX< ptrdiff_t > find_index (Eigen::DenseBase< T > const &M)
 find_index find all non-zero elements's indexes. Possible usage: Eigen::VectorX<ptrdiff_t> ind = find_index(M.array() > 20) M.array() > 20 returns bool matrix and then we find non-zero indexes
 
template<typename D , typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
h5gt::ElementSet rowCols2ElementSet (const T &row, const Eigen::DenseBase< D > &cols)
 
template<typename D , typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
h5gt::ElementSet rowsCol2ElementSet (const Eigen::DenseBase< D > &rows, const T &col)
 
template<typename D >
h5gt::ElementSet rowsCols2ElementSet (const Eigen::DenseBase< D > &rows, const Eigen::DenseBase< D > &cols)
 rowsCols2ElementSet select rectilinear block of elements, i.e. uses double loop to select every possible row-col intersection
 
template<typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
h5gt::ElementSet rowCols2ElementSet (const T &row, const std::vector< T > &cols)
 
template<typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
h5gt::ElementSet rowsCol2ElementSet (const std::vector< T > &rows, const T &col)
 
template<typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
h5gt::ElementSet rowsCols2ElementSet (const std::vector< T > &rows, const std::vector< T > &cols)
 rowsCols2ElementSet select rectilinear block of elements, i.e. uses double loop to select every possible row-col intersection
 
template<class To , class From >
std::enable_if<(sizeof(To)==sizeof(From))&&std::is_trivially_copyable< From >::value &&std::is_trivial< To >::value, To >::type bit_cast (const From &src) noexcept
 
float ibm2ieee (const int &from)
 
unsigned char ebc_to_ascii_table (unsigned char ascii)
 
template<typename T >
bswap (T val)
 
template<typename Scalar , typename II , typename OI >
void bswap (II begin, II end, OI dest)
 
template<typename T >
to_big_endian (T val, h5geo::Endian fromEndian)
 
template<typename Scalar , typename II , typename OI >
void to_big_endian (II begin, II end, OI dest, h5geo::Endian fromEndian)
 
template<typename T >
to_little_endian (T val, h5geo::Endian fromEndian)
 
template<typename Scalar , typename II , typename OI >
void to_little_endian (II begin, II end, OI dest, h5geo::Endian fromEndian)
 
template<typename T >
to_native_endian (T val, h5geo::Endian fromEndian)
 
template<typename Scalar , typename II , typename OI >
void to_native_endian (II begin, II end, OI dest, h5geo::Endian fromEndian)
 
H5GEO_EXPORT bool isSEGY (const std::string &segy)
 
H5GEO_EXPORT TextEncoding getSEGYTextEncoding (const std::string &segy)
 
H5GEO_EXPORT Endian getSEGYEndian (const std::string &segy)
 
H5GEO_EXPORT SegyFormat getSEGYFormat (const std::string &segy, h5geo::Endian endian=static_cast< h5geo::Endian >(0))
 
H5GEO_EXPORT bool readSEGYTextHeader (const std::string &segy, char txtHdr[40][80], h5geo::TextEncoding encoding=static_cast< h5geo::TextEncoding >(0))
 
H5GEO_EXPORT bool writeSEGYTextHeader (const std::string &segy, char txtHdr[40][80], bool truncate)
 create new file or open existing SEGY
 
H5GEO_EXPORT bool readSEGYBinHeader (const std::string &segy, double binHdr[30], h5geo::Endian endian=static_cast< h5geo::Endian >(0))
 
H5GEO_EXPORT bool writeSEGYBinHeader (const std::string &segy, double binHdr[30], bool truncate, h5geo::Endian endian=h5geo::Endian::Big)
 create new file or open existing SEGY
 
H5GEO_EXPORT double getSEGYSampRate (const std::string &segy, h5geo::Endian endian=static_cast< h5geo::Endian >(0))
 
H5GEO_EXPORT size_t getSEGYNSamp (const std::string &segy, h5geo::Endian endian=static_cast< h5geo::Endian >(0))
 
H5GEO_EXPORT size_t getSEGYNTrc (const std::string &segy, size_t nSamp=0, h5geo::Endian endian=static_cast< h5geo::Endian >(0))
 
H5GEO_EXPORT Eigen::VectorX< ptrdiff_t > readSEGYTraceHeader (const std::string &segy, const size_t &hdrOffset, const size_t &hdrSize, size_t fromTrc=0, size_t toTrc=std::numeric_limits< size_t >::max(), size_t nSamp=0, size_t nTrc=0, h5geo::Endian endian=static_cast< h5geo::Endian >(0), std::function< void(double)> progressCallback=nullptr)
 readSEGYTraceHeader read selected header from all the traces (4 byte SEGY supported only)
 
H5GEO_EXPORT void readSEGYTrace (std::ifstream &file, size_t trcInd, h5geo::SegyFormat format, h5geo::Endian endian, Eigen::Ref< Eigen::VectorXf > trace)
 low level api. No any checks are done. User is responsible for that.
 
H5GEO_EXPORT bool writeSEGYTraces (const std::string &segy, Eigen::Ref< Eigen::MatrixXd > HDR, Eigen::Ref< Eigen::MatrixXf > TRACE, h5geo::Endian endian=h5geo::Endian::Big)
 writeSEGYTraces write traces and their headers to the end of SEGY file
 
H5GEO_EXPORT Eigen::MatrixXf readSEGYTraces (const std::string &segy, size_t fromSamp=0, size_t toSamp=std::numeric_limits< size_t >::max(), size_t fromTrc=0, size_t toTrc=std::numeric_limits< size_t >::max(), size_t nSamp=0, size_t nTrc=0, h5geo::SegyFormat format=static_cast< h5geo::SegyFormat >(0), h5geo::Endian endian=static_cast< h5geo::Endian >(0), std::function< void(double)> progressCallback=nullptr)
 readSEGYTraces read traces
 
H5GEO_EXPORT bool readSEGYTracesMMap (H5Seis *seis, const std::string &segy, bool appendTraces=false, size_t nSamp=0, size_t nTrc=0, h5geo::SegyFormat format=static_cast< h5geo::SegyFormat >(0), h5geo::Endian endian=static_cast< h5geo::Endian >(0), std::vector< std::string > trcHdrNames=std::vector< std::string >(), size_t trcBuffer=10000, int nThreads=-1, std::function< void(double)> progressCallback=nullptr)
 readSEGYTracesMMap read and write SEGY traces and trace headers to H5Seis object using Memory Mapping technique (OpenMP enabled)
 
H5GEO_EXPORT bool readSEGYTraces (H5Seis *seis, const std::string &segy, bool appendTraces=false, size_t nSamp=0, size_t nTrc=0, h5geo::SegyFormat format=static_cast< h5geo::SegyFormat >(0), h5geo::Endian endian=static_cast< h5geo::Endian >(0), std::vector< std::string > trcHdrNames=std::vector< std::string >(), size_t trcBuffer=10000, std::function< void(double)> progressCallback=nullptr)
 readSEGYTraces read and write SEGY traces and trace headers to H5Seis object using memory mapping technique (OpenMP enabled)
 
H5GEO_EXPORT bool readSEGYSTACK (H5Vol *vol, const std::string &segy, const size_t &ilHdrOffset, const size_t &ilHdrSize, const size_t &xlHdrOffset, const size_t &xlHdrSize, const size_t &xHdrOffset, const size_t &xHdrSize, const size_t &yHdrOffset, const size_t &yHdrSize, double sampRate, size_t nSamp=0, size_t nTrc=0, h5geo::SegyFormat format=static_cast< h5geo::SegyFormat >(0), h5geo::Endian endian=static_cast< h5geo::Endian >(0), std::function< void(double)> progressCallback=nullptr)
 Read SEGY STACK data, i.e. nTrc should be equal to nil*nxl. After reading origin, spacings, orientation, and angular units will be set.
 
template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value||std::is_same< Object, h5gt::DataSet >::value >::type * >
unsigned readEnumAttribute (Object &object, const std::string &attrName)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > MdAzIncl2ALL (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const std::string &angularUnitsFrom, const std::string &angularUnitsTo, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdXY2ALL (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const std::string &angularUnits, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdDxDy2ALL (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const std::string &angularUnits, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdssXY2ALL (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const std::string &angularUnits, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdssDxDy2ALL (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const std::string &angularUnits, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > traj2ALL (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const std::string &angularUnitsFrom, const std::string &angularUnitsTo, const h5geo::TrajectoryFormat &trajFormat, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > MdAzIncl2MdXYTvd (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const std::string &angularUnits, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdXY2MdXYTvd (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdDxDy2MdXYTvd (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdssXY2MdXYTvd (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdssDxDy2MdXYTvd (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdXY2MdAzIncl (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const std::string &angularUnits, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdDxDy2MdAzIncl (const Eigen::DenseBase< D > &M, const std::string &angularUnits, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdssXY2MdAzIncl (const Eigen::DenseBase< D > &M, const double &x0, const double &y0, const double &kb, const std::string &angularUnits, const bool &XNorth)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > TvdssDxDy2MdAzIncl (const Eigen::DenseBase< D > &M, const double &kb, const std::string &angularUnits, const bool &XNorth)
 
Eigen::VectorX< double > angleAndRadius (const double &arcLen, const double &chordLen, const double &eps, const size_t &max_iter)
 angleAndRadius Calculate angle and radius from arc and chord
 
double _betaAngle (double I1, double I2, double A1, double A2, const std::string &angularUnits)
 
double _ratioFactor (double B, const std::string &angularUnits)
 
double _deltaEast (const double &dMD, double I1, double I2, double A1, double A2, const double &RF, const std::string &angularUnits)
 
double _deltaNorth (const double &dMD, double I1, double I2, double A1, double A2, const double &RF, const std::string &angularUnits)
 
double _deltaZ (const double &dMD, double I1, double I2, const double &RF, const std::string &angularUnits)
 
double _dMDFromDeltaEast (const double &dE, double I1, double I2, double A1, double A2, const double &RF, const std::string &angularUnits)
 
double _dMDFromDeltaNorth (const double &dN, double I1, double I2, double A1, double A2, const double &RF, const std::string &angularUnits)
 
double _dMDFromDeltaZ (const double &dZ, double I1, double I2, const double &RF, const std::string &angularUnits)
 
double _fa (const double &arc, const double &chord, double a, const std::string &angularUnits)
 
double _dfa (const double &arc, const double &chord, double a, const std::string &angularUnits)
 
double _ddfa (const double &arc, double a, const std::string &angularUnits)
 
template<typename T1 , typename T2 >
T1 _ccw (const Eigen::Vector2< T1 > &a, const Eigen::Vector2< T1 > &b, const Eigen::MatrixBase< T2 > &c)
 _ccw The z-value of the cross product of segments (a, b) and (a, c). Positive means c is _ccw from (a, b), negative cw. Zero means its collinear.
 
template<typename T >
bool _isLeftOf (const Eigen::Vector2< T > &a, const Eigen::Vector2< T > &b)
 _isLeftOf Returns true if a is lexicographically before b.
 
template<typename T >
_segmentLen (const Eigen::Vector2< T > &a, const Eigen::Vector2< T > &b)
 _segmentLen The length of segment (a, b).
 
template<typename T1 , typename T2 >
T1 _segmentDist (const Eigen::Vector2< T1 > &a, const Eigen::Vector2< T1 > &b, const Eigen::MatrixBase< T2 > &p)
 _segmentDist The unsigned distance of p from segment (a, b).
 
template<typename T >
size_t _getFarthestInd (const Eigen::Vector2< T > &a, const Eigen::Vector2< T > &b, const std::vector< Eigen::Vector2< T > > &v)
 _getFarthestInd Returns the index of the farthest point from segment (a, b).
 
template<typename T1 , typename T2 >
size_t _getFarthestInd (const Eigen::Vector2< T1 > &a, const Eigen::Vector2< T1 > &b, const Eigen::MatrixX2< T2 > &v)
 
template<typename T >
std::vector< Eigen::Vector2< T > > giftWrapping (std::vector< Eigen::Vector2< T > > v)
 giftWrapping The gift-wrapping algorithm for convex hull. https://en.wikipedia.org/wiki/Gift_wrapping_algorithm
 
template<typename T >
std::vector< Eigen::Vector2< T > > GrahamScan (std::vector< Eigen::Vector2< T > > v)
 GrahamScan The Graham scan algorithm for convex hull. https://en.wikipedia.org/wiki/Graham_scan.
 
template<typename T >
std::vector< Eigen::Vector2< T > > monotoneChain (std::vector< Eigen::Vector2< T > > v)
 monotoneChain The monotone chain algorithm for convex hull.
 
template<typename T >
void quickHull2D (const std::vector< Eigen::Vector2< T > > &v, const Eigen::Vector2< T > &a, const Eigen::Vector2< T > &b, std::vector< Eigen::Vector2< T > > &hull)
 quickHull2D Recursive call of the quickHull2D algorithm.
 
template<typename T >
std::vector< Eigen::Vector2< T > > quickHull2D (const std::vector< Eigen::Vector2< T > > &v)
 quickHull2D Quick Hull 2D algorithm https://en.wikipedia.org/wiki/quickHull.
 
template<typename T >
void quickHull2D (const Eigen::MatrixX2< T > &v, const Eigen::Vector2< T > &a, const Eigen::Vector2< T > &b, Eigen::MatrixX2< T > &hull, ptrdiff_t &ih)
 quickHull2D Recursive call of the quickHull2D algorithm.
 
template<typename T >
Eigen::MatrixX2< T > quickHull2D (const Eigen::MatrixX2< T > &v)
 quickHull2D Quick Hull 2D algorithm https://en.wikipedia.org/wiki/quickHull.
 
h5gt::EnumType< ContainerTypeUType > create_enum_ContainerType ()
 
h5gt::EnumType< ObjectTypeUType > create_enum_ObjectType ()
 
h5gt::EnumType< DomainUType > create_enum_Domain ()
 
h5gt::EnumType< SeisDataTypeUType > create_enum_SeisDataType ()
 
h5gt::EnumType< SurveyTypeUType > create_enum_SurveyType ()
 
h5gt::EnumType< TextEncodingUType > create_enum_TextEncoding ()
 
h5gt::EnumType< EndianUType > create_enum_Endian ()
 
h5gt::EnumType< SegyFormatUType > create_enum_SegyFormat ()
 
h5gt::EnumType< WellDataTypeUType > create_enum_WellDataType ()
 
h5gt::EnumType< WellNameUType > create_enum_WellName ()
 
h5gt::EnumType< LogDataTypeUType > create_enum_LogDataType ()
 
h5gt::EnumType< DevDataTypeUType > create_enum_DevDataType ()
 
h5gt::EnumType< WellTypeUType > create_enum_WellType ()
 
h5gt::EnumType< TrajectoryFormatUType > create_enum_TrajectoryFormat ()
 
h5gt::EnumType< CreationTypeUType > create_enum_CreationType ()
 
h5gt::EnumType< CaseSensitivityUType > create_enum_CaseSensitivity ()
 
 ENABLE_BITMASK_OPERATORS (Delimiter)
 
h5gt::EnumType< DelimiterUType > create_enum_Delimiter ()
 
template<typename Enum >
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator| (Enum lhs, Enum rhs)
 
template<typename Enum >
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator& (Enum lhs, Enum rhs)
 
template<typename Enum >
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator^ (Enum lhs, Enum rhs)
 
template<typename Enum >
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator~ (Enum rhs)
 
template<typename Enum >
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator|= (Enum &lhs, Enum rhs)
 
template<typename Enum >
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator&= (Enum &lhs, Enum rhs)
 
template<typename Enum >
std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator^= (Enum &lhs, Enum rhs)
 
template<typename D >
Eigen::VectorX< typename D::Scalar > interp1Monotonic (const Eigen::DenseBase< D > &x, const Eigen::DenseBase< D > &y, const Eigen::DenseBase< D > &xnew, typename D::Scalar extrapVal)
 1D interpolation for
 
h5gt::CompoundType create_compound_Point1 ()
 
h5gt::CompoundType create_compound_Point2 ()
 
h5gt::CompoundType create_compound_Point3 ()
 
h5gt::CompoundType create_compound_Point4 ()
 
template<typename D >
Eigen::VectorX< typename D::Scalar > polyfit (const Eigen::DenseBase< D > &x, const Eigen::DenseBase< D > &y, int order)
 
template<typename D >
Eigen::MatrixX< typename D::Scalar > polyval (const Eigen::DenseBase< D > &coeffs, const Eigen::DenseBase< D > &x)
 Evaluate a polynomial.
 
template<typename D >
Eigen::VectorX< ptrdiff_t > sort (const Eigen::DenseBase< D > &v)
 sort return indexes such that v_sorted = v(ind).
 
template<typename DRaw , typename DSort >
Eigen::VectorX< ptrdiff_t > sort (const Eigen::DenseBase< DRaw > &v, Eigen::DenseBase< DSort > const &v_sorted_)
 sort also calculates v_sorted_ = v(ind).
 
template<typename D >
Eigen::VectorX< ptrdiff_t > sort_rows (const Eigen::DenseBase< D > &M)
 sort_rows sorts the rows of a matrix in ascending order based on the elements in the first column. When the first column contains repeated elements, sortrows sorts according to the values in the next column and repeats this behavior for succeeding equal values. M_sorted = M(ind, Eigen::all)
 
template<typename DRaw , typename DSort >
Eigen::VectorX< ptrdiff_t > sort_rows (const Eigen::DenseBase< DRaw > &M, Eigen::DenseBase< DSort > &M_sorted_)
 sort_rows also calculates M_sorted = M(ind, Eigen::all).
 
template<typename DRaw , typename TUval >
Eigen::VectorX< ptrdiff_t > sort_unique (const Eigen::DenseBase< DRaw > &v, Eigen::VectorX< TUval > &uvals, Eigen::MatrixX2< ptrdiff_t > &uvals_from_size)
 sort_unique find unique elements, sort them, identify unique values start and end indexes and return indexes such that v_sorted = v(ind).
 
template<typename DRaw , typename TUval , typename DSort >
Eigen::VectorX< ptrdiff_t > sort_unique (const Eigen::DenseBase< DRaw > &v, Eigen::VectorX< TUval > &uvals, Eigen::MatrixX2< ptrdiff_t > &uvals_from_size, Eigen::DenseBase< DSort > const &v_sorted_)
 sort_unique also calculates v_sorted = v(ind).
 
template<typename DRaw , typename TUval >
Eigen::VectorX< ptrdiff_t > sort_rows_unique (const Eigen::DenseBase< DRaw > &M, Eigen::MatrixX< TUval > &urows, Eigen::MatrixX2< ptrdiff_t > &urows_from_size)
 sort_rows_unique find unique rows, sort them, identify unique rows start and end row-indexes and return row-indexes such that M_sorted = M(ind, Eigen::all).
 
template<typename DRaw , typename TUval , typename DSort >
Eigen::VectorX< ptrdiff_t > sort_rows_unique (const Eigen::DenseBase< DRaw > &M, Eigen::MatrixX< TUval > &urows, Eigen::MatrixX2< ptrdiff_t > &urows_from_size, const Eigen::DenseBase< DSort > &M_sorted_)
 sort_rows_unique also calculates M_sorted = M(ind, Eigen::all).
 
void calcGrid3D (const Eigen::Ref< Eigen::VectorXd > &x, const Eigen::Ref< Eigen::VectorXd > &y, double z, Eigen::VectorXd &x_loc, Eigen::VectorXd &y_loc, Eigen::VectorXd &z_loc)
 
template<typename Scalar >
bool _getSurveyInfoFromSortedData (const Eigen::Ref< const Eigen::VectorX< Scalar > > &il, const Eigen::Ref< const Eigen::VectorX< Scalar > > &xl, const Eigen::Ref< const Eigen::VectorX< Scalar > > &x, const Eigen::Ref< const Eigen::VectorX< Scalar > > &y, double &origin_x, double &origin_y, double &orientation, double &ilSpacing, double &xlSpacing, bool &isILReversed, bool &isXLReversed, bool &isPlanReversed)
 
template<typename Scalar >
bool _getSurveyInfoFromUnsortedData (Eigen::Ref< Eigen::MatrixX< Scalar > > il_xl, Eigen::Ref< Eigen::VectorX< Scalar > > x, Eigen::Ref< Eigen::VectorX< Scalar > > y, double &origin_x, double &origin_y, double &orientation, double &ilSpacing, double &xlSpacing, bool &isILReversed, bool &isXLReversed, bool &isPlanReversed)
 
template<typename Scalar >
bool _isStraightLine (const Eigen::Ref< const Eigen::VectorX< Scalar > > &x, const Eigen::Ref< const Eigen::VectorX< Scalar > > &y, Scalar eps)
 

Variables

constexpr auto & cnt_types
 
constexpr auto MAP = magic_enum::enum_name(h5geo::ContainerType::MAP)
 
constexpr auto WELL = magic_enum::enum_name(h5geo::ContainerType::WELL)
 
constexpr auto SEISMIC = magic_enum::enum_name(h5geo::ContainerType::SEISMIC)
 
constexpr auto & obj_types
 
constexpr auto LOGCURVE = magic_enum::enum_name(h5geo::ObjectType::LOGCURVE)
 
constexpr auto DEVCURVE = magic_enum::enum_name(h5geo::ObjectType::DEVCURVE)
 
constexpr auto WELLTOPS = magic_enum::enum_name(h5geo::ObjectType::WELLTOPS)
 
constexpr auto & domains
 
constexpr auto TVD = magic_enum::enum_name(h5geo::Domain::TVD)
 
constexpr auto TVDSS = magic_enum::enum_name(h5geo::Domain::TVDSS)
 
constexpr auto TWT = magic_enum::enum_name(h5geo::Domain::TWT)
 
constexpr auto OWT = magic_enum::enum_name(h5geo::Domain::OWT)
 
constexpr auto & seis_dtypes
 
constexpr auto STACK = magic_enum::enum_name(h5geo::SeisDataType::STACK)
 
constexpr auto PRESTACK = magic_enum::enum_name(h5geo::SeisDataType::PRESTACK)
 
constexpr auto & survey_types
 
constexpr auto TWO_D = magic_enum::enum_name(h5geo::SurveyType::TWO_D)
 
constexpr auto THREE_D = magic_enum::enum_name(h5geo::SurveyType::THREE_D)
 
constexpr auto & text_encodings
 
constexpr auto ASCII = magic_enum::enum_name(h5geo::TextEncoding::ASCII)
 
constexpr auto EBCDIC = magic_enum::enum_name(h5geo::TextEncoding::EBCDIC)
 
constexpr auto & segy_endians
 
constexpr auto Little = magic_enum::enum_name(h5geo::Endian::Little)
 
constexpr auto Big = magic_enum::enum_name(h5geo::Endian::Big)
 
constexpr auto & segy_formats
 
constexpr auto FourByte_IBM = magic_enum::enum_name(h5geo::SegyFormat::FourByte_IBM)
 
constexpr auto FourByte_IEEE = magic_enum::enum_name(h5geo::SegyFormat::FourByte_IEEE)
 
constexpr auto FourByte_integer = magic_enum::enum_name(h5geo::SegyFormat::FourByte_integer)
 
constexpr auto & well_dtypes
 
constexpr auto DEV = magic_enum::enum_name(h5geo::WellDataType::DEV)
 
constexpr auto LOG = magic_enum::enum_name(h5geo::WellDataType::LOG)
 
constexpr auto INTERVAL_VEL = magic_enum::enum_name(h5geo::WellDataType::INTERVAL_VEL)
 
constexpr auto AVG_VEL = magic_enum::enum_name(h5geo::WellDataType::AVG_VEL)
 
constexpr auto RMS_VEL = magic_enum::enum_name(h5geo::WellDataType::RMS_VEL)
 
constexpr auto FWAL = magic_enum::enum_name(h5geo::WellDataType::FWAL)
 
constexpr auto CHECKSHOTS = magic_enum::enum_name(h5geo::WellDataType::CHECKSHOTS)
 
constexpr auto WELL_TIE = magic_enum::enum_name(h5geo::WellDataType::WELL_TIE)
 
constexpr auto & dev_dtypes
 
constexpr auto MD = magic_enum::enum_name(h5geo::DevDataType::MD)
 
constexpr auto X = magic_enum::enum_name(h5geo::DevDataType::X)
 
constexpr auto Y = magic_enum::enum_name(h5geo::DevDataType::Y)
 
constexpr auto Z = magic_enum::enum_name(h5geo::DevDataType::Z)
 
constexpr auto DX = magic_enum::enum_name(h5geo::DevDataType::DX)
 
constexpr auto DY = magic_enum::enum_name(h5geo::DevDataType::DY)
 
constexpr auto AZIM = magic_enum::enum_name(h5geo::DevDataType::AZIM)
 
constexpr auto INCL = magic_enum::enum_name(h5geo::DevDataType::INCL)
 

Detailed Description

Basic namespace.

Typedef Documentation

◆ Point4

typedef struct h5geo::Point4 h5geo::Point4

X, Y are always length, Z either length or time (depending on Domain), VAL is in data units

Enumeration Type Documentation

◆ CreationType

enum class h5geo::CreationType : unsigned
strong
Enumerator
OPEN 

Open if exist

CREATE 

Create if not exist

OPEN_OR_CREATE 

Open if exist or Create New

CREATE_OR_OVERWRITE 

Create if not exist or Overwrite (Overwrite == delete existing and create new)

CREATE_UNDER_NEW_NAME 

Always create under New Unique Name

Function Documentation

◆ _ccw()

template<typename T1 , typename T2 >
T1 h5geo::_ccw ( const Eigen::Vector2< T1 > & a,
const Eigen::Vector2< T1 > & b,
const Eigen::MatrixBase< T2 > & c )

_ccw The z-value of the cross product of segments (a, b) and (a, c). Positive means c is _ccw from (a, b), negative cw. Zero means its collinear.

Parameters
a
b
c
Returns

◆ _getFarthestInd()

template<typename T >
size_t h5geo::_getFarthestInd ( const Eigen::Vector2< T > & a,
const Eigen::Vector2< T > & b,
const std::vector< Eigen::Vector2< T > > & v )

_getFarthestInd Returns the index of the farthest point from segment (a, b).

Parameters
a
b
v
Returns

◆ _isLeftOf()

template<typename T >
bool h5geo::_isLeftOf ( const Eigen::Vector2< T > & a,
const Eigen::Vector2< T > & b )

_isLeftOf Returns true if a is lexicographically before b.

Parameters
a
b
Returns

◆ _segmentDist()

template<typename T1 , typename T2 >
T1 h5geo::_segmentDist ( const Eigen::Vector2< T1 > & a,
const Eigen::Vector2< T1 > & b,
const Eigen::MatrixBase< T2 > & p )

_segmentDist The unsigned distance of p from segment (a, b).

Parameters
a
b
p
Returns

◆ _segmentLen()

template<typename T >
T h5geo::_segmentLen ( const Eigen::Vector2< T > & a,
const Eigen::Vector2< T > & b )

_segmentLen The length of segment (a, b).

Parameters
a
b
Returns

◆ angleAndRadius()

Eigen::VectorX< double > h5geo::angleAndRadius ( const double & arcLen,
const double & chordLen,
const double & eps,
const size_t & max_iter )
inline

angleAndRadius Calculate angle and radius from arc and chord

Parameters
arcLen
chordLen
eps
max_iter
Returns

◆ bswap()

template<typename Scalar , typename II , typename OI >
void h5geo::bswap ( II begin,
II end,
OI dest )
inline

if vin, vout vectors: bswap<T>(vin.begin(), vin.end(), vout.begin()) if b is C array: bswap<T>(std::begin(b), std::end(b), std::begin(b));

◆ compareStrings()

bool h5geo::compareStrings ( const std::string & bigger,
const std::string & smaller,
const CaseSensitivity & caseSensitivity = CaseSensitivity::CASE_INSENSITIVE )

compareStrings Return true if strings are equal.

Parameters
bigger
smaller
caseSensitivity
Returns

◆ createContainer()

H5BaseContainer * h5geo::createContainer ( h5gt::File h5File,
h5geo::ContainerType cntType,
h5geo::CreationType createFlag )

Factory function for creating geo-container.

Use dynamic_cast<> to cast it to specified h5geo::ContainerType

◆ createContainerByName()

H5BaseContainer * h5geo::createContainerByName ( std::string & fileName,
h5geo::ContainerType cntType,
h5geo::CreationType createFlag )

Factory function for creating geo-container.

Use dynamic_cast<> to cast it to specified h5geo::ContainerType

◆ eraseAllSubStr()

void h5geo::eraseAllSubStr ( std::string & mainStr,
const std::string & toErase )

eraseAllSubStr Erase all Occurrences of given substring from main string.

Parameters
mainStr
toErase

◆ eraseSubStr()

void h5geo::eraseSubStr ( std::string & mainStr,
const std::string & toErase )

eraseSubStr First Occurrence of given substring from main string.

Parameters
mainStr
toErase

◆ find_index()

template<typename T >
Eigen::VectorX< ptrdiff_t > h5geo::find_index ( Eigen::DenseBase< T > const & M)
inline

find_index find all non-zero elements's indexes. Possible usage: Eigen::VectorX<ptrdiff_t> ind = find_index(M.array() > 20) M.array() > 20 returns bool matrix and then we find non-zero indexes

Parameters
M
Returns
ind indexes of nonzero elements

◆ generateName()

std::string h5geo::generateName ( const std::vector< std::string > & nameList,
std::string baseName = std::string() )

generateName generates unique name by adding "_i"

Parameters
nameList
baseNameif empty then it will be replaced by "no_name"
Returns

◆ generatePRESTKGeometry()

bool h5geo::generatePRESTKGeometry ( H5Seis * seis,
double src_x0,
double src_dx,
size_t src_nx,
double src_y0,
double src_dy,
size_t src_ny,
double src_z,
double rec_x0,
double rec_dx,
size_t rec_nx,
double rec_y0,
double rec_dy,
size_t rec_ny,
double rec_z,
double orientation,
bool moveRec )

As the generated geometry may be pretty big we write it to H5Seis object without returning any data.

Parameters
src_x0
src_dx
src_nx
src_y0
src_dy
src_ny
src_z
rec_x0
rec_dx
rec_nx
rec_y0
rec_dy
rec_ny
rec_z
orientationcounter clock (radians)
moveRec
Returns

◆ generateSTKGeometry()

std::map< std::string, Eigen::VectorXd > h5geo::generateSTKGeometry ( double x0,
double dx,
size_t nx,
double y0,
double dy,
size_t ny,
double z,
double orientation )

Convenient function to generate STACK geometry.

Parameters
x0
dx
nx
y0
dy
ny
z
orientationcounter clock (radians)
Returns
IL-XL sorted headers (normal plan)

◆ getDataFromIndexedDataset()

template<typename T >
Eigen::VectorX< T > h5geo::getDataFromIndexedDataset ( h5gt::DataSet & dataset,
const std::string & attrName )
inline

Get data from indexed DataSet.

Indexed DataSet has attributes with names and values telling what
rows/cols are responsible for storing data (like tables)

◆ getIndexFromAttribute()

ptrdiff_t h5geo::getIndexFromAttribute ( h5gt::DataSet & dataset,
const std::string & attrName )

getIndexFromAttribute Get row/col from Datasets with attributes where attribute reflects the row/col index (like tables)

Parameters
dataset
attrName
Returns

◆ getSurveyInfoFromSortedData()

bool h5geo::getSurveyInfoFromSortedData ( const Eigen::Ref< const Eigen::VectorXf > & il,
const Eigen::Ref< const Eigen::VectorXf > & xl,
const Eigen::Ref< const Eigen::VectorXf > & x,
const Eigen::Ref< const Eigen::VectorXf > & y,
double & origin_x,
double & origin_y,
double & orientation,
double & ilSpacing,
double & xlSpacing,
bool & isILReversed,
bool & isXLReversed,
bool & isPlanReversed )

getSurveyInfoFromSortedData It is assumed that il, xl, x, y are IL_XL sorted: ind=sort_rows(il_xl), il=il(ind,all).eval(), xl=xl(ind,all).eval(), x=x(ind,all).eval(), y=y(ind,all).eval()

Parameters
ilvector of inlines
xlvector of xlines
xvector of x-coord
yvector of y-coord
origin_xout origin x-coord
origin_yout origin y-coord
orientationout orientation (counterclock angle, degree)
ilSpacingout spacing ALONG inline (i.e. distance between two adjoint xlines)
xlSpacingout spacing ALONG xline (i.e. distance between two adjoint inlines)
isILReversedout true if inline grows while X or Y axis decrease
isXLReversedout true if xline grows while X or Y axis decrease
isPlanReversedout true if orientation to IL bigger than orientation to XL

NORMAL PLANS

Normal plans always have orientation to p2 bigger than orientation to p1

Note
o (origin) is always at [-x, -y] thus spacings are always positive

             XL_IL                         XLr_IL
  IL p2+ + + + + + + + + +      IL + + + + + + + + + +p2
 (y) + . . . . . . . . . +     (y) + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
(-y) o + + + + + + + + +p1    (-y) p1+ + + + + + + + + o
                        XL                            XL
     (-x)              (x)         (x)              (-x)

            XL_ILr                        XLr_ILr
  IL o + + + + + + + + +p1      IL p1+ + + + + + + + + o
(-y) + . . . . . . . . . +    (-y) + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
 (y) p2+ + + + + + + + + +     (y) + + + + + + + + + +p2
                        XL                            XL
     (-x)              (x)         (x)              (-x)

REVERSED PLANS

Plan is reversed when XL mostly lies on Y axis and IL on X axis


             XL_IL                         XLr_IL
  XL p1+ + + + + + + + + +      XL o + + + + + + + + +p2
 (y) + . . . . . . . . . +    (-y) + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
(-y) o + + + + + + + + +p2     (y) p1+ + + + + + + + + +
                        IL                            IL
     (-x)              (x)         (-x)              (x)

            XL_ILr                        XLr_ILr
  XL + + + + + + + + + +p1      XL p2+ + + + + + + + + o
 (y) + . . . . . . . . . +    (-y) + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
     + . . . . . . . . . +         + . . . . . . . . . +
(-y) p2+ + + + + + + + + o     (y) + + + + + + + + + +p1
                        IL                            IL
     (x)              (-x)         (x)              (-x)

◆ giftWrapping()

template<typename T >
std::vector< Eigen::Vector2< T > > h5geo::giftWrapping ( std::vector< Eigen::Vector2< T > > v)

giftWrapping The gift-wrapping algorithm for convex hull. https://en.wikipedia.org/wiki/Gift_wrapping_algorithm

Parameters
v
Returns

◆ GrahamScan()

template<typename T >
std::vector< Eigen::Vector2< T > > h5geo::GrahamScan ( std::vector< Eigen::Vector2< T > > v)

GrahamScan The Graham scan algorithm for convex hull. https://en.wikipedia.org/wiki/Graham_scan.

Parameters
v
Returns

◆ interp1Monotonic()

template<typename D >
Eigen::VectorX< typename D::Scalar > h5geo::interp1Monotonic ( const Eigen::DenseBase< D > & x,
const Eigen::DenseBase< D > & y,
const Eigen::DenseBase< D > & xnew,
typename D::Scalar extrapVal )

1D interpolation for

Parameters
xstrictly monotonic (either increasing or decreasing)
y
xnew
extrapolateif not then NAN will be used
Returns

◆ isStraightLine()

bool h5geo::isStraightLine ( const Eigen::Ref< const Eigen::VectorXf > & x,
const Eigen::Ref< const Eigen::VectorXf > & y,
float eps = std::numeric_limits<float>::epsilon() )

check if all points lay on the same straight line taken from here: https://helloacm.com/algorithm-to-check-if-all-points-are-on-the-same-line/

Parameters
x
y
epsepsilon
Returns

◆ monotoneChain()

template<typename T >
std::vector< Eigen::Vector2< T > > h5geo::monotoneChain ( std::vector< Eigen::Vector2< T > > v)

monotoneChain The monotone chain algorithm for convex hull.

Parameters
v
Returns

◆ openContainer()

H5BaseContainer * h5geo::openContainer ( h5gt::File h5File)

Factory function for opening geo-container.

Check if the file belongs to any H5BasContainer derived type and create appropriate object.
Use dynamic_cast<> to cast it to the correct type.

◆ openContainerByName()

H5BaseContainer * h5geo::openContainerByName ( const std::string & fileName)

Factory function for opening geo-container.

Check if the file belongs to any H5BasContainer derived type and create appropriate object.
Use dynamic_cast<> to cast it to the correct type.

◆ openObject()

H5BaseObject * h5geo::openObject ( h5gt::Group group)

Factory function for opening geo-object.

Check if HDF5 object belongs to any H5BaseObject derived type and create appropriate object.
Use dynamic_cast<> to cast it to the correct type.

◆ openObjectByName()

H5BaseObject * h5geo::openObjectByName ( const std::string & fileName,
const std::string & objName )

Factory function for opening geo-object.

Check if HDF5 object belongs to any H5BaseObject derived type and create appropriate object.
Use dynamic_cast<> to cast it to the correct type.

◆ quickHull2D() [1/4]

template<typename T >
Eigen::MatrixX2< T > h5geo::quickHull2D ( const Eigen::MatrixX2< T > & v)

quickHull2D Quick Hull 2D algorithm https://en.wikipedia.org/wiki/quickHull.

Parameters
v
Returns

◆ quickHull2D() [2/4]

template<typename T >
void h5geo::quickHull2D ( const Eigen::MatrixX2< T > & v,
const Eigen::Vector2< T > & a,
const Eigen::Vector2< T > & b,
Eigen::MatrixX2< T > & hull,
ptrdiff_t & ih )

quickHull2D Recursive call of the quickHull2D algorithm.

Parameters
v
a
b
hull
ih

◆ quickHull2D() [3/4]

template<typename T >
std::vector< Eigen::Vector2< T > > h5geo::quickHull2D ( const std::vector< Eigen::Vector2< T > > & v)

quickHull2D Quick Hull 2D algorithm https://en.wikipedia.org/wiki/quickHull.

Parameters
v
Returns

◆ quickHull2D() [4/4]

template<typename T >
void h5geo::quickHull2D ( const std::vector< Eigen::Vector2< T > > & v,
const Eigen::Vector2< T > & a,
const Eigen::Vector2< T > & b,
std::vector< Eigen::Vector2< T > > & hull )

quickHull2D Recursive call of the quickHull2D algorithm.

Parameters
v
a
b
hull

◆ readSEGYSTACK()

bool h5geo::readSEGYSTACK ( H5Vol * vol,
const std::string & segy,
const size_t & ilHdrOffset,
const size_t & ilHdrSize,
const size_t & xlHdrOffset,
const size_t & xlHdrSize,
const size_t & xHdrOffset,
const size_t & xHdrSize,
const size_t & yHdrOffset,
const size_t & yHdrSize,
double sampRate,
size_t nSamp = 0,
size_t nTrc = 0,
h5geo::SegyFormat format = static_cast<h5geo::SegyFormat>(0),
h5geo::Endian endian = static_cast<h5geo::Endian>(0),
std::function< void(double)> progressCallback = nullptr )

Read SEGY STACK data, i.e. nTrc should be equal to nil*nxl. After reading origin, spacings, orientation, and angular units will be set.

Parameters
vol
segy
ilHdrOffsetINLINE offset in bytes
ilHdrSizeINLINE size in bytes
xlHdrOffsetXLINE offset in bytes
xlHdrSizeXLINE size in bytes
xHdrOffsetX-coord offset in bytes
xHdrSizeX-coord size in bytes
yHdrOffsetY-coord offset in bytes
yHdrSizeY-coord size in bytes
sampRatesampling rate of SEGY file (must know the sign)
nSampnumber of samples in SEGY (if 0 then try automatically detect)
nTrcnumber of traces in SEGY (if 0 then try automatically detect)
formatSEGY format (ibm32, ieee32 or int4)
endianBig or Little
progressCallback
Returns

◆ readSEGYTrace()

void h5geo::readSEGYTrace ( std::ifstream & file,
size_t trcInd,
h5geo::SegyFormat format,
h5geo::Endian endian,
Eigen::Ref< Eigen::VectorXf > trace )

low level api. No any checks are done. User is responsible for that.

Parameters
fileopened binary stream
trcIndindex of trace to be read (must be < nTrc)
format
endian
tracevector where data is to be read
Note
size of trace must be prepared as there is no any resize within that function
Returns

◆ readSEGYTraceHeader()

Eigen::VectorX< ptrdiff_t > h5geo::readSEGYTraceHeader ( const std::string & segy,
const size_t & hdrOffset,
const size_t & hdrSize,
size_t fromTrc = 0,
size_t toTrc = std::numeric_limits<size_t>::max(),
size_t nSamp = 0,
size_t nTrc = 0,
h5geo::Endian endian = static_cast<h5geo::Endian>(0),
std::function< void(double)> progressCallback = nullptr )

readSEGYTraceHeader read selected header from all the traces (4 byte SEGY supported only)

Parameters
segypath to SEGY file
hdrOffsetin range [0, 238]
hdrSizeusually 2 or 4
fromTrcfirst trace to read
toTrclast trace to read
nSampnumber of samples in SEGY (if 0 then try automatically detect)
nTrcnumber of traces in SEGY (if 0 then try automatically detect)
endianBig or Little
progressCallbackcallback function of form void foo(double progress)
Returns

◆ readSEGYTraces() [1/2]

Eigen::MatrixXf h5geo::readSEGYTraces ( const std::string & segy,
size_t fromSamp = 0,
size_t toSamp = std::numeric_limits<size_t>::max(),
size_t fromTrc = 0,
size_t toTrc = std::numeric_limits<size_t>::max(),
size_t nSamp = 0,
size_t nTrc = 0,
h5geo::SegyFormat format = static_cast<h5geo::SegyFormat>(0),
h5geo::Endian endian = static_cast<h5geo::Endian>(0),
std::function< void(double)> progressCallback = nullptr )

readSEGYTraces read traces

Parameters
segypath to SEGY file
fromSampfirst sample to read
toSamplast sample to read
fromTrcfirst trace to read
toTrclast trace to read
nSampnumber of samples in SEGY (if 0 then try automatically detect)
nTrcnumber of traces in SEGY (if 0 then try automatically detect)
formatSEGY format (ibm32, ieee32 or int4)
endianBig or Little
progressCallbackcallback function of form void foo(double progress)
Returns

◆ readSEGYTraces() [2/2]

bool h5geo::readSEGYTraces ( H5Seis * seis,
const std::string & segy,
bool appendTraces = false,
size_t nSamp = 0,
size_t nTrc = 0,
h5geo::SegyFormat format = static_cast<h5geo::SegyFormat>(0),
h5geo::Endian endian = static_cast<h5geo::Endian>(0),
std::vector< std::string > trcHdrNames = std::vector<std::string>(),
size_t trcBuffer = 10000,
std::function< void(double)> progressCallback = nullptr )

readSEGYTraces read and write SEGY traces and trace headers to H5Seis object using memory mapping technique (OpenMP enabled)

Parameters
seis
segypath to SEGY file
appendTracesinstead of overwriting existing H5Seis traces it simply adds new traces at the end of array
nSampnumber of samples in SEGY (if 0 then try automatically detect)
nTrcnumber of traces in SEGY (if 0 then try automatically detect)
formatSEGY format (ibm32, ieee32 or int4)
endianBig or Little
trcHdrNamesuse only those defined in 'getTraceHeaderShortNames', but you can change their order thus fix probably messed up trace header bytes (empty to use defined in 'getTraceHeaderShortNames' func)
trcBuffernumber of traces per thread to read before writing them at once
progressCallbackcallback function of form void foo(double progress)
Returns

◆ readSEGYTracesMMap()

bool h5geo::readSEGYTracesMMap ( H5Seis * seis,
const std::string & segy,
bool appendTraces = false,
size_t nSamp = 0,
size_t nTrc = 0,
h5geo::SegyFormat format = static_cast<h5geo::SegyFormat>(0),
h5geo::Endian endian = static_cast<h5geo::Endian>(0),
std::vector< std::string > trcHdrNames = std::vector<std::string>(),
size_t trcBuffer = 10000,
int nThreads = -1,
std::function< void(double)> progressCallback = nullptr )

readSEGYTracesMMap read and write SEGY traces and trace headers to H5Seis object using Memory Mapping technique (OpenMP enabled)

Parameters
seis
segypath to SEGY file
appendTracesinstead of overwriting existing H5Seis traces it simply adds new traces at the end of array
nSampnumber of samples in SEGY (if 0 then try automatically detect)
nTrcnumber of traces in SEGY (if 0 then try automatically detect)
formatSEGY format (ibm32, ieee32 or int4)
endianBig or Little
trcHdrNamesuse only those defined in 'getTraceHeaderShortNames', but you can change their order thus fix probably messed up trace header bytes (empty to use defined in 'getTraceHeaderShortNames' func)
trcBuffernumber of traces per thread to read before writing them at once
nThreadsnumber of threads (to use all threads pass any number <1)
progressCallbackcallback function of form void foo(double progress)
Note
Memory Mappings works only if the SEGY file resides on the internal hardware
Returns

◆ rowsCols2ElementSet() [1/2]

template<typename D >
h5gt::ElementSet h5geo::rowsCols2ElementSet ( const Eigen::DenseBase< D > & rows,
const Eigen::DenseBase< D > & cols )
inline

rowsCols2ElementSet select rectilinear block of elements, i.e. uses double loop to select every possible row-col intersection

Parameters
rowsvector
colsvector
Returns

◆ rowsCols2ElementSet() [2/2]

template<typename T , typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
h5gt::ElementSet h5geo::rowsCols2ElementSet ( const std::vector< T > & rows,
const std::vector< T > & cols )
inline

rowsCols2ElementSet select rectilinear block of elements, i.e. uses double loop to select every possible row-col intersection

Parameters
rows
cols
Returns

◆ sort() [1/2]

template<typename D >
Eigen::VectorX< ptrdiff_t > h5geo::sort ( const Eigen::DenseBase< D > & v)

sort return indexes such that v_sorted = v(ind).

Parameters
vVector (row/col)
Returns
ind

◆ sort() [2/2]

template<typename DRaw , typename DSort >
Eigen::VectorX< ptrdiff_t > h5geo::sort ( const Eigen::DenseBase< DRaw > & v,
Eigen::DenseBase< DSort > const & v_sorted_ )

sort also calculates v_sorted_ = v(ind).

Parameters
vVector (row/col)
v_sorted_Vector (row/col). Fundamental types of v_sorted_ and v should be the same
Returns
ind

◆ sort_rows() [1/2]

template<typename D >
Eigen::VectorX< ptrdiff_t > h5geo::sort_rows ( const Eigen::DenseBase< D > & M)

sort_rows sorts the rows of a matrix in ascending order based on the elements in the first column. When the first column contains repeated elements, sortrows sorts according to the values in the next column and repeats this behavior for succeeding equal values. M_sorted = M(ind, Eigen::all)

Parameters
M
Returns
ind

◆ sort_rows() [2/2]

template<typename DRaw , typename DSort >
Eigen::VectorX< ptrdiff_t > h5geo::sort_rows ( const Eigen::DenseBase< DRaw > & M,
Eigen::DenseBase< DSort > & M_sorted_ )

sort_rows also calculates M_sorted = M(ind, Eigen::all).

Parameters
MMatrix wich rows should be sorted
M_sorted_Row-sorted matrix. Fundamental type of M_sorted_ should be same as M type
Returns
ind

◆ sort_rows_unique() [1/2]

template<typename DRaw , typename TUval >
Eigen::VectorX< ptrdiff_t > h5geo::sort_rows_unique ( const Eigen::DenseBase< DRaw > & M,
Eigen::MatrixX< TUval > & urows,
Eigen::MatrixX2< ptrdiff_t > & urows_from_size )

sort_rows_unique find unique rows, sort them, identify unique rows start and end row-indexes and return row-indexes such that M_sorted = M(ind, Eigen::all).

Parameters
M
urows
urows_from_sizefirst col - start index, second col - number of elements. Each row can be considered as: M_sorted.middleRows(urows_from_size.row(n)) gives the same unique value uval. Also: M_sorted.middleRows(urows_from_size.row(n)) = M(ind.segment(urows_from_size.row(n)))
Returns
ind

◆ sort_rows_unique() [2/2]

template<typename DRaw , typename TUval , typename DSort >
Eigen::VectorX< ptrdiff_t > h5geo::sort_rows_unique ( const Eigen::DenseBase< DRaw > & M,
Eigen::MatrixX< TUval > & urows,
Eigen::MatrixX2< ptrdiff_t > & urows_from_size,
const Eigen::DenseBase< DSort > & M_sorted_ )

sort_rows_unique also calculates M_sorted = M(ind, Eigen::all).

Parameters
M
urows
urows_from_size
M_sorted_
Returns
ind

◆ sort_unique() [1/2]

template<typename DRaw , typename TUval >
Eigen::VectorX< ptrdiff_t > h5geo::sort_unique ( const Eigen::DenseBase< DRaw > & v,
Eigen::VectorX< TUval > & uvals,
Eigen::MatrixX2< ptrdiff_t > & uvals_from_size )

sort_unique find unique elements, sort them, identify unique values start and end indexes and return indexes such that v_sorted = v(ind).

Parameters
vvector
uvals
uvals_from_sizefirst col - start index, second col - number of elements. Each row can be considered as v_sorted.segment(uvals_from_size.row(n)) gives the same unique value uval. Also v_sorted.segment(uvals_from_size.row(n)) = v(ind.segment(uvals_from_size.row(n)))
Returns
ind

◆ sort_unique() [2/2]

template<typename DRaw , typename TUval , typename DSort >
Eigen::VectorX< ptrdiff_t > h5geo::sort_unique ( const Eigen::DenseBase< DRaw > & v,
Eigen::VectorX< TUval > & uvals,
Eigen::MatrixX2< ptrdiff_t > & uvals_from_size,
Eigen::DenseBase< DSort > const & v_sorted_ )

sort_unique also calculates v_sorted = v(ind).

Parameters
vvector
uvals
uvals_from_size
v_sorted_
Returns
ind

◆ splitPath() [1/2]

std::vector< std::string > h5geo::splitPath ( std::string path)

splitPath Split path of type /path///to/where/things/happen// to output vector {"path", "to", "where", "things", "happen"}. Path that starts from / is treated as absolute

Parameters
path
Returns

◆ splitPath() [2/2]

std::vector< std::string > h5geo::splitPath ( std::string path,
std::string & filteredPath )

splitPath Split path of type /path///to/where/things/happen// to output vector {"path", "to", "where", "things", "happen"} and to filtered path /path/to/where/things/happen. Path that starts from / is treated as absolute

Parameters
path
filteredPath
Returns

◆ splitPathToParentAndObj()

std::string h5geo::splitPathToParentAndObj ( const std::string & path,
std::string & objName )

splitPathToParentAndObj Return path to parent and object name. E.g. if path = /a/s then it returns /a as path and s as object name. If path is empty or path = / then both output path and object name are empty strings.

Parameters
path
objName
Returns

◆ unlinkContent()

template<typename Object , typename std::enable_if< std::is_same< Object, h5gt::File >::value||std::is_same< Object, h5gt::Group >::value >::type * = nullptr>
bool h5geo::unlinkContent ( Object & object)
inline

unlinkContent Unlink everything in group

Returns

◆ writeDataToIndexedDataset()

template<typename D >
bool h5geo::writeDataToIndexedDataset ( h5gt::DataSet & dataset,
const std::string & attrName,
const Eigen::DenseBase< D > & v,
bool resize )
inline

writeDataToIndexedDataset Try to write vector to dataset with attribute where attribute is a single value reflecting row index of a corresponding dataset

Parameters
dataset
v
attrName
resizeresize if needed. Use it only for resizable dataset!
Returns

Write data to indexed DataSet

Indexed DataSet has attributes with names and values telling what
rows/cols are responsible for storing data (like tables)

◆ writeSEGYBinHeader()

bool h5geo::writeSEGYBinHeader ( const std::string & segy,
double binHdr[30],
bool truncate,
h5geo::Endian endian = h5geo::Endian::Big )

create new file or open existing SEGY

Parameters
segy
binHdr
truncatediscard the contents of the stream when opening file
Returns

◆ writeSEGYTextHeader()

bool h5geo::writeSEGYTextHeader ( const std::string & segy,
char txtHdr[40][80],
bool truncate )

create new file or open existing SEGY

Parameters
segy
txtHdr
truncatediscard the contents of the stream when opening file
Returns

◆ writeSEGYTraces()

bool h5geo::writeSEGYTraces ( const std::string & segy,
Eigen::Ref< Eigen::MatrixXd > HDR,
Eigen::Ref< Eigen::MatrixXf > TRACE,
h5geo::Endian endian = h5geo::Endian::Big )

writeSEGYTraces write traces and their headers to the end of SEGY file

Parameters
segypath to SEGY file
HDRone column per trace
TRACEone column per trace
Returns

Variable Documentation

◆ cnt_types

auto& h5geo::cnt_types
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::ContainerType>()

◆ dev_dtypes

auto& h5geo::dev_dtypes
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::DevDataType>()

◆ domains

auto& h5geo::domains
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::Domain>()

◆ obj_types

auto& h5geo::obj_types
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::ObjectType>()

◆ segy_endians

auto& h5geo::segy_endians
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::Endian>()

◆ segy_formats

auto& h5geo::segy_formats
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::SegyFormat>()

◆ seis_dtypes

auto& h5geo::seis_dtypes
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::SeisDataType>()

◆ survey_types

auto& h5geo::survey_types
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::SurveyType>()

◆ text_encodings

auto& h5geo::text_encodings
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::TextEncoding>()

◆ well_dtypes

auto& h5geo::well_dtypes
inlineconstexpr
Initial value:
=
magic_enum::enum_names<h5geo::WellDataType>()