| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Algorithm :: References :: Related |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI * | String | Input file name | 1 - 192 | |
| FILO * | String | Output file name | 1 - 192 | |
| DBVS * | Integer | Input vector segment | 1 - | |
| DBOC * | Integer | Output interpolated image | 1 - 1 | |
| DBOW | Integer | Output window | 0 - 4 | Xoffset, Yoffset, Xsize, Ysize |
| EXTRAP | String | Extrapolate (YES|NO) | 0 - 3 | YES | NO Default: YES |
| FLDNME | String | Field name for elevation | 0 - 64 | Default: ATTRIBUTE |
| MONITOR | String | Monitor mode | 0 - 3 | ON, OFF Default: ON |
| Back to top |
FILI
Specifies the name of the GDB-format file that contain the GDB layer information.
FILO
Specifies the name of the GDB-format raster file to receive the output interpolated images.
If FILI and FILO are both raster files, FILI can be equal to FILO.
DBVS
Specifies the input vector segment from which the attribute value or z-coordinate is used as the basis for interpolation.
The vector segment can specify an arbitrary number of structures.
DBOC
Specifies the output image channel to receive the interpolated results.
DBOW
Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) to be output. If this parameter is not specified, the entire channel 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. The specified offset + size must not exceed the size of the image.
EXTRAP
Specifies whether to extrapolate the output data.
FLDNME
Specifies the field name that contains the elevation values.
If this parameter is specified as ZCOORD, the actual z-coordinates of the vectors are used. Field names are not case-sensitive, and they do not need to be specified in complete form. If more than one match exists, the first name is used.
The Field Name (FLDNME) parameter is required only for vector layers that contain 3-D points or contours. For 3-D lines, the z-coordinates are automatically used. For 2-D layers, the elevation values are not specified.
The same name applies to all contour and 3-D point segments specified in the input vectors (DBVS) parameter. The segments that do not satisfy this requirement can be converted to the required format using ZVALTRNS.
If a field name other than ZCOORD is specified but is not found, this function attempts to use the z-coordinates of each vertex or point; this may, however, lead to unexpected results.
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 |
NNINT uses the Natural Neighbor Interpolation method to read the gray-level values for an arbitrary number of pixel locations. The gray-level values are used to generate a raster image based on the interpolation obtained from the specified gray levels.
The gray-level values are read from either a GDB layer or a vector segment stored in the input file.
Speed
The order of complexity of NNINT is O(n^2) for n data. For a local area within a large data set, it is recommended that you restrict the output image size by specifying it using the DBOW parameter.
| Back to top |
The following example reads XYZ data from the GDB layer, dem100.dat and writes the results to the raster file irvine.pix, on output channel 8.
EASI>fili = "dem100.dat;XYZ" ! input channel containing points EASI>filo = "irvine.pix" EASI>dbvs = ! input not from DBVS EASI>dboc = 8 ! channel to receive results EASI>dbow = ! process entire image EASI>extrap = "YES" ! extrapolate EASI>fldnme = ! not required EASI>RUN nnint
| Back to top |
NNINT implements the Natural Neighbor Interpolation method and the NNGRIDR code developed by Dr. D.F. Watson at the University of Western Australia.
The Natural Neighbor coordinate was invented by Professor Robin Sibson, [Sibson 1980]. It can have more than one reference point. It is measured by the ratio of the area associated with one of the reference points to the total area surrounded by all of the reference points. For more information, see the Reference section.
The data from the input channel can be corrected then added to the Natural Neighbor Interpolation algorithm, which finds the natural neighbors and performs the interpolation.
The data becomes a natural neighbor when it is located on the circumference of a circle. Natural neighbors of a data set are found by laying down the least number of the largest possible circles that completely cover the convex hull of data with no data present within the circle. This is achieved by constructing each circle with exactly three data points, which form a Delaunay triangle.
Any position (x) inside the triangle formed by the three data points (the Delaunay triangle vertices) is interpolated based on the weight or distance between x and each point. The relevant circle is also determined by the three points.
The interpolated value of a location is based on the influence from all of the circles that it intercepts. The interpolated value equals the sum of the product of the Natural Neighbor's coordinate and the gray level of each data point.
For example:
___
f(x) = \ Nx(i) * f(P(i))
/__
i
| Back to top |
Sibson, R. "A vector identity for the Dirichlet tessellation", Math Proc. Cambridge Philos. Soc., no. 87 (1980): 151-155.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.