1.2.2
CCC
 
segy.h File Reference
#include "gstlearn_export.hpp"
#include "Basic/NamingConvention.hpp"
#include "geoslib_d.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>

Classes

struct  binaryFileHeader
 
struct  traceHead
 
struct  SegYArg
 

Enumerations

enum  ENUM_SEGY {
  SEGY_NUM = 0, SEGY_ILINE = 1, SEGY_XLINE = 2, SEGY_XTRACE = 3,
  SEGY_YTRACE = 4, SEGY_ZMIN = 5, SEGY_ZMAX = 6, SEGY_VMIN = 7,
  SEGY_VMAX = 8, SEGY_THICK = 9, SEGY_NB = 10, SEGY_AUXTOP = 11,
  SEGY_AUXBOT = 12, SEGY_COUNT = 13
}
 

Functions

GSTLEARN_EXPORT Grid segy_summary (const char *filesegy, DbGrid *surf2D=nullptr, const String &name_top="", const String &name_bot="", double thickmin=TEST, int option=0, int nz_ss=ITEST, int verbose=1, int iline_min=ITEST, int iline_max=ITEST, int xline_min=ITEST, int xline_max=ITEST, double modif_high=TEST, double modif_low=TEST, double modif_scale=TEST, int code=1)
 
GSTLEARN_EXPORT SegYArg segy_array (const char *filesegy, DbGrid *surf2D=nullptr, const String &name_top="", const String &name_bot="", const String &top_aux="", const String &bot_aux="", double thickmin=TEST, int option=0, int nz_ss=ITEST, int verbose=0, int iline_min=ITEST, int iline_max=ITEST, int xline_min=ITEST, int xline_max=ITEST, double modif_high=TEST, double modif_low=TEST, double modif_scale=TEST, int code=1)
 
GSTLEARN_EXPORT int db_segy (const char *filesegy, DbGrid *grid3D, DbGrid *surf2D=nullptr, const String &name_top="", const String &name_bot="", double thickmin=TEST, int option=0, int nz_ss=ITEST, int verbose=0, int iline_min=ITEST, int iline_max=ITEST, int xline_min=ITEST, int xline_max=ITEST, double modif_high=TEST, double modif_low=TEST, double modif_scale=TEST, int icode=1, const NamingConvention &namconv=NamingConvention("SEGY"))
 

Enumeration Type Documentation

enum ENUM_SEGY
Enumerator
SEGY_NUM 
SEGY_ILINE 
SEGY_XLINE 
SEGY_XTRACE 
SEGY_YTRACE 
SEGY_ZMIN 
SEGY_ZMAX 
SEGY_VMIN 
SEGY_VMAX 
SEGY_THICK 
SEGY_NB 
SEGY_AUXTOP 
SEGY_AUXBOT 
SEGY_COUNT 

Function Documentation

GSTLEARN_EXPORT int db_segy ( const char *  filesegy,
DbGrid grid3D,
DbGrid surf2D,
const String name_top,
const String name_bot,
double  thickmin,
int  option,
int  nz_ss,
int  verbOption,
int  iline_min,
int  iline_max,
int  xline_min,
int  xline_max,
double  modif_high,
double  modif_low,
double  modif_scale,
int  codefmt,
const NamingConvention namconv 
)

Read the contents of a SEGY file

Returns
Error return code
Parameters
[in]filesegyName of the SEGY file
[in]grid3DDb containing the resulting 3-D grid
[in]surf2DDb containing the top, Bottom and Reference surfaces This file is optional
[in]name_topRank of variable containing the Top Surface (or 0)
[in]name_botRank of variable containing the Bottom Surface (or 0)
[in]thickminMinimum thickness (or 0)
[in]optionFlattening option: 0 no flattening; 1 flattening from top; -1 flattening from bottom -2 squeeze and stretch option 2 averaging from 3-D to 2-D
[in]nz_ssDeprecated argument
[in]verbOptionVerbose option
[in]iline_minMinimum Inline number included (if defined)
[in]iline_maxMaximum Inline number included (if defined)
[in]xline_minMinimum Xline number included (if defined)
[in]xline_maxMaximum Xline number included (if defined)
[in]modif_highUpper truncation (when defined)
[in]modif_lowLower truncation (when defined)
[in]modif_scaleScaling value (when defined)
[in]codefmtReading format
[in]namconvNaming convention

