Transform - Tiles

Transforms which appear in the template list when a raster data field, of type tile, has been picked in the Transform pane.  

 

Tech Tip:  Manifold runs CPU parallel and also GPU parallel, as discussed in the GPGPU topic.   Having a GPU can make a huge difference in speed for many transforms that work with raster images, for example, when computing Curvature or Slope or Aspect using a radius of 3 or more.  Manifold running without a GPU installed will automatically use CPU parallelism instead for spectacular parallel speed, but with a GPU installed Manifold can often run dramatically faster.    Installing at least one, inexpensive NVIDIA GPU card in our systems allows such operations to run with astonishing speed, at times reducing computations from minutes to seconds or from hours to seconds.  A wide range of GPU cards costing from under $100 to around $250 will make a spectacular difference.

Data Types in Images

Transforms for raster images will out put float64 data type by default.   If our input image use integers or some other numeric data type for the channel we use, we can change the data type used for output by choosing whatever numeric type we want in the Channel type parameter that appears in the Transform pane.

 

For examples and illustrations of options and available operations, click on the template's link to jump to that template's topic.

 

Arithmetic

Basic arithmetic operations, allowing choice of Channel in multichannel raster images, automatically providing choice of a second parameter, specified in the Value box and typically allowing a field, a specific value, or an expression, for operations that use an additional parameter.   Save the result into the specified Result destination using the specified numeric type.

 

  • absolute value (abs) - Compute the absolute value of pixel values in the source channel.  Absolute value leaves positive numbers unchanged and converts negative numbers into their positive equivalents.   
  • add (+) - Add the Value to pixel values in the source channel.
  • cube - Compute the cube of pixel values in the source channel.
  • cube root (cbrt) - Compute the cube root of pixel values in the source channel.
  • divide (/) - Divide pixel values in the source channel by the Value.
  • divide integral (div) - Divide pixel values in the source channel by the Value and discard any fractional part.
  • divide remainder (mod) - A classic modulo operation (the remainder (of a congruence) function): Divide pixel values in the source channel by the Value and retain only the fractional part as a non-fractional whole number.
  • error (erf) - Compute the error function (also called erf(z) ) of pixel values in the source channel.  
  • error complement (erfc) - Compute the complementary error function (also called erfc(z) ) of pixel values in the source channel.
  • exponent (exp) - The exponential function: Compute e to the power of the source field number.   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   
  • exponent binary (exp2) - Also known as the power of 2: Compute 2 to the power of pixel values in the source channel.  If the source field has values 1, 2, 3,... the result of a binary exponentiation will be 2, 4, 8,....   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   
  • exponent decimal (exp10) - Also known as the power of 10: Compute 10 to the power of pixel values in the source channel.  If the source field has values 1, 2, 3,... the result of a decimal exponentiation will be 10, 100, 1000,....   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   
  • gamma (tgamma) - Compute the gamma function of pixel values in the source channel.  
  • gamma logarithm (lgamma) - Compute the natural logarithm of the gamma function of pixel values in the source channel. 
  • logarithm (log) - Compute the base e logarithm (also called the natural logarithm) of pixel values in the source channel.
  • logarithm binary (log2) - Compute the base 2 logarithm (also called the binary logarithm) of pixel values in the source channel.
  • logarithm decimal (log10) - Compute the base 10 logarithm (also called the common logarithm) of pixel values in the source channel.
  • multiply (*) - Multiply pixel values in the source channel by the Value number.
  • power (pow) - Compute the source field to the power of the specified Value.  A power of 1 is pixel values in the source channel unchanged, a power of 2 is pixel values in the source channel squared, and a power of 3 is pixel values in the source channel cubed.
  • reciprocal - One divided by pixel values in the source channel.  The reciprocal is also pixel values in the source channel to the power of -1, another way of saying the same thing. The reciprocal of zero is undefined, and thus returns a NULL.
  • sign (sign) - Report if pixel values in the source channel are positive (return 1) or negative (return -1).   The sign of zero is 0.
  • sign invert - Multiply pixel values in the source channel by -1, thus inverting the sign of the pixel value  
  • square - Compute the square of pixel values in the source channel (the pixel value multiplied by itself).
  • square root (sqrt) - Compute the square root of pixel values in the source channel.
  • subtract (-) -  Subtract the Value from pixel values in the source channel.
  • subtract from (-) - Subtract pixel values in the source channel from the Value.

 

