The functions and operators discussed in this topic are available in the Surface  Transform dialog's Formula pane. The Surface  Transform menu selection is enabled when the optional Surface Tools extension has been installed and the focus is on a surface window. If you have not activated the Surface Tools extension with a valid serial number you will not be able to use the Surface  Transform command and the functions in this topic will not be available for use with that command.
Surface  Transform functions taking a drawing name as an argument will also accept the names of drawing tables or theme components
Many functions in the Surface  Transform dialog can use NVIDIA CUDA for nearly instantaneous computation if our systems are so equipped. See the NVIDIA CUDA topic for details.
Functions
Abs(x) 
Returns the absolute value of x. 
ACos(x) 
Returns the arccosine of x in the range of 0 to pi radians. 
ASin(x) 
Returns the arcsine of x in the range of pi/2 to pi/2 radians. 
Aspect(s, w) 
Returns the aspect of s in the range of 180 to 180 degrees, computed over a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. 
Atn(x) 
Returns the arctangent of x in the range of pi/2 to pi/2 radians. 
Atn2(y, x) 
Returns the arctangent of y/x in the range of pi to pi radians. 
AvgValue(s, w) 
Returns the average value of s in a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. With CUDA, the maximum window size is 31. 
Blur(s) 
Returns the value of the Blur filter. CUDA enabled. Example: Blur([Plume A]) 
Ceil(x) 
Returns the smallest integer that is greater than or equal to x. 
Cos(x) 
Returns the cosine of x. 
CurvGauss(s, w) 
Returns the Gaussian curvature of s, computed over a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. 
CurvMean(s, w) 
Returns the mean curvature of s, computed over a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. 
CurvPlan(s, w) 
Returns the plan curvature of s, computed over a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. 
CurvProfile(s, w) 
Returns the profile curvature of s, computed over a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. 
Deg2Rad(x) 
Converts x from degrees to radians. 
DifferenceE(s) 
Returns the value of the DifferenceE filter. CUDA enabled. 
DifferenceN(s) 
Returns the value of the DifferenceN filter. CUDA enabled. 
DifferenceNE(s) 
Returns the value of the DifferenceNE filter. CUDA enabled. 
DifferenceNW(s) 
Returns the value of the DifferenceNW filter. CUDA enabled. 
DifferenceS(s) 
Returns the value of the DifferenceS filter. CUDA enabled. 
DifferenceSE(s) 
Returns the value of the DifferenceSE filter. CUDA enabled. 
DifferenceSW(s) 
Returns the value of the DifferenceSW filter. CUDA enabled. 
DifferenceW(s) 
Returns the value of the DifferenceW filter. CUDA enabled. 
Diversity(s, w) 
Returns the number of different values of s in a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. With CUDA, the maximum window size is 31. 
DiversityIndex(s, w) 
Returns the diversity index of s in a window of specified size (1 for 3x3, 2 for 5x5, etc) as a value from 0 to 1. The greater the value of the diversity index, the less similar the values in the window. CUDA enabled. With CUDA, the maximum window size is 31. 
Exp(x) 
Returns the exponent of x. 
FillSinks(s) 
Fills depressions in s. 
Fix(x) 
Removes the fractional part of x rounding towards zero (Fix(1.5) = 1, Fix(1.5) = 1). 
Floor(x) 
Returns the largest integer that is less than or equal to x. 
FlowAccum(dir, den) 
Computes flow accumulation using flow directions (dir) and optional flow density (den). 
FlowAreas(dir, str) 
Computes watersheds using flow directions (dir) and streams (str) by assigning a stream ID to all pixels in the stream watershed. 
FlowDir(s) 
Computes flow directions for s. Returns true degrees between 180 to 180 with a step of 45 degrees (0, 45, 90, etc). 
FlowStream(dir, x, y) 
Computes a stream starting at a given location using flow directions (dir). Returns 1 for pixels belonging to a stream, and 0 for all other pixels. 
FlowStreams(dir, acc, thr) 
Computes streams using flow directions (dir) and flow accumulation (acc). Streams with accumulation lower than the threshold (thr) are ignored. Returns a unique stream ID for each pixel belonging to a stream whose accumulation is higher than or equal to the threshold, and 0 for all other pixels. Note that there are two variants of the FlowStreams function, one of which takes a drawing as an argument and one that does not. 
FlowStreams(dir, drawing) 
Computes streams for all points in a given drawing using flow directions (dir). Returns a unique stream ID for each pixel belonging to a stream, and 0 for all other pixels. Note that there are two variants of the FlowStreams function, one of which takes a drawing as an argument and one that does not. 
FlowUpstreamArea(dir, x, y) 
Computes an upstream area for a given location using flow directions (dir). Returns 1 for pixels belonging to the upstream area, and 0 for all other pixels. 
FlowUpstreamAreas(dir, drawing) 
Computes upstream areas for all points in a given drawing using flow directions (dir). Returns the ID of the point object for each pixel belonging to its upstream area, and 0 for all other pixels. 
Gravity(drawing, column, neighbors, model, voronoi) 
Gravity(drawing, column, neighbors, model, voronoi) Interpolates objects in the given drawing using the given column as the height. Line objects participate as sets of their coordinates. Area objects are ignored. Setting the number of neighbors to 1 will use the default number of neighbors. The model argument should be a blank string. The voronoi argument is a boolean (if true, only Voronoi neighbors are used). All arguments except the first two are optional.