: In the case of Squeeze and Stretch (S&S), the number of layers

: is meaningless. It is fixed by the user, unless defined

: by the output grid (if flag_store == 1)

Remarks
For filling the 3-D grid
- 2-D characteristics of the grid are taken into account
- no attention is paid to the vertical mesh value.
GSTLEARN_EXPORT SegYArg segy_array ( const char *  filesegy,
DbGrid surf2D,
const String top_name,
const String bot_name,
const String top_aux,
const String bot_aux,
double  thickmin,
int  option,
int  nz_ss,
int  verbOption,
int  iline_min,
int  iline_max,
int  xline_min,
int  xline_max,
double  modif_high,
double  modif_low,
double  modif_scale,
int  codefmt 
)

Read the contents of a SEGY file

Returns
A SegYArg structure which contains:
- a vector of trace vectors
- a vector of trace descriptors
The Descriptor for each trace contains:
0: Absolute rank for the trace number
1: Cross-Line number
2: In-Line number
3: Coordinate along X
4: Coordinate along Y
5: Minimum Elevation
6: Maximum Elevation
7: Minimum Value
8: Maximum value
9: Thickness
10: Number of values
11: Minimum Elevation of Auxiliary surface
12: Maximum Elevation of Auxiliary surface
Parameters
[in]filesegyName of the SEGY file
[in]surf2DDb containing the top, Bottom and Reference surfaces This file is optional
[in]top_nameName of variable containing the Top Surface (or "")
[in]bot_nameName of variable containing the Bottom Surface (or "")
[in]top_auxName of auxiliary variable containing a Top (or "")
[in]bot_auxName of auxiliary variable containing a Top (or "")
[in]thickminMinimum thickness (or 0)
[in]optionFlattening option: 0 no flattening; 1 flattening from top; -1 flattening from bottom -2 squeeze and stretch option 2 averaging from 3-D to 2-D
[in]nz_ssNumber of layers for different options (see details)
[in]verbOptionVerbose option
[in]iline_minMinimum Inline number included (if defined)
[in]iline_maxMaximum Inline number included (if defined)
[in]xline_minMinimum Xline number included (if defined)
[in]xline_maxMaximum Xline number included (if defined)
[in]modif_highUpper truncation (when defined)
[in]modif_lowLower truncation (when defined)
[in]modif_scaleScaling value (when defined)
[in]codefmtReading format

In the case of Squeeze and Stretch (S&S), the number of layers

is meaningless. It is fixed by the user.

GSTLEARN_EXPORT Grid segy_summary ( const char *  filesegy,
DbGrid surf2D,
const String name_top,
const String name_bot,
double  thickmin,
int  option,
int  nz_ss,
int  verbOption,
int  iline_min,
int  iline_max,
int  xline_min,
int  xline_max,
double  modif_high,
double  modif_low,
double  modif_scale,
int  codefmt 
)

Read the contents of a SEGY file and returns the structure SegyRead which captures the main characteristics of the SEGY grid

Parameters
[in]filesegyName of the SEGY file
[in]surf2DDb containing the top, Bottom and Reference surfaces This file is optional
[in]name_topRank of variable containing the Top Surface (or 0)
[in]name_botRank of variable containing the Bottom Surface (or 0)
[in]thickminMinimum thickness (or 0)
[in]optionFlattening option: 0 no flattening; 1 flattening from top; -1 flattening from bottom -2 squeeze and stretch option 2 averaging from 3-D to 2-D
[in]nz_ssNumber of layers for different options (see details)
[in]verbOptionVerbose option
[in]iline_minMinimum Inline number included (if defined)
[in]iline_maxMaximum Inline number included (if defined)
[in]xline_minMinimum Xline number included (if defined)
[in]xline_maxMaximum Xline number included (if defined)
[in]modif_highUpper truncation (when defined)
[in]modif_lowLower truncation (when defined)
[in]modif_scaleScaling value (when defined)
[in]codefmtReading format

: In the case of Squeeze and Stretch (S&S), the number of layers

: is meaningless. It is fixed by the user, unless defined

: by the output grid (if flag_store == 1)