IDINT -- Inverse Distance Interpolation

Generates a raster image by interpolating image values between specified pixel locations using the Simple Inverse Distance or Weighted Inverse Distance algorithm.

Progress of this program can be monitored. See MONITOR section.

See Also: GRDPNT, GRDPOL, GRDVEC, GRDINT

PARAMETERS

IDINT is controlled by the following global parameters :

Name     Prompt                                  Count     Type
FILI     Database GDB File Name                  1-64      Char
FILO     Database Output File Name               1-64      Char
DBVS     Database Vector Segment                 0-1       Int
DBOC     Database Output Channel                 1         Int
DBOW     Database Output Window                  0-4       Int
FLDNME   Attribute Field Name                    0-64      Char
EXPONEN  Power of Exponentiation                 0-1       Int
MINPNT   Minimum Number of Points                0-1       Int
STARTRD  Starting Searching Radius               1-1       Real
MAXRD    Maximum Search Radius                   1-1       Real
EMPTYVL  Default Empty Value                     0-1       Real
IDALGOR  Algorithm: SIMPLE/WEIGHT                6-6       Char

FILI

Specifies the name of the GDB file which contains the GDB layer information.

 EASI>FILI="filespec"

FILO

Specifies the name of the GDB raster file to receive the interpolated images.

 EASI>FILO="filespec"
If FILI and FILO are raster files, then FILI can be equal FILO.

DBVS

Specifies the vector segment in which the attribute value or the z coordinate will be used as the basis for interpolation.

 EASI>DBVS=i
The vector segment can specify an arbitrary number of structures. If DBVS is not specified, then TFILE must be specified. If both TFILE and DBVS are specified, an error message is issued and the program stops execution.

DBOC

Specifies the image channel to receive the interpolated result.

 EASI>DBOC=i

DBOW

Specifies a rectangular subset of the image database to be used.

 EASI>DBOW=Xoffset,Yoffset,Xsize,Ysize
 EASI>DBOW=                             | use entire image
The offset + size must not exceed the image size.

EXPONEN

  Valid Values:   1, 2, 3, 4
  Default:        2
Specifies a power of exponentiation. This value applies only for the Simple Inverse Distance interpolation algorithm.

MINPNT

  Valid Values:   1 <= x <= 8
  Default:        3
Specifies a number of minimum points in the given radius.

STARTRD

  Valid Values:   x >= 0.0
  Default:        300.0
Specifies a start searching radius. The magnitude must be in vecunit coordinates.

MAXRD

  Valid Values:   x >= 0.0
  Default:        1500.0
Specifies a maximum searching radius. The magnitude must be in vecunit coordinates.

 MAXRD > STARTRD

EMPTYVL

  Valid Values:   x <= 0.0 , x >= 0.0
  Default:        0.0
Specifies a default empty value for areas without enough data.

IDALGOR

  Valid Values:   SIMPLE, WEIGHT
  Default:        SIMPLE
Specifies the type of Inverse Distance algorithm.

 SIMPLE         | Simple Inverse Distance Algorithm
 WEIGHT         | Weighted Inverse Distance Algorithm

FLDNME

  Valid Values:   ATTRIBUTE, ZCOORD, ELEVATION
  Default:        ATTRIBUTE
Specifies the field containing the elevation value. If the "FLDNME" parameter is not specified, it defaults to ATTRIBUTE. If the "FLDNME" parameter is ZCOORD, then the actual Z-coordinates of the vectors are used. The names are not case sensitive, and the entire name need not be specified. If more than one match exists, the first name is used.

 FLDNME =                    | Use attribute field named Attribute
 FLDNME = ZCOORD             | Use z-coordinate of vectors
 FLDNME = ELEVATION          | Use field named Elevation
This parameter is used when the Database Vector Segment is specified.

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

 EASI>MONITOR="ON"           | turn monitor ON  (default)
 EASI>MONITOR="OFF"          | turn monitor OFF (recommended if
                               running in batch/background mode)

DETAILS

IDINT is used to read the grey level values for an arbitrary number of pixel locations in order to generate a raster image based upon interpolation between the specified grey levels. It adopts the Inverse Distance Simple or Weighted Interpolation algorithm.

The grey level values are read from either a GDB layer or a database vector segment stored on the database input file.

STARTRD specifies the size of the starting radius , which defines the starting search area for interpolation points around gridding point. MAXRD specifies the maximum size of the radius for searching. MINPNT specifies the minimum number of interpolation points to satisfy the searching requirement. If the requirement is not met and the minimum number of points are not found, then the area does not have enough data and the empty value (EMPTYVL) will be assigned to this area.

If the specified algorithm is Inverse Distance Simple, the power of exponentiation (EXPONEN) can be used. The default is 2. Higher powers of exponentiation will give better results, but IDINT will run slower.

