IDW Interpolator - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

The IDW Interpolator is best suited for data values that produce arbitrary values over the grid, that is, data that does not have any relationship or influence over neighboring data values, such as population. This method of interpolation also works well for sparse data. The IDW Interpolator calculates the value of grid cells that cover the mapping area. Each data point value from the source table that is considered in the calculation for a cell value is weighted by its distance from the center of the cell. Because the interpolation is an inverse distance weighting calculation, the farther the point is from the cell, the less influence its value will have on the resulting cell value. MapInfo Pro's grid mapping process begins by determining the minimum bounding rectangle (MBR) of the source table. The grid is divided into equal sized square cells of some size. For example, using the Grid default template, the States table in MapInfo Pro's sample data set creates a grid dimension of 200 cells by 303 cells. By calculating the number of cells in the grid and knowing the dimension of the MBR, MapInfo Pro determines that each cell needs to be 18.1 by 18.1 miles square. (The cell size will be in whatever distance units set for the Map window. To change the units, select Map > Options > Map Units.)

The IDW Interpolator settings can be controlled via the Settings button in the Create Thematic Map - Step 3 of 3 dialog when creating a grid thematic map. The cell size number in this interpolator settings dialog represents both the height and width of the cell. Any change to the cell size will result in an automatic update of the grid dimensions. With the cell size and the source points and values known, MapInfo Pro calculates a value for each cell. This value is determined by calculating a distance-weighted average of the points that lie within the specified search radius. Points are inversely weighted by their distance from the center of the cell. In the IDW Interpolator, the exponent determines how much influence each point will have on the result. The higher the exponent, the greater the influence closer points will have on the cell value. Exponents can range from one to 10. You can also choose an aggregation method for the z-values of coincident source data points (ones that fall within area of same grid cell). Coincident data points can be aggregated by average, count, sum, min, and max. Average method is aggregation default.

IDW Interpolator Settings for Create Grid Statement

For the MapInfo Pro IDW Interpolator, when specifying the following parameters in the Create Grid Statement syntax:

Using num_parameters parameter_name : parameter_value 
	[ parameter_name : parameter_value ... ] 

the following parameter_name : parameter_values may be used.

  • "EXPONENT": "number" - Minimum value 1, maximum value 10, default exponent is 2. The higher the number, the greater the influence closer points have on the cell value being computed.
  • "SEARCH RADIUS": "number" - Must be greater than zero, default setting is 10 units.
  • "MIN POINTS": "number" - Must be greater than zero, default setting is 1. The minimum points required for calculating value of a grid cell.
  • "MAX POINTS": "number" - Must be greater than zero, default setting is 25. The maximum points used for calculating value of a grid cell.
  • "GRID HEIGHT": "number" - Must be greater than zero, default setting is 100. The minimum height of grid in cells. The result is affected by aspect ratio, but height in cells result should be a minimum of this value.
  • "GRID WIDTH": "number" - Must be greater than zero, default setting is 100. The minimum width of grid in cells. The result is affected by aspect ratio, but width in cells result should be a minimum of this value.
  • "CELL SIZE": "number" - Size of grid cell in distance units. Must be greater than zero and default size is 100, if not specified.
  • "BORDER": "number" - Number of cells beyond the table's bounding rectangle by which to expand the grid. This is useful if you are interpolating with data from a point table but are clipping to a region table.
  • "AGGREGATION METHOD": "number" - Aggregation method of coincident points located in same cell. The default is aggregation method is Average or 0. Most of the parameters for the interpolator correspond to controls in the interpolator settings dialog box. Instead of passing a string for aggregation, however, a number will be used.
Average 0
Count 1
Minimum 2
Maximum 3
Sum 4

If parameter name : parameter is not provided, then a default value is used. If all default interpolator settings are desired, then set Using num_parameters to 0.

See Also:

Create Grid statement, READ ONLY Parameter for TIN and IDW Interpolators