You are here: Menu Commands > Surfaces > Contouring > Estimate grid values > Fit polynomial surface to grid
GEOVIA Surpac

Fit polynomial surface to grid

The Grid Polynomial Fit function allows you to fill the Grid Model by fitting a polynomial surface to your data points. You input details of the polynomial that you wish to fit. The function uses a least squares estimation method to find the best-fit values of the polynomial coefficients for the data. The function then fills the grid using the fitted polynomial surface to assign values to the grid points.

To run this function: Choose Surfaces > Contouring > Estimate grid values > Fit polynomial surface to grid, or...

  • In the Function Chooser, type GRID POLYNOMIAL FIT, and press ENTER.

Note: The Grid Model produced by the Grid Polynomial Fit function will highlight global trends in the input data, it will not necessarily be a good fit to the individual input data points. The higher (ie quartic and higher) order polynomial surfaces will generally give better fits to the data in the region of the data itself but extrapolations beyond the initial data boundary should be treated with caution for these polynomials. The Grid Polynomial Fit function will work well on most data distributions, but it will generally give best results when the input data is reasonably regularly spaced. If you decide you wish to enforce a regular spacing by interpolating the original input data onto a grid before applying the function, you should use one of the other grid filling methods (eg inverse distance or kriging) to create a preliminary grid and then use this grid as data for filling a new grid by polynomial surface fitting.

Polynomial Surface

The choices you have to set the polynomial surface to fit to your data are: Planar, Quadratic, Cubic, Quartic, Quintic or User Defined. These polynomials are described in detail below:

Planar: z = A + Bx + Cy

Quadratic: z = A + Bx + Cy + Dx2 + Exy + Fy2

Cubic: z = A + Bx + Cy + Dx2 + Exy + Fy2 + Gx3 + Hx2y + Ixy2 + Jy3

Quartic: z = A + Bx + Cy + Dx2 + Exy + Fy2 + Gx3 + Hx2y + Ixy2 + Jy3 + Kx4 + Lx3y + Mx2y2 + Nxy3 + Oy4

Quintic: z = A + Bx + Cy + Dx2 + Exy + Fy2 + Gx3 + Hx2y + Ixy2 + Jy3 + Kx4 + Lx3y + Mx2y2 + Nxy3 + Oy4
+ Px5 + Qx4y Rx3y2 + Sx2y3 + Txy4 + Uy5

User Defined: For the User Defined type you enter the maximum x power, maximum y power, and maximum total power. The maximum total power defines the general order of the polynomial, while varying the maximum x and y powers allow you to exclude a range of terms from the full polynomial. For example: maximum total power = 2, maximum x power = 2, maximum y power = 2 defines a full quadratic polynomial (ie equivalent to you choosing the Quadratic type), and maximum total power = 3, maximum x power = 3, maximum y power = 3 defines a full cubic polynomial (ie equivalent to you choosing the Cubic type). However, maximum total power = 3, maximum x power = 3, maximum y power = 1 limits the terms to give the following polynomial: z = A + Bx + Cy + Dx2 + Exy + Fx3 + Gx2y (ie the full Cubic polynomial without some of the terms). If you choose maximum total power = 8, maximum x power = 8, maximum y power = 8 you will get a full eighth order polynomial with no terms missing.

Choose Cancel on the SELECT STRING FILE SOURCE form to return to the GRID menu or Apply to display the POLYNOMIAL FIT PARAMETERS form.

Surface to fit

Enter the polynomial surface to fit to your data. One of: Planar, Quadratic, Cubic, Quartic, Quintic or User Defined.

If you chose User Defined for Surface to fit then the following three fields will appear:

Maximum x power

An integer (range 0 to 10) defining the maximum x power for the user-defined polynomial

Maximum y power

An integer (range 0 to 10) defining the maximum y power for the user-defined polynomial

Maximum total power

An integer (range 0 to 10) defining the maximum total power for the user-defined polynomial

Constrain interpolation?

Enter N if you wish to fill the whole grid. Enter Y if you wish to define spatial constraints, eg inside string or above a certain x value, to define a subregion of the grid to be filled in this pass.

Enter Y in the Constrain interpolation? field to display the ENTER CONSTRAINTS form.

Choose Cancel on the POLYNOMIAL FIT PARAMETERS form to return to the SELECT STRING FILE SOURCE form or Apply to perform the polynomial fitting calculations.

Results

Once the calculations are completed the current grid is displayed on the screen as point markers in the graphics layer grid_display. The layer grid_display can be saved to a string file using the SAVE FILE button on the GRID menu. You can also toggle its display using the LAYERS Status button on the GRID menu.

Errors

Invalid D field for point x= xxx y= yyy z= zzz, calculations will continue ignoring this point

Invalid D field found in the initial string data, this point will be ignored.

Insufficient data points present for calculations to proceed

There are not enough initial data points present to accurately fit the required polynomial.