Compose

Compose a tile value, either a new tile value composed from specified channels or a rearrangement of an existing tile field by rearranging existing channels:

 

  • pixels - Compose a new tile from numeric values or single-channel tiles.  

  • rearrange channels - Rearranges channel values in an existing tile.  Setting a specific channel to (none) sets it to 0.

 

Contour

Using values in the specified Channel of a raster image as heights of terrain, create a drawing with vector areas or vector lines representing contours for the terrain heights from the specified minimum height to maximum height, using intervals of the given Step.   Each area record will have ValueMin and ValueMax attribute fields giving the minimum and maximum height for that contour area.  

 

Clicking Full Range will automatically load the Start and End boxes with minimum and maximum elevation values found in the channel.  Checking Round start and end to step will round the values of the start and end contours to align as round numbers with the step amount.

 

The Split into shapes option, when checked (default), will automatically split all areas for the same range of contour interval values into separate area objects.   Unchecking this option will result in the creation of a single, multibranched area object for each contour interval value range.  This makes for a simpler results table and the ease of selecting all like areas with a single Ctrl-click, but when starting with larger raster data it can result in very large areas, consisting of millions of coordinates to cover all of the branches.

 

Copy

Provides numerous operators to extract or to compute pixel or tile characteristics and to save to the specified Result destination, using the data type required and providing options for each operation.  Available operations include:

 

  • channel - Extract raster data from the given Channel and copy to the Result destination, creating a new image if desired from the result.
  • channel average - Report the average value for the given Channel for pixels in the tile. For example, if the image has a single channel with pixel values giving terrain elevation, this will report the average terrain elevation in the tile.
  • channel maximum -  Report the maximum value for the given Channel for pixels in the tile.  For example, if the image has a single channel with pixel values giving terrain elevation, this will report the maximum terrain elevation in the tile.
  • channel minimum - Report the minimum value for the given Channel for pixels in the tile.  For example, if the image has a single channel with pixel values giving terrain elevation, this will report the minimum terrain elevation in the tile.
  • channel std deviation - Report the standard deviation of values for the given Channel for pixels in the tile.
  • channel std deviation pop - Report the square root of the population variance of values for the given Channel for pixels in the tile.
  • channel sum - Report the sum of values for the given Channel for pixels in the tile.
  • channel variance - Report the sample variance of values for the given Channel for pixels in the tile.
  • channel variance pop - Report the population variance of values for the given Channel for pixels in the tile.
  • number of channels - Report the number of channels in the tile.
  • number of missing pixels - Report the number of NULL pixels in the tile.
  • number of pixels - Report the number of non-NULL pixels in the tile.
  • pixels - Copy tile pixels into the specified Result destination.
  • x size - Report the x size of the tile in number of pixels.  A 128x128 tile will have an x size of 128.
  • y size - Report the y size of the tile in number of pixels.  A 128x128 tile will have a y size of 128.

 

Expression

Save the numeric result of the given expression into the specified numeric Result destination, creating new fields using the specified numeric type.

 

Filter