ALGORITHM

IDINT implements the Inverse Distance Interpolation algorithm using weighted average method. This is used primarily as a fast technique for interpolating scattered data. It produces a surface that drops inversely with the power of the distance to the next point. The tangent surface at the control points is a horizontal plane. This produces a surface which is similar to that of the tent pole being pushed up through a membrane.

There are two methods that use weighted moving averages of points within circular zone of influence in this function:

SIMPLE INVERSE DISTANCE

This methods is based on weights that are inversely proportional to the power of the distance from the centre(Xe) of the searching radius (Rs).

The general formula for simple inverse distance is:

For a point Xe = (xe,ye), estimated value Ze is given by:

 Ze = SUM[i=1,n] Z(i) * W(R(i))

 where: Z(i) is the sample value at point X(i)
        Rs is a search radius about Xe
        R(i) is the distance Xe - X(i) within Rs
        n  is the number of data samples in Rs
The weight function W(i) at X(i) is given by:

 W(i) = TO_POWER_P (INVERSE_DISTANCE(R(i)))
        ___________________________________________
        SUM[i=1,n] TO_POWER_P (INVERSE_DISTANCE(Ri))

 where: INVERSE_DISTANCE(R(i)) = (1/R(i)),

        TO_POWER_P denotes power of exponentiation.
The equation for a Simple Inverse Distance to power N interpolation method is taken from:

 Denis D. Weber and Evan J. Englund, 1994
 Evaluation and Comparison of Spatial Interpolators II
 Mathematical Geology, Vol. 26, No. 5

WEIGHTED INVERSE DISTANCE

This methods is based on weights that are proportional to the square of the distance from the centre(Xe) of the searching radius (Rs).

The general formula for weighted inverse distance is:

For a point Xe = (xe,ye), estimated value Ze is given by:

 Ze = SUM[i=1,n] Z(i) * W(R(i))

 where  Z(i) is the sample value at point X(i)
        Rs is a search radius about Xe
        R(i) is the distance Xe - X(i) within Rs
        n  is the number of data samples in Rs
The weight function W(i) at X(i) is given by:

 W(i) = SQUARE (Norm(R(i))
        ____________________________
        SUM[i=1,n] SQUARE (Norm(R(i))

 where  Norm(R(i)) = Rs - R(i)
The equation for a Weighted Inverse Distance interpolation method is taken from:

 Denis D. Weber and Evan J. Englund, 1994
 Evaluation and Comparison of Spatial Interpolators II
 Mathematical Geology, Vol. 26, No. 5

EXAMPLE

This example will run the EASI script RSAMVS to create a vector segment with a specified number of sample points picked at random over the area of an image. The value at each sample point is the grey-scale(height) value at the same location on the DEM image. By running the pace program IDINT over this vector segment with the "IDALGOR" parameter set for either SIMPLE or WEIGHT, we can illustrate what an interpolated image will look like as compared with the original image.

Create a new vector segment with the sample points:

 EASI>FILI="irvine.pix"  | Database file to get image grey-scale
 EASI>FILO="irvine.pix"  | Database file to receive vector segment
 EASI>NSAMPLE=400        | Pick 400 points over the image
 EASI>DBIC=10            | The channel where an DEM image is stored
 EASI>RUN RSAMVS         | Run the program to create a vector segment
Add one 32-bit channel to irvine.pix file to store the interpolation results. PCIMOD can add channels to PCIDSK files created by any program, including LINK, IMAGELN, or CIM.

 EASI>FILE="irvine.pix"
 EASI>PCIOP="ADD"
 EASI>PCIVAL=0,0,0,1
 EASI>RUN PCIMOD
Run the interpolation program to get an interpolated image, assuming RSAMVS has created a vector segment with segment number 38 and the original image has dimension 512 pixels X 512 lines offset at (0,0):

 EASI>FILI="irvine.pix"       | database file which holds vector seg.
 EASI>FILO="irvine.pix"       | file to receive interpolation results
 EASI>DBVS=LASC               | input data from DBVS not TFILE
 EASI>DBOC=12                 | 32-bit channel to receive results
 EASI>DBOW=                   | entire image
 EASI>EXPONEN =               | default is 2 for exponent
 EASI>MINPNT =                | default is 3 
 EASI>STARTRD = 300           | value is in metres
 EASI>MAXRD = 1500            | value is in metres
 EASI>EMPTYVL = -1            
 EASI>IDALGOR  = "SIMPLE"     | Simple Inverse Distance Algorithm 
 EASI>FLDNME= "ZCOORD"        | use grey value from attribute
 EASI>RUN IDINT
The above example illustrates how to run the IDINT program using a vector segment as input.


About PCI Help Gateway