OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
Static Public Member Functions | List of all members
OpenZGY::Impl::EnumMapper Class Reference

convert between internal and external data types. More...

Static Public Member Functions

static SampleDataType mapRawDataTypeToSampleDataType (InternalZGY::RawDataType)
 
static UnitDimension mapRawHorizontalDimensionToUnitDimension (InternalZGY::RawHorizontalDimension)
 
static UnitDimension mapRawVerticalDimensionToUnitDimension (InternalZGY::RawVerticalDimension)
 
static InternalZGY::RawDataType mapSampleDataTypeToRawDataType (SampleDataType)
 
static InternalZGY::RawHorizontalDimension mapUnitDimensionToRawHorizontalDimension (UnitDimension)
 
static InternalZGY::RawVerticalDimension mapUnitDimensionToRawVerticalDimension (UnitDimension)
 
static InternalZGY::ZgyInternalWriterArgs mapWriterArgs (const ZgyWriterArgs &)
 
static InternalZGY::LodAlgorithm mapDecimationTypeToLodAlgorithm (DecimationType value)
 
static std::vector< InternalZGY::LodAlgorithmmapDecimationTypeToLodAlgorithm (const std::vector< DecimationType > &values)
 

Detailed Description

convert between internal and external data types.

Member Function Documentation

◆ mapDecimationTypeToLodAlgorithm() [1/2]

std::vector< InternalZGY::LodAlgorithm > OpenZGY::Impl::EnumMapper::mapDecimationTypeToLodAlgorithm ( const std::vector< DecimationType > &  values)
static

See mapRawDataTypeToSampleType() for comments.

◆ mapDecimationTypeToLodAlgorithm() [2/2]

InternalZGY::LodAlgorithm OpenZGY::Impl::EnumMapper::mapDecimationTypeToLodAlgorithm ( DecimationType  value)
static

See mapRawDataTypeToSampleType() for comments.

◆ mapRawDataTypeToSampleDataType()

SampleDataType OpenZGY::Impl::EnumMapper::mapRawDataTypeToSampleDataType ( InternalZGY::RawDataType  value)
static

Map between enums used in the public API and the internal ones that might change without notice and might be used to define the actual numbers written to file.

As a general rule, if an invalid enum tag is encountered while converting from public to internal then this will throw an exceptiom because it would be a user error. When converting from internal to public the error is probably bad data encountered on the file. The mapping function might just return "unknown", leaving to the caller to decide whether this should be silently ignored.

◆ mapRawHorizontalDimensionToUnitDimension()

UnitDimension OpenZGY::Impl::EnumMapper::mapRawHorizontalDimensionToUnitDimension ( InternalZGY::RawHorizontalDimension  value)
static

See mapRawDataTypeToSampleType() for comments.

◆ mapRawVerticalDimensionToUnitDimension()

UnitDimension OpenZGY::Impl::EnumMapper::mapRawVerticalDimensionToUnitDimension ( InternalZGY::RawVerticalDimension  value)
static

See mapRawDataTypeToSampleType() for comments.

The distinction between TWT and OWT, which is stored on the file, is lost. To my knowledge there is no code that recognizes OWD in ZGY files anyway, so it is better to not expose this to the API.

◆ mapSampleDataTypeToRawDataType()

InternalZGY::RawDataType OpenZGY::Impl::EnumMapper::mapSampleDataTypeToRawDataType ( SampleDataType  value)
static

See mapRawDataTypeToSampleType() for comments.

◆ mapUnitDimensionToRawHorizontalDimension()

InternalZGY::RawHorizontalDimension OpenZGY::Impl::EnumMapper::mapUnitDimensionToRawHorizontalDimension ( UnitDimension  value)
static

See mapRawDataTypeToSampleType() for comments.

An explicit "unknown" is allowed, but passing e.g. "time" in this context (which is supposedly horozontal) will raise an exception.

◆ mapUnitDimensionToRawVerticalDimension()

InternalZGY::RawVerticalDimension OpenZGY::Impl::EnumMapper::mapUnitDimensionToRawVerticalDimension ( UnitDimension  value)
static

See mapRawDataTypeToSampleType() for comments.

An explicit "unknown" is allowed, but passing e.g. "arcangle" in this context (which is supposedly vertical) will raise an exception.


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