Provides numerous operators to compute image characteristics using matrix filters and to save to the specified Result destination, using the data type required and providing options for each operation. The Radius value sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter:  A Radius of 1 results in a 3x3 pixel array. The Shape parameter allows choosing a matrix filter shape that is a circle, cross, diamond, or square (the default).   Available operations include:

 

  • average - Interpolate pixel values based on radius, averaging pixel values over the given shape array of pixels.  Similar to median but using the average of values and not the median as median does.  As a matrix filter, average is identical to blur, but using a fixed Center value of 1.  average is provided for convenience, since not all uses may realize that blur using a Center value of 1 is just averaging.
  • blur - Identical to average, but allows specifying the Center value instead of using a fixed Center value of 1.  The Center value is the weight to give the center pixel: a weight of 1 means not to emphasize it.  A weight of 5 means to give the center pixel's value five times the value in averaging compared to other pixels in the array. 
  • blur direction - Same as blur but emphasizing the direction specified by the given Angle, specified in choice of Unit (Arc Minute, Arc Second, Degree, or Radian).
  • blur gaussian - Similar to blur, but  averaging pixel values over a circular radius  with a convolution function computed using a Gaussian function.   Radius has a greater visual effect than Center.  blur gaussian computes on a corrected circular radius while blur computes on a square, cross or uncorrected circular matrix. 
  • count - Reports the total number of non-NULL pixels within the given filter shape of given radius.  
  • diversity - Reports the total number of different pixel values within the given filter shape of given radius.  
  • diversity index - Reports the diversity index of pixel values within the given filter shape of given radius.  A diversity index provides a measure of diversity, computed as 1 - sum(individualcount^2) / (totalcount^2), 0 means that all values are equal.  
  • edges - Find edges (transitions between pixel values) in any direction.  Begin by setting Radius and Center to 1.  Take the source pixel values, emphasize edges (increasing pixel values) by examining pixel values over a square array of pixels and save to the specified Result destination.
  • edges direction - Same as edges but looking for pixel changes along a direction specified by the given Angle, specified in choice of Unit (Arc Minute, Arc Second, Degree, or Radian).
  • major - Reports the most frequently occurring pixel value within the given filter shape of given radius.  
  • maximum - Reports the maximum pixel value within the given filter shape of given radius.  
  • median - Similar to blur but using the median of values and not the average as blur does. 
  • minimum - Reports the minimum pixel value within the given filter shape of given radius.  
  • sharpen -  Enhance contrast and edge detection by comparing pixel values within the given filter shape of given radius.  
  • std deviation - Calculates the standard deviation using pixel values with non-zero weights within the given filter shape of given radius.
  • std deviation pop - Calculates the square root of the population variance using pixel values with non-zero weights within the given filter shape of given radius.
  • sum - Calculates the sum of pixel values within the given filter shape of given radius.  
  • variance - Calculates the sample variance using pixel values with non-zero weights within the given filter shape of given radius.
  • variance pop - Calculates the population variance using pixel values with non-zero weights within the given filter shape of given radius.

 

Note:  GPU parallelism switches to CPU parallelism at a Radius of 9 or greater.

 

Hyperbolic

Basic hyperbolic trigonometric operations, allowing choice of radial unit from Arc Minute, Arc Second, Degree or Radian.    Save the result into the specified Result destination using the specified numeric type.

 

  • hyperbolic arc cosine (acosh) - Compute the hyperbolic arc cosine of pixel values in the source channel.
  • hyperbolic arc sine (asinh) - Compute the hyperbolic arc sine of pixel values in the source channel.
  • hyperbolic arc tangent (atanh) - Compute the hyperbolic arc tangent of pixel values in the source channel.
  • hyperbolic cosine (cosh) - Compute the hyperbolic cosine of pixel values in the source channel.
  • hyperbolic sine (sinh) - Compute the hyperbolic sine of pixel values in the source channel.
  • hyperbolic tangent (tanh) - Compute the hyperbolic tangent of pixel values in the source channel.

 

Limit

Limit values of a specific channel in a tile: 

 

  • limit both - limit values to a range between the minimum and maximum values specified.  

  • limit maximum - limit values to no greater than the maximum value specified.
  • limit minimum - limit values to no less than the minimum value specified.

 

