NAME

     dbvec  - build 3D database for use in retrieving inlines and
     crosslines in an efficient and expedient manner.


SYNOPSIS

     dbvec [ -Nntap ] [ -Ootap ] [ -dmindmin ] [  -dmaxdmax  ]  [
     -ddelddel  ] [ -A ] [ -stk ] [ -x1x1 ] [ -y1y1 ] [ -x2x2 ] [
     -y2y2 ] [ -x3x3 ] [ -y3y3 ] [ -x4x4 ] [ -y4y4 ] [ -dxdx ]  [
     -dydy ] [ -hwshotc_ShtSta ] [ -hwgroupc_GrpSta ] [ -X ] [ -?
     ]


DESCRIPTION

     dbvec builds a  database  of  vectors  on  disk  by  reading
     through  all  traces  in the 3D data set and computing their
     locations on an X-Y grid.  the following header  words  must
     be present in the input headers: SrPtXC, SrPtYC, RcPtXC, and
     RcPtYC.  The database information is written to  disk  as  a
     set of vectors containing the location on the original input
     3D dataset(s).  It is written as binary, and no, you  cannot
     edit  it  and look at the values.  The database file is used
     by the next step - edit3d - to retrieve the desired cells in
     an inline or a crossline direction.

     The basic layout of the survey is as follows:
                      Y
                      ^
                      |
                   (4)|----------(1) Receiver Line
                      |_|_|_|_|_|   (or Shot Line)
                      |_|_|_|_|_|
                      |_|_|_|_|_|
                      |_|_|_|_|_|
                      |_|_|_|_|_|
                      |_|_|_|_|_|
                      | | | | | |
                   (3)-----------(2)--> X

     where the corners are labelled (1), (2),  (3),  and  (4)  in
     clockwise  order. The only must is that Corner (1) be placed
     in the upper right hand  corner  (NorthEast)  and  that  the
     movement  to  Corner  (2)  be  in the general direction of a
     receiver or source line. The cell  dimensions  then  can  be
     related to the group spacing and the line spacing.  The ori-
     gin is still at the lower left  corner  (Corner  (3)).   The
     actual  recorded survey may be rotated somewhat from the X-Y
     coordinate system but dbvec takes care of that  when  calcu-
     lating  its  bins.  The only really complications occur when
     the receiver lines do not align with the survey boundaries.

     There are two ways to input the coordinates of  the  parral-
     lelogram  over  which  you  want to extract sorted data: (1)
     define a  parrallelogram  using  (X1Y1,  X2Y2,  X3Y3,  X4Y4)
     corners,  where  the  origin  in closest to X1Y1, the X-axis
     lies closest to the line X1-X4 (roughly corresponding to the
     cross-line  direction),  and  the Y-axis lies closest to the
     line Y1-Y2 (roughly corresponding to the in-line direction),
     or  (2)  define a line over the survey area using the either
     pairs X1Y1 and X3Y3 or the pairs X4Y4  and  X2Y2.   In  this
     case a very skinny box results by using the Y-coordinates as
     is and by adding and subtracting the cross-line cell  dimen-
     sion from the X-coordinates.

     The program computes the cell numbers (bins) as below:
                      Y
                      ^
                      |
                   (4)|---------------(1) Receiver Line
                      |29|22|15| 8| 1|   (or Shot Line)
                      |__|__|__|__|__|
                      |30|23|16| 9| 2|
                      |__|__|__|__|__|
                      |31|24|17|10| 3|
                      |__|__|__|__|__|
                      |32|25|18|11| 4|
                      |__|__|__|__|__|
                      |33|26|19|12| 5|
                      |__|__|__|__|__|
                      |34|27|20|13| 6|
                      |__|__|__|__|__|
                      |35|28|21|14| 7|
                      |__|__|__|__|__|
                   (3)----------------(2)--> X

     where Bin 1 = Li1,Di1; Bin 2 = Li1,Di2; etc.

     dbvec gets both its data and  its  parameters  from  command
     line  arguments.  These arguments specify the input, output,
     and the areal grid deinition.

  Command line arguments
     -N ntap
          Enter the input data set name or file immediately after
          typing -N unless the input is from a pipe in which case
          the -N entry must be omitted.   Thisinput  file  should
          include the complete path name if the file resides in a
          different directory.  Example -N/b/vsp/dummy tells  the
          program to look for file 'dummy' in directory '/b/vsp'.
          Note that you may have multiple files as input,  up  to
          100 partitions; just input them in order on the command
          line  using  multiple  -Ndata  entries  (i.e.,  -Ndata1
          -Ndata2 -Ndata3 ... ).

     -O otap
          Enter the output database file name  immediately  after
          typing  -O.   This  must  be  a  disk  file not a pipe.
          BEWARE: If this file already exists  the  program  will
          overwrite  the  existing  file.   If  you  are doing an
          append, then the file MUST already exist.

     -dmin dmin
          Enter the minimum model spread offset. Default = 0.

     -dmax dmax
          Enter the maximum model spread offset. No default

     -ddel ddel
          Enter the model spread group interval. No default.

     -x1,-y1,-x2,-y2,-x3,-y3,-x4,-y4 [x1,x2,x3,x4], [y1,y2,y3,y4]
          Enter the area of interest over the survey with the X-Y
          coordinates  (ft,m)  defining  the  four  corners  of a
          parallelogram on the ground.  Going either clockwise or
          counter clockwise (clockwise recommended) from Corner 1
          the first move to Corner 2 should be in  the  direction
          of  a  receiver  or  shot  line. The direction 1-2 will
          always define the Y  or  DI  direction.  The  DIs  will
          always  start from side 1-4 and increase in the 1-2 (Y)
          direction; the LIs will always start from side 1-2  and
          increase  in the 1-4 (X) direction.  The values must be
          the same units as those given in the source,  receiver,
          and  midpoint  X-Ys  in  the trace headers.  A complete
          description of the geometry is found in the  Blue  book
          writeup  for  SR3D.   NOTE:   the  x,y coordinates must
          describe the entire survey that will be included in the
          database.

     -dx, -dy dx, dy
          Enter the cell dimensions in the X  (2-3  side)  and  Y
          (1-2 side) directions (ft,m).  The sides are defined to
          be X along side 2-3, Y along side 1-2.  Whichever  side
          is  most  closely  aligned  with the group lines can be
          dimensioned 1/2 the group interval; whichever  side  is
          most closely aligned with the shots lines can be dimen-
          sioned 1/2 the shot interval (or 1/2 the line spacing).
          Remember when setting up the coordinate system the line
          joining Corner (1) to Corner (2)  should  be  clockwise
          starting from the NE corner of the survey.  If the sur-
          vey is a parallelogram find the east side  then  choose
          the upper corner as NE.

     -X   Enter the command line argument '-X' to output the data
          in  crossline order; else the data are output in inline
          order.

     -A   Enter the command line argument '-A' in order to append
          (add  to)  an  existing  database  file  created  in  a
          previous dbvec step.  This parameter allows the user to
          create  the  database  in  stages,  as  the  input data
          becomes available.  Be sure  that  the  -Ndata  command
          line  values only specify the files being appended, NOT
          the files for the entire 3D dataset.   The  x,y  corner
          coordinates  and  the  dx,dy  cell  dimensions  MUST be
          identical in the subsequent steps to that specified  in
          the original step.

     -stk Enter the command line argument '-stk' in order to read
          the  bin  center XYs from the trace header words CDPBCX
          and CDPBCY, instead of computing them from  the  source
          and  receiver  XYs.   The default is to compute the bin
          center XYs.

     -hwshot c_ShtSta
          Enter the trace header  mnemonic  associated  with  the
          shot station indexing.  This may be any valid USP trace
          header.  The  program  decodes  internally  the  format
          [float, integer etc.].  The default is to use SoPtNm.

     -hwgroup c_GrpSta
          Enter the trace header  mnemonic  associated  with  the
          receiver  station  indexing.  This may be any valid USP
          trace header.  The program decodes internally the  for-
          mat  [float,  integer  etc.].   The  default  is to use
          RecInd.

     -? -h -help
          Enter the command line argument '-? or -h or -help'  to
          get online help.  The program terminates after the help
          screen is printed.






EXAMPLE

     dbvec -Ndata1 -Ndata2 -x11967081 -y1614502

     -x21967081 -y2560340 -x31954293 -y3560340

     -x41954293 -y4614502 -dx82.5 -dy55

     -dmin0 -dmax20000 -ddel110 -Odbnam

     where  corner   1   is   (1967081,614502),   corner   2   is
     (1967081,560340), corner 3 is (1954293,560340), and corner 4
     is (1954293,614502).

     To add to the existing database (dbnam), use:

     dbvec -Ndata3 -Ndata4 -x11967081 -y1614502

     -x21967081 -y2560340 -x31954293 -y3560340

     -x41954293 -y4614502 -dx82.5 -dy55

     -dmin0 -dmax20000 -ddel110 -Odbnam -A


BUGS

     unknown


SEE ALSO

     sr3d1


AUTHOR

     This code is taken in part from program sr3d1 (Original  SIS
     code  by  Gary  Ruckgaber; UNIX port done by Paul Gutowski).
     Geoscientist: Don Wagner  Programmer: Marilyn Miller


COPYRIGHT

     copyright 2001, Amoco Production Company
               All Rights Reserved
          an affiliate of BP America Inc.






























Man(1) output converted with man2html