POSC Specifications
Version 2.2
Usage Examples
Four Point Geometry Calculations

[Seismic Table of Contents]


1.2 Four Point Geometry Calculations

1.2.1 Express-I of Four Point Geometry

Consider the binset to be given by the four corner points. This would be done as follows:

(* Assume that sgs = SEISMIC_GEOMETRY_SET already has been created. *)
(* The full binset must be created. *)
(* To do this, we must create two axes, two grid axes, and the binset grid *)

bpaxis = GENERAL_COORDINATE_SYSTEM_AXIS {
   ref_quantity_property --> @PRV_binset_point_index;
   source --> @RV_MyCompany; };

blaxis = GENERAL_COORDINATE_SYSTEM_AXIS {
   ref_quantity_property --> @PRV_binset_line_index;
   source --> @RV_MyCompany; };

binpointgrid = GRID_1D_EQUAL {
   name --> `SGS point grid axis';
   origin --> ANYQUANTITY {
      real_value --> 1.0;
      ref_unit_of_measure --> @PRV_Euc;
      ref_quantity_type --> @PRV_index; };
   step --> ANYQUANTITY {
      real_value --> 1.0;
      ref_unit_of_measure --> @PRV_Euc; 
      ref_quantity_type --> @PRV_index; };
   point_count --> 683; --total number of CDP's in each line.
   connected --> FALSE ;
   coordinate_system_axis --> @bpaxis; };

binlinegrid = GRID_1D_EQUAL {
   name --> `SGS line grid axis';
   origin --> ANYQUANTITY {
      real_value --> 1.0;
      ref_unit_of_measure --> @PRV_Euc; 
      ref_quantity_type --> @PRV_index; };
   step --> ANYQUANTITY {
      real_value --> 1.0;
      ref_unit_of_measure --> @PRV_Euc;
      ref_quantity_type --> @PRV_index; };
   point_count --> 270; --total number of lines
   connected --> FALSE;
   coordinate_system_axis --> @blaxis; };

binsetgrid = GRID_DEFINED_GRID {
   name --> `SGS Binset grid';
   grid_structured --> LIST(@binlinegrid, @binpointgrid); };

(* Now form the binset regular. This forms a grid of size 683 x 270 *)

binset = BINSET_GRID {
   name --> `SGS Binset';
   seismic_geometry_set --> @sgs; -- previously created.
   grid_structured --> @ binsetgrid;
   ref_binset_geometry_class --> @PRV_regular; };

(* It is possible, but not efficient, to give locations
                               of every point in this grid. *)
(* Instead, we will set up an alternative binset with just
                                     the four corner points *)

smallbinpointgrid = GRID_1D_EQUAL {
   name --> `SGS corners bin point grid axis';
   origin --> ANYQUANTITY {
      real_value --> 1.0;
      ref_unit_of_measure --> @PRV_Euc; 
      ref_quantity_type --> @PRV_index; };
   step --> ANYQUANTITY {
      real_value --> 682.0;
      ref_unit_of_measure --> @PRV_Euc; 
      ref_quantity_type --> @PRV_index; };
(* Note that origin and step will make the 2 points equal to 1 and 683. *)
   point_count --> 2;
   connected --> FALSE;
   coordinate_system_axis --> @bpaxis;}; -- reuse the one from above.

smallbinlinegrid = GRID_1D_EQUAL {
   name --> `SGS corners bin line grid axis';
   origin --> ANYQUANTITY {
      real_value --> 1.0;
      ref_unit_of_measure --> @PRV_Euc; 
      ref_quantity_type --> @PRV_index; };
   step --> ANYQUANTITY {
      real_value --> 269.0;
      ref_unit_of_measure --> @PRV_Euc; 
      ref_quantity_type --> @PRV_index; };
(* Note that origin and step will make the 2 points equal to 1 and 270 *)
   point_count --> 2;
   connected --> FALSE;
   coordinate_system_axis --> @blaxis; }; -- reuse the one from above.

smallbinsetgrid = GRID_DEFINED_GRID {
   name --> `SGS Corners Binset Grid';
   grid_structured --> LIST(@smallbinlinegrid, @smallbinpointgrid); };

(* Now for the binset_grid_variant *)

binsetvar = BINSET_GRID_VARIANT {
   name --> `SGS Corners Binset';
   description --> `Four corner points of the SGS 3d survey';
   binset_grid --> @binset;
   grid_structured --> @smallbinsetgrid;
   ref_grid_variant --> @PRV_corners_only; };

(* Give the locations of the four corners *)
(* For this example, assume (x,y) values in ft, in local coordinate
      system `SGS local'. The axes are @SGS-x and @SGS-y *)

cornerlocs = PTY_GEOMETRY_2D_FACE {
   binset --> @binsetvar;
   data_value --> SURFACE_GRID {
      cornerframe = GEOMETRY_FRAME {
        detailed_type --> FT_SURFACE;
        descriptor --> LIST(@idescr, @jdescr);
        leaf_frame --> SET(@xval, @yval);
        grid_or_mesh --> @smallbinsetgrid
        coordinate_system --> @RV_SGSlocal;}; --see above comments
      idescr = DESCRIPTOR {
        dimension --> INDEX_I; -- the Line direction
        lower_bound --> 1;
        count --> 2; };
      jdescr = DESCRIPTOR {
        dimension --> INDEX_J; -- the Point direction
        lower_bound --> 1;
        count --> 2; };
      xval = LEAF_FRAME {
        data_type --> DAE_C_FLOAT;
        coordinate_system_axis --> @SGS-x;
        ref_unit_of_measure --> @PRV_ft;
        data_values --> LIST( x1, x2, x3, x4);
(* The four "x" values, which in actuality are real numbers. *)
      yval = LEAF_FRAME {
        coordinate_system_axis --> @SGS-y;
        ref_unit_of_measure --> @PRV_ft;
        data_values --> LIST( y1, y2, y3, y4); }; }; };

1.2.2 Calculations

Now it is possible to give the locations of the four corners. From these locations (actually, only three corners are needed)1, and the above information, we will be able to calculate the location of any bin node.

Note 1: The fourth corner may be calculated from the other three.

The points have been labelled by the (line, point) indexes as defined in the Express-i above. In order to calculate any location, we also will need to know the locations of these points. Note that none of the mathematics explained below depends on how the axes are rotated, or on whether the "line axis" is rotated clockwise or counterclockwise from the "point axis."

Here is the geometry, drawn in a convenient rotation, but by no means meant to indicate that the line directions and rotations must be as drawn:

Assume the following locations:

Then C4 can be calculated:

Now calculate the distance from C1 to C2:

and the distance from C1 to C3:

We must also know the number of lines (NL), and the number of points per line (NP). For our example, NP = 683, and NL = 270. Given these, we can find the spacing between bin points (DP) and between bin lines (DL).

Now the following four elements of the matrix are calculated. They represent the change in x and y with respect to a change in bin point index or bin line index:

The final transformation looks like the following:

where P1 is the initial bin point index (1, in our example), and L1 is the initial line index (1, in our example).

It should be noted that the equation can be inverted so that it is possible to calculate P and L from an (x,y) location. The mathematics is straightforward, and will not be given here.

As a side note, there is nothing in the above mathematics that requires the "point" direction to be perpendicular to the "line" direction. However, it is possible to test to see if these directions are indeed perpendicular. The test is that the dot product of the vectors (C2-C1) and (C3-C1) are perpendicular. In terms of the coordinates, this is expressed by


[Seismic Table of Contents]


Last modified: 30 December 1997
© Copyright 1997 POSC. All rights reserved.