Path

Template options that compute closest path analytics, similar to the Distance tools in ESRI's Spatial Analyst toolset.  The transform provides three basic Path types. Each of those can compute results in three different Output types, providing a total of nine different combinations of Path type and Output type.   See the Raster Paths topic for a conceptual background.    

 

The Path transform should be launched with the focus on an image layer in a map that also contains a vector drawing layer that provides points for starting locations.  Points used in path computations can be restricted to only those selected, using the Start from selection only check box.  The Path transform allows a choice of Channel to use in multichannel images.  

 

Path type options:

 

  • cost - (Formerly known as Path) Measure distance through a lowest cost pixel-to-pixel route, taking the value of each pixel as its cost, which might not be direct, from each pixel to the closest point.  Avoids pixels with NULL values.  Checking the Use equal costs box (the default) uses the same cost for all pixels.  The overall length of the path is thus the cost of the path, with the shortest pixel-to-pixel path being the least cost.  Unchecking the Use equal costs box counts the value of each pixel as the cost of that pixel, and adds up the costs of pixels that the path goes through to get the total cost of the path.    
  • cost for slope - (Formerly known as Slope) First calculate slopes for the raster, and then compute lowest-cost path distances using the slope for each pixel where going downhill on a slope has lower cost than going uphill.
  • Euclidean - Measure distance by simple, straight line, Euclidean distance from each pixel to the closest point.   When the Use barriers box is checked, Euclidean templates will find the shortest route using straight line segments which avoids NULL pixels, called barriers, .

 

Output type options:

 

  • direction - Report the direction from the pixel to the closest point.
  • distance - Report the distance from the pixel to the closest point.
  • value - (Formerly known as Source Z value) Fill each pixel with the same value, either taken from a field value for the closest point, or with a sequential value.

 

Value options:

 

  • (sequential values) - Assign a sequential integer value (zero based counting) to pixels closest to each point.  If there are three points, all pixels closest to the first point will be assigned the value 0, those pixels closest to the next point will be assigned a value of 1, and those pixels closest to the third point will be assigned a value of 2.
  • <choose a field> - Choose a field from which the value will be assigned to all pixels associated with that point as a closest point.

 

Parameters for cost for slope:

 

  • Min slope, Max slope - Allowed minimum and maximum slopes in degrees.   The path will be routed around any pixels that have a slope value less than the minimum slope or greater than the maximum slope.  The slope of a given pixel can be interpreted as a negative slope or a positive slope depending on the direction we are travelling.  The default values of -90 and 90 mean to use pixels with all slopes.  A more realistic scenario is not to walk off a cliff (-90) or to attempt to scale a cliff (90).   We can specify the minimum and maximum slopes acceptable, such as not descending by any slopes steeper than -30 degrees, or ascending by any slopes greater than 30 degrees.  
  • Min slope costMax slope cost - The cost of a pixel in the path, based on the slope of the pixel and the Min cost and Max cost values.   The Min slope cost value is the cost for pixels that have the specified Min slope value of slope.   The Max slope cost value is the cost for pixels that have the specified Max slope value of slope.  The costs of all other pixels are interpolated, based on their slopes, between the Min slope cost and Max slope cost values. The default value of 0 for Min slope cost in most cases will be replaced by 1, so that all pixels have at least some cost.   The default value of 2 for Max slope cost in most cases will be replaced by a larger number, such as 100, to allow for a greater range of values between minimum and maximum costs.
  • Flat Cost - The per pixel cost of a path over flat, that is, zero slope, terrain.  It makes sense to make this about halfway between the Min cost and Max cost values.

  • Reverse path - Paths in cost for slope operations are computed by default from each pixel in the raster to the source point.  Checking the Reverse path box switches directionality to compute paths from source points to each raster pixel in their domain.   The direction matters because a downward slope path is shorter, that is, lower cost, than the reverse upward path.

 

Round

