DATRW++ library: seismic data I/O with multiple formats
|
Upon implementing new features update the version string datrw::libversion in aalibdatrwxx.cc
The library provides seismic data file reading and writing modules for several data formats. Functionality for all formats is provided through a common interface defined in classes datrw::idatstream and datrw::odatstream. All format specific classes are derived from these bases. The class datrw::ianystream has a same common interface like datrw::idatstream but provides an inheritance transparent constructor mechanism. The same is the case for datrw::oanystream and datrw:odatstream. Programs making use of datrw::ianystream and of datrw::oanystream for reading seismic data will directly benefit from each additional waveform format added to libdatrwxx without the need of changing the source code of the library. Just link against libdatrwxx and go...
Supported formats are listed on a separate page.
Each format specific module will be placed into its own namespace, like datrw::hpmo. There you will find specific functions like datrw::hpmo::readdata. The interface provided through these functions is specific to the data format. However, for each implemented format we provide a class derived from datrw::idatstream, like datrw::ihpmostream and one derived from datrw::odatstream, like datrw::osffstream. Being derived from a common base class all these format specific classes provide a common application programming interface (API). This interface handles data in terms of SFF (Stuttgart File Format) data elements (like INFO lines and FREE blocks). Thus the format specific input classes perform the conversion from the specific format to SFF header structures. Any data that does not fit into SFF, must be dropped or may be only passed via the FREE blocks. All SFF data elements not present in the specific format must be replaced by default values. Similarly the writing modules can only provide header values present in the SFF structures. Any additional header fields must be filled with default values.
datrw::idatstream behaves like an input stream for SFF data elements. Appropriate input operators are presented in namespace datrw. All derived classes and datrw::ianystream provide the same interface and operator set. datrw::ianystream is not derived from datrw::idatstream. It rather serves as a handle to any class derived from datrw::idatstream. Anyway datrw::ianystream provides the same interface. Consider to use datrw::sequentialtracereader instead of datrw::ianystream since it provides higher efficiency when reading several traces from the same file.
datrw::odatstream behaves like an output stream for SFF data elements. Appropriate output operators are presented in namespace datrw. All derived classes and datrw::oanystream provide the same interface and operator set. datrw::oanystream is not derived from datrw::odatstream. It rather serves as a handle to any class derived from datrw::odatstream. Anyway datrw::oanystream provides the same interface.
The library libfapidxx provides an API (application programming interface) in Fortran 77 which mimics the API of libsff. Through this API the full functionality of libdatrwxx can be accessed with only minor modifications being necessary for Fortran programs which already use libsff for seismic data input and output.