HasValue(s, dx, dy) 
Returns True if surface s has a visible pixel at current position offset by dx and dy and False otherwise. 
Height(s) 
Returns the number of rows in surface s. 
HighPass1(s) 
Returns the value of the HighPass1 filter. CUDA enabled. 
HighPass2(s) 
Returns the value of the HighPass2 filter. CUDA enabled. 
HighPass3(s) 
Returns the value of the HighPass3 filter. CUDA enabled. 
IIf(a, b, c) 
Returns b if a is True and c otherwise. 
Interpolate(s, p) 
Returns the value of s at the current pixel if it is visible and the interpolated value if it is invisible. The interpolated value is computed as the average value of s in the smallest box centered at the current pixel that contains at least one visible pixel. If all pixels in s are invisible, the function returns Null. The optional parameter p allows specification of an interpolation radius over which interpolation occurs. See the discussion for the Interpolate (Parameter) transform operator. 
InterpolateRow(s) 
Returns the value of s at the current pixel if it is visible and the interpolated value if it is invisible. The interpolated value is computed as the value of the straight line segment between the nearest visible pixels in the same row of s. If all pixels in the current row of s are invisible, the function returns Null. Overall, this function works much faster than Interpolate but is also less accurate. 
Int(x) 
Returns the largest integer that is less than or equal to x (same as Floor(x)). 
Kriging(drawing, column, neighbors, model, voronoi) 
Interpolates objects in the given drawing using the given column as the height. Line objects participate as sets of their coordinates. Area objects are ignored. Setting the number of neighbors to 1 will use the default number of neighbors. The model argument is a caseinsensitive string, e.g., "spherical" or "gaussian". The voronoi argument is a boolean (if true, only Voronoi neighbors are used). All arguments except the first two are optional. 
KrigingMedianPolish (drawing, column, neighbors, model, voronoi) 
Interpolates objects in the given drawing using the given column as the height using the medianpolish kriging interpolation method. Line objects participate as sets of their coordinates. Area objects are ignored. Setting the number of neighbors to 1 will use the default number of neighbors. The model argument is a caseinsensitive string, e.g., "spherical" or "gaussian". The voronoi argument is a boolean (if true, only Voronoi neighbors are used). All arguments except the first two are optional. 
Laplace1(s) 
Returns the value of the Laplace1 filter. CUDA enabled. 
Laplace2(s) 
Returns the value of the Laplace2 filter. CUDA enabled. 
Latitude() 
Returns the latitude of the current pixel in standard lat/lon coordinate system (lat/lon, WGS84). 
Log(x) 
Returns the natural logarithm of x. 
Log2(x) 
Returns the binary logarithm of x. 
Log10(x) 
Returns the decimal logarithm of x. 
Longitude() 
Returns the longitude of the current pixel in standard lat/lon coordinate system (lat/lon, WGS84). 
LowPass1(s) 
Returns the value of the LowPass1 filter. CUDA enabled. 
LowPass2(s) 
Returns the value of the LowPass2 filter. CUDA enabled. 
LowPass3(s) 
Returns the value of the LowPass3 filter. CUDA enabled. 
MajValue(s, w) 
Returns the most frequently occurring value of s in a window of specified size (1 for 3x3, 2 for 5x5, etc). In case of a tie, returns the lowest of the most frequently occurring values. CUDA enabled. With CUDA, the maximum window size is 31. 
Max(x, y) 
Returns the maximum value of x and y. 
MaxValue(s, w) 
Returns the maximum value of s in a window of specified size (1 for 3x3, 2 for 5x5, etc) or the maximum value of s overall. CUDA enabled. With CUDA, the maximum window size is 31. 
MedianCross(s) 
Returns the value of the MedianCross filter. CUDA enabled. 
MedianSquare(s) 
Returns the value of the MedianSquare filter. CUDA enabled. 
MedianSquare5(s) 
Returns the value of the MedianSquare5 filter. CUDA enabled. 
MedValue(s, w) 
Returns the median value of s in a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. With CUDA, the maximum window size is 31. 
Min(x, y) 
Returns the minimum value of x and y. 
MinValue(s, w) 
Returns the minimum value of s in a window of specified size (1 for 3x3, 2 for 5x5, etc) or the minimum value of s overall. CUDA enabled. With CUDA, the maximum window size is 31. 
Mod(x, y) 
Returns the remainder of the division of x by y. y must not be equal to 0. Examples: (Mod(5.2, 1.0) = 0.2; Mod(5.2, 0.3) = 0.1). 
PixelArea(unit) 
Returns the area of a single pixel in the context surface in the given units. 
PixelHeight(unit) 
Returns the height of a single pixel in the context surface in the given units. 
PixelWidth(unit) 
Returns the width of a single pixel in the context surface in the given units. 
Pow (x, y) 
Returns the value of x raised to the power of y. 
Rad2Deg(x) 
Converts x from radians to degrees. 
Rnd() 
Returns random value between 0 and 1. 
Sgn(x) 
Returns the sign of x (1 if x is negative, 1 if x is positive, 0 if x is 0). 
Sharpen(s) 
Returns the value of the Sharpen filter. CUDA enabled. 
SharpenMore(s) 
Returns the value of the SharpenMore filter. CUDA enabled. 
Sin(x) 
Returns the sine of x. 
Slope(s, w) 
Returns the slope of s in the range of 0 to 90 degrees, computed over a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. 
Sqr(x) 
Returns the square root of x. 
SumValue(s, w) 
Returns the summary value of s in a window of specified size (1 for 3x3, 2 for 5x5, etc). CUDA enabled. With CUDA, the maximum window size is 31. 
Tan(x) 
Returns the tangent of x. 
Tile(s,x) 
Returns the value of the Tile filter for surface s and tile size x pixels. CUDA enabled. 
TileMedian(s,x) 
Returns the value of the TileMedian filter for surface s and tile size x pixels. CUDA enabled. 
Triangulation(drawing, column, corners) 
Interpolates objects in the given drawing using the given column as the height using the triangulation interpolation method. Line objects participate as sets of their coordinates. Area objects are ignored. The corners argument is the height to use for corners and can be omitted. 
TriangulationContours (drawing, column, corners) 
Interpolates objects in the given drawing using the given column as the height using the contour triangulation interpolation method. Line objects participate as sets of their segments, with intersections between segments being resolved automatically. Area objects are ignored. The corners argument is the height to use for corners and can be omitted. 
Value(s, dx, dy) 
Returns the value of surface s at current position offset by dx and dy. 
Width(s) 
Returns the number of columns in surface s. 
X() 
Returns the X coordinate of the current pixel in coordinate system of the target surface. 
Y() 
Returns the Y coordinate of the current pixel in coordinate system of the target surface. 
s as an argument indicates the function takes the name of a surface (within square brackets [ ] if the name has a space character in it) as an argument. x and y as arguments are numeric arguments. CUDA enabled operators will execute automatically within NVIDIA CUDA multiprocessor hardware, if available and enabled. See the NVIDIA CUDA topic.
The filter functions in the above are analogous to the convolution matrix filters used in image transformation via the image transform toolbar. See the Transform Operators  Images for a short description of each filter.
Operators
In Boolean operators, a value of 0 is considered to be False, and all other values are considered to be True. All Boolean operators return either 0 or 1.
The following Boolean operators are available:
x And y 
Returns True (1) if both x and y are True, returns False (0) otherwise. 
x Eqv y 
Returns True (1) if both x and y are True or False, returns False (0) otherwise. 
x Imp y 
Returns True (1) unless x is True and y is False, returns False (0) if x is True and y is False. 
Not x 
Returns True (1) if x is False, returns False (0) otherwise. 
x Or y 
Returns True (1) if either of x and y is True, returns False (0) otherwise. 
x Xor y 
Returns True (1) if one of x and y is True and another is False, returns False (0) otherwise. 
Constants
Pi (3.1415926…) and Null are the only available constants. Null is used to create invisible pixels. See the Transforming Surfaces topic for examples.
See Also