Rounding operations.   Save the result into the specified Result destination using the specified numeric type.  The Round to box allows choosing the decimal position for rounding, for example, rounding to decimal fractions like 0.001 or rounding to whole decimal positions like 10000.

 

  • down (floor) - Round down to the next lowest Round to position value. 400.7 would round down to 400.   -400.7 would round down to -401 (which is a smaller amount, and thus "down," from 400).
  • to nearest (round) - Round up or down to the nearest Round to position value. When rounding to 1, a value of 400.5 or greater fraction will get rounded up to 401 while fractional parts less than .5 will get rounded down to 400.
  • to zero (trunc) - Rounding towards zero: Equivalent to rounding down for positive numbers, and rounding up for negative numbers.
  • up (ceil) - Round up to the next highest Round to position value. 400.2 would round up to 401.   -400.2 would round up to -400 (which is a large amount, and thus "up," from 400).

 

Slope

Transforms for computing slope and other characteristics related to tilt, aspect and curvature of a surface, treating pixel values as heights that imply the surface.  The Channel to use may be specified in multi-channel images.  Templates typically provide a Radius value that sets the number of pixels from the center pixel to the edge of the matrix used to compute the filter:  A Radius of 1 results in a 3x3 pixel array.  

 

  • aspect - Compute the direction in which the slope of the terrain faces and save as a pixel value using the desired Unit of angular measure.  When using degrees,  0 to 180 degrees represent the Eastern semicircle and -1 to -179 degrees the Western semicircle.  
  • gaussian curvature - Compute Gaussian curvature of the terrain surface at each pixel of a surface, computed over a square matrix of the given radius.  Gaussian curvature is the product of the curvature in the direction of greatest curvature and the curvature in the direction of least curvature.  
  • mean curvature - Compute mean curvature of the terrain surface at each pixel of a surface, computed over a square matrix of the given radius.  Mean curvature is the average of the curvature in the direction of greatest curvature and the curvature in the direction of least curvature.  
  • plan curvature - Compute planform curvature of the terrain surface at each pixel of a surface, computed over a square matrix of the given radius.  Planform curvature computes curvature perpendicular to the direction of maximum slope.  Plan curvature brings out ridges and valleys in a surface.  See the ESRI blog entry for a good discussion.
  • profile curvature - Compute profile curvature of the terrain surface at each pixel of a surface, computed over a square matrix of the given radius.  Profile curvature computes curvature parallel to the direction of maximum slope. Profile curvature brings out terrace effects in a surface.  See the ESRI blog entry for a good discussion.
  • slope - Compute the inclination of the surface at each pixel position expressed using the specified Unit of angular measure.  When using degrees, the slope will vary in the range 0 to 90.

 

The Unit of measure to be used for the result can be picked from Arc Minute, Arc Second, Degree, Grade or Radian.

 

  • Arc Minute, Arc Second, Degree, Radian -  Standard units of angular measure. The angle of the slope surface to the horizontal.

  • Grade - A percentage, 100 * (rise/run), which is equivalent to the tangent of the angle of the slope surface to the horizontal.

 

Caution: Slight increases in Radius can cause disproportionately large increases in the computation time required.  Without a GPU a Radius of 3 is slow but tolerable because Manifold will run CPU parallel for better speed.   With a GPU, even incredibly large computations involving a Radius of 7 or even 8 are possible on a desktop machine, as Manifold will automatically GPGPU parallelize the aspect calculation.   Without a GPU, start with a Radius of 1 and then scale up slowly to see where patience ends.   As a practical matter, there is not much gain in accuracy of aspect computation when increasing Radius beyond 4 or 5.   GPU parallelism switches to CPU parallelism at a Radius of 9 or greater, so it makes sense to use a Radius of 8 or less with bigger images.

 

Special

