# Single Grid Arithmetic or Map Algebra

After changes, map will be redrawn.  This changes the values in the grid, but does not automatically save the changed grid, so if you want to keep the original grid, operate on a copy, or insure you save with a new name.  If you want to save the new grid, do so with the "File, Save DEM" menu choice.
• Range shifts
• Set z range to a constant: pick a range of elevations, and all values within that range will be set to a single value.
• Expand given z range: pick a range of elevations, and a new range to expand them to.  The scaling will be linear, and can either increase or decrease the range of elevations.  Points outside the range will be set to the range limits.
• Round to byte range: min value to 0, max to 254 (255 is missing data), and linear range between.  If there are large tails in the historgram, this may not work well.  You can save as bytes for reduced storage.
• Round to byte range, percentiles: if the distribution has long tails, will waste a lot of the color range.  Use this option for better use of the grayscale.  You can save as bytes for reduced storage.
• Unit conversions
• Slope degrees to percent
• Math operations
• Multiply z values: one use is to multiply by -1 for digital bathymetry with positive values for depths.
• Add a grid: any missing data will become missing; if you want to keep those, make the holes 0 first
• Subtract a grid: any missing data will become missing; if you want to keep those, make the holes 0 first
• Raise/lower z values: add (+ values) or subtract (- values) a constant from every point in the grid.
• Subtract an open grid: pick an opened grid, and subtract its value from the the current grid, which must be compatible in size and spacing.  This can also be done on Raster GIS, Difference between two grids, but that option may not work with a really large grid since it requires all three grids to be in memory.  By changing the one grid already in memory, this option will run with 2/3 of the memory.
• Math functions
• Log base 10 transform:
• Ln transform:  (natural log)
• Tangent (degrees):
• Arc tangent: pick a multiplier and then the arc tangent of the value times the multiplier.  This can make the statistical distribution more Gaussian.
• Absolute value

Last revision 4/14/2022