IDINT

Inverse Distance Interpolation


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples :: Algorithm :: References :: Related

Back to top

Description


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

Parameters


Name Type Caption Length Value range
FILI* String Input file name 1 - 192  
FILO String Output file name 0 - 192  
DBVS* Integer Input vector segment 1 - 48  
DBOC* Integer Output image channel 1 - 1  
DBOW Integer Raster output window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
FLDNME String Attribute field name 0 - 64 ATTRIBUTE, ZCOORD
Default: ATTRIBUTE
EXPONEN Integer Power of exponentiation 0 - 1 1 - 4
Default: 2
MINPNT Integer Minimum number of points 0 - 1 1 - 8
Default: 3
STARTRD Float Starting search radius 0 - 1 0.0 -
MAXRD Float Maximum search radius 0 - 1 0.0 -
Default: 1500.0
EMPTYVL Float Default empty value 0 - 1  
IDALGOR String Algorithm type 0 - 6 SIMPLE | WEIGHT
Default: SIMPLE
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the file that contains the vector data information.

FILO

Specifies the name of the PCIDSK image file to receive the output raster layer. The specified file must already exist.

If this parameter is not specified, it will be assumed to be the same as FILI.

DBVS

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

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

DBOC

Specifies the output channels to receive the output interpolation image.

DBOW

Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) to be output. If DBOW is not specified, the entire layer is output by default. Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

Note: The offset + size must not exceed the image size.

FLDNME

Specifies the name of the attribute field containing the elevation value.

If this parameter is not specified, it defaults to "ATTRIBUTE". If the value is specified as "ZCOORD", the actual z-coordinates of the vectors are used.

Values are not case-sensitive, and the entire name need not be specified. If more than one match is found, the first name is used.

Note: This parameter is used when the input vector segment (DBVS) is specified.

EXPONEN

Specifies a power of exponentiation. This value applies only for the Simple Inverse Distance interpolation algorithm. Valid Values are 1, 2, 3, and 4; the default value is 2.

MINPNT

Specifies the minimum number of points to search for in the given radius.

STARTRD

Specifies a starting value for the search radius. The magnitude must be specified in vecunit coordinates. The dedault value is 0.125*MAXRD (Maximum Search Radius).

MAXRD

Specifies a maximum value for the search radius. The magnitude must be in vecunit coordinates.

EMPTYVL

Specifies a default empty value to assign to areas containing insufficient data to include in processing.

IDALGOR

Specifies the type of Inverse Distance algorithm to use.

Options include:

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

IDINT reads the gray-level values for an arbitrary number of pixel locations to generate a raster image based upon interpolation between the specified gray levels. It adopts the Simple Inverse Distance Simple or the Weighted Interpolation algorithm.

The gray-level values are read from a vector segment in the specified input file.

The STARTRD (Starting Search Radius) parameter specifies the size of the starting radius, which defines the beginning of the area to search for interpolation points around gridding points. The MAXRD (Maximum Search Radius) parameter specifies the maximum size of the search radius.

The MINPNT (Minimum Number of Points) parameter specifies the minimum number of interpolation points to satisfy the search requirement. If the requirement is not met and the minimum number of points are not found, the area contains insufficient data and the empty value (EMPTYVL) will be assigned to this area.

If the specified algorithm is Simple Inverse Distance, the power of exponentiation (EXPONEN) can be used. The default value is 2; higher powers of exponentiation may provide better results, but will considerably slow down processing time.

Back to top

Examples

This example creates 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 gray-scale (height) value at the same location on the DEM image. Running IDINT over this vector segment with the "IDALGOR" parameter set to either SIMPLE or WEIGHT illustrates what an interpolated image will look like as compared with the original image.

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	! add 32-bit real channel 

EASI>RUN PCIMOD

Run the interpolation function to get an interpolated image, assuming you created a vector segment with segment number 34 and that the original image has dimensions of 512 pixels X 512 lines offset at (0,0).

EASI>FILI	=	'irvine.pix' 
EASI>FILO	=		! same as fili
EASI>DBVS	=	34	! vector segment with sample points
EASI>DBOC	=	12	! write result to channel 12 
EASI>DBOW	=		! process entire image
EASI>FLDNME	=	'ZCOORD'	! elevation stored in z-coordinates
EASI>EXPONEN	=		! default value is 2	
EASI>MINPNT	=		! default value is 3
EASI>STARTRD	=	300	! starting search radius (m)
EASI>MAXRD	=	1500	! maximum radius (m)
EASI>EMPTYVL	=	-1	! value not to be processed
EASI>IDALGOR	= 	'SIMPLE'	! Simple Inverse Distance algorithm

EASI>RUN IDINT

Back to top

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.

Two methods use weighted moving averages of points within circular zone of influence in this function:

Both methods are taken from the following paper:

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

Simple Inverse Distance

This method is based on weights that are inversely proportional to the power of the distance from the center(Xe) of the search radius (Rs).

The general formula for simple inverse distance is:

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

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

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:

Weighted Inverse Distance

This method is based on weights that are proportional to the square of the distance from the center(Xe) of the search radius (Rs).

The general formula for weighted inverse distance is as follows.

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

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

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:
Back to top

References

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

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.