Bessel function operations, with specification of Order. Order may be taken from a field, or specified by a value or by an expression.  Save the result into the specified Result destination using the specified numeric type.

 

  • Bessel 1st kind (jn) - The nth Bessel function of the first kind: Compute  the Bessel function Jn(x) for Order n using pixel values in the source channel as x.  Specifying 2 for Order uses a J2(x) Bessel function.  Using 0 or 1 for the Order is equivalent to using J0(x) or J1(x), respectively.
  • Bessel 2nd kind (yn) - The nth Bessel function of the second kind: Compute the Bessel Function Yn(x) for Order n using pixel values in the source channel as x.  Specifying 2 for Order uses a Y2(x) Bessel function.  Using 0 or 1 for the Order is equivalent to using Y0(x) or Y1(x), respectively.

 

Trace

(Formerly called Trace Areas)  Using values in a raster image, create a drawing with vector areas covering regions of similarly-colored, that is, similarly-valued, pixels. Each area will also have a Value attribute field giving the pixel value for which it was created.  The template can create areas whether values for pixels are intended as colors or as elevation or other values.  

 

The Similarity factor gives the range within which pixel values will be considered to be in the same classification.  A Similarity of 10 would group values of 11, 14, and 18 together in one group and values of 20, 23 and 27 in a different group.  The default value of 1 for Similarity means to treat pixels within the same integer values as unique.   A value of 0 for Similarity would treat each unique pixel value found as a separate classification (using 0 is often a mistake given there might not be an intended difference between close pixel values such as 1.00003 and 1.000031).

 

The Split into shapes option, when checked (default), will automatically split all areas for the same class of color into separate area objects.   Unchecking this option will result in the creation of a single, multibranched area object for each class.  This makes for a simpler results table and the ease of selecting all like areas with a single Ctrl-click, but when starting with larger raster data it can result in very large areas, consisting of millions of coordinates to cover all of the branches.

 

Trigonometric

Basic trigonometric operations, allowing choice of radial unit from Arc Minute, Arc Second, Degree or Radian.    Save the result into the specified Result destination using the specified numeric type.

 

  • arc cosine (acos) - Compute the arc cosine of pixel values in the source channel.
  • arc sine (asin) - Compute the arc sine of pixel values in the source channel.
  • arc tangent (atan) - Compute the arc tangent of pixel values in the source channel.
  • cosine (cos) - Compute the cosine of pixel values in the source channel.
  • sine (sin) - Compute the sine of pixel values in the source channel.
  • tangent (tan) - Compute the tangent of pixel values in the source channel.

 

Viewshed

Given a map that contains a raster image layer with heights in pixel values and also a vector drawing layer that provides the locations and heights of observers as points, the Viewshed template computes viewsheds, that is, visibility of regions from the various observer points.  

 

The template provides five different Output options, two of which report results by creating a new drawing, and three of which report results by creating a new image.  

 

Output options that create a vector drawing:

 

  • visible area from all - Create areas covering regions visible from all observer points.
  • visible area from any  - Create areas covering regions visible from any single observer point.

 

Output options that create a single channel, raster image:

 

  • visible count - The value in each pixel reports the number of observer points from which this pixel is visible.
  • visible level from all - The value in each pixel reports the vertical level this pixel must have to be visible from all observer points.
  • visible level from any  - The value in each pixel reports the vertical level this pixel must have to be visible from any single observer point.

 

The heights of observers can be taken from a numeric attribute field in the observer points table, or directly from Z  geometry values for points (the default). If Z values are taken from a numeric field, they can be computed relative to the raster height (on by default) or taken as an absolute height.

 

There are options to specify refraction (the default is 0.13), minimum angle ( default -90 degrees), maximum angle (default 90 degrees), radius (default is 0 = no limit), and whether or not to use datum curvature (the default is not to use).   Observer points can be restricted to only selected points.

 

See the Viewsheds topic.

 

Watershed

Compute watersheds in terrain elevation data in the specified Channel and output the watershed analysis in various forms.  The Minimum flow parameter specifies the minimum total flow in the basin required to create a watershed area or stream line. Smaller Minimum flow values will result in many more, smaller areas or streams. Larger Minimum flow values will result in fewer, larger areas or streams.  The Water channel parameter allows choosing a channel in the image that provides relative water amounts dropping onto each pixel.

 

Available Output forms:

 

  • areas - Create areas that show regions of common drainage and save to the specified vector Result destination.

  • downstream lines - Given a channel with terrain elevation data plus a drawing that contains points, create the stream line for each point by which water issuing from the point flows further downstream.

  • lines - Create lines that show networks of streams into which water flows within a region of common drainage.

  • sink areas - Create areas that show sinks, regions that are closed drainage basins.  The areas created do not depend on minimum flow, since each area will cover all territory where rainfall drains into the same sink.

  • upstream areas - Given a channel with terrain elevation data plus a drawing that contains points, create watershed areas from which water drains into each point.  Upstream areas computations usually only make sense for points that are located on a watershed stream line.

  • upstream lines - Given a channel with terrain elevation data plus a drawing that contains points, create the stream lines by which water drains into each point.    Upstream lines  computations usually only make sense for points that are located on a watershed stream line.

 

Fields created:

 

  • mfd_id - Manifold identify field.

  • Geom - The geometry of the area or stream watershed object.

  • Stream - The watershed identifier for the watershed area or stream line object into which water from this object flows.

  • Target - The watershed identifier for the watershed area or stream line object into which water from this object flows.

  • OrderShreve - Watershed order computed using Shreve ordering.

  • OrderStrahler - Watershed order computed using Strahler ordering.

  • Value - The flow contributed by this watershed object.

  • ValueSum - The total flow through this watershed object, including all flow from upstream watershed objects as well as flow from this object.

 

Watershed Prepare

(Formerly Fill Sinks) Fills sinks in terrain elevation data based on specified criteria, a necessary first step before many Watershed operations.

 

Choice of Fill height and Fill flow control how sinks are filled as follows:

  

  • If both Fill height and Fill flow are negative or zero, the image is left unchanged.

  • If Fill height is positive and Fill flow is negative or zero, sinks are filled based solely on height, that is, the depth of the sink.

  • If Fill height is negative or zero and Fill flow is positive, sinks are filled based solely on flow, equivalent to the area of the sink.

  • If both Fill height and Fill flow are positive, sinks are filled based on both height and flow.

 

Fill height and Fill flow allow us to specify whether we want to fill sinks on the basis of their vertical depth or on the basis of their areal size or on a combination of both characteristics.

 

Fill height is a measure of the vertical depth of the sink.   Sinks that are deeper than the Fill height specified will not be filled and will be left unchanged.   Sinks that can be filled with the Fill height specified will be filled.  

 

Consider a lake formed by a dam where the lip of the dam is 50  meters above the height of the lake. The lake is a sink until the level of the lake rises up above the lip of the dam and can spill over past the dam downstream.  The lake is a sink with a vertical depth of 50.   The Fill height required to fill it is 50.   At any Fill height values of 50 or greater, the lake as a sink is filled.  At any Fill height less than 50 the lake is unfilled and remains as a sink.  

 

If we use a very large value for Fill height, such as 20000 (a very big height difference whether we are measuring in feet or meters) that will be enough to fill in any sink.

 

Fill flow is a measure of the areal size of the sink.  A sink is a closed drainage basin, the total flow of which is found by assuming one unit of water falls on every pixel within the basin. To fill the entire basin we must have at least that much flow available to fill the basin.  If a sink is 1000 pixels in areal size we must have at least 1000 in Fill flow available to fill it.   

 

If we choose 1000 as the value for Fill flow that will be enough to fill all sinks that are 1000 pixels in size or less.   Sinks that are larger than 1000 pixels in size will be too big to fill with the Fill flow we have specified.    A Fill flow specification of 500 would be enough to fill a sink that is 400 pixels in size, but it would not be enough to fill a sink that is 1000 pixels in size and thus requires a minimum of 1000 in flow to be filled.

 

 

Notes

Sample image - Many illustrations for transforms for raster images use an Elevation Raster sample image, a version of the formatted example of importing an SDTS format DEM from the Example: Import DDF SDTS DEM Raster File  topic.   The example project may be downloaded from the Downloads page on the Manifold web site.

 

Bounds set to pixel extents - New images created by transforms have their bounds automatically set to the extents of visible pixels, and not to the extents of tiles.  

 

Automatic Style -  New images created by transforms use an automatic style computed from pyramid statistics, with the lowest available pixel values being set to black, the highest to white and the rest to a shade between black and white. The automatic style applies to all images which have a spatial index and which do not have an explicit style set, which also is helpful for images created by user queries and scripts. Automatic style for images with UINT8 channel values is special-cased to always map 0 to black and 255 to white, for compatibility reasons and because this is the desired behavior in the majority of cases.

 

Virtual images and selections in the image - Operations on tiles use a table with a tile field, a pair of X and Y fields, and a spatial index connecting these fields together. Images on some data sources, for example, web images, use a slightly different structure with a non-spatial index on X and Y fields, sometimes also including a level field, instead of the spatial index. Such images have to be converted to images with a spatial index prior to the operations.  A query function that operates on tiles can accept either a physical image component stored in a database, or a virtual image created on a tile field (using the ComponentFieldImage function) of a table or of a query component . A virtual image supports all functions available for regular components. Both physical and virtual images can be limited to using only selected records but the result will not be accepted as an image by query functions and will only work as a plain table with no spatial context.  Planes are to extend selections in images to be per-pixel and after that is accomplished, the result of limiting an image to only selected pixels also will work as an image.

 

Rectangles ignored - The rectangle value stored in an image component is used solely for display purposes and is ignored for both selects and transforms. Previously, some selects and transforms ignored the rectangle and others used it. Starting with this build, the system treats the rectangle as a strictly visual display frame that limits what part of the data is shown on the screen, similar to how a table window can limit which records are shown in the list by filtering field values, and ignore it for selects and transforms. Operations that do not depend on tile placement and which treat pixels independently from each other may operate either on all or on selected records. Operations that depend on tile placement always operate on all records. After per-pixel selections are implemented, all operations on images will be able to operate on only selected pixels.

 

Legacy rectangle issues - There is a potential issue with ignoring image rectangles for data analysis. Since some transforms previously used the rectangle value to limit queried data, it might have been possible for an image to contain garbage outside of the rectangle without this being noticed. It is also possible that some of the older dataports created such images during the import.  Preliminary checks on archived test files that were created with old builds have found no such images existing de-facto, but it is possible that they exist. If any such images exist in the wild, running a transform on it will read data outside of the image rectangle that might not have been read in prior builds, and the results of the current transform may differ from the results from previous builds, likely to the worse. To understand whether an image contains data in pixels outside of the image rectangle, one can force the image rectangle to the extent of visible pixels. This currently requires using a query (see the changes to the ComponentBounds function).   Upcoming builds will allow changing the image rectangle to cover all visible pixels via the UI. Upcoming builds likely will also allow cropping the image to the current rectangle, throwing away all data outside of the rectangle. Any instances indicating that a particular dataport or a UI tool may create an image with data in pixels outside of the image rectangle should be reported as a bug, to allow investigation and an immediate fix.

 

Everything Math - For a handy reference to anything in mathematics, see the Wolfram MathWorld site.   Thank you, Wolfram!

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Expression

 

Transform - Binary

 

Transform - Boolean

 

Transform - Datetime

 

Transform - Geometry

 

Transform - Numbers

 

Transform - Numeric Vectors

 

Transform - Text

 

Transform - UUID

 

Raster Paths

 

Viewsheds