Geography Reference
In-Depth Information
The Comparison operators are as follows:
Greater than (shown in the expression as >),
Less than (shown in the expression as <),
Greater than or equal to (shown in the expression as >=),
Less than or equal to (shown in the expression as <=),
Equal to (shown in the expression as ==),
Not equal (shown in the expression as !=),
The Boolean operators may be used in general expressions as well. Zero values are assumed to be
FALSE. Nonzero values are considered TRUE.
18. Subtract 25 from Basic_Raster to make the raster Bas_Ras_minus_25. Look at the attribute
table of the result. From the attribute table, how many values of zero are there? ________. If you
now use the Boolean operator not (~), you can make all the zeros turn into 1s, and the nonzero
values into 0s.
The expression to do this is ~”Bas_Ras_minus_25”. Using this expression make a raster
named T_F_Swap. Check the raster T_F_Swap to verify that the cells containing zeros of
Bas_Ras_minus_25 have become 1s and the nonzero cells have become 0s.
How many values of one are there? ________. Where are the zeros, compared to Bas_Ras_
minus_25? ____________________________________________________.
Floating-Point Rasters
If the following math stuff leaves you scratching your head, don't worry about it. The point is that Spatial
Analyst can do a lot of esoteric operations on rasters. Just go with the flow, even if the details escape you.
19. Bring up a new map without saving changes to the former one. Find and start the Create
Random Raster (Spatial Analyst) tool in ArcToolbox. For the Output raster, browse to the folder
Raster_Experiments > Ras_Expr.gdb and call the new raster Ran_Ras. Save. Leave the Seed
value for the pseudorandom number generator blank. 4 For the output cell size, use 100. For the
Output extent, use the four numbers you wrote down above (x & y minima, x & y maxima) for
Basic_Raster. OK the window. The raster Ran_Ras will be added to the map.
20. Ran_Ras consists of 42 cells, whose values are approximately uniformly distributed between
zero and one. For Symbology, pick a Color Ramp that goes from light to not too dark. Use the
4 You can look on the Web for “pseudorandom number generator” to see several hundred thousand Web pages. The
seed is the number that starts the process off. If you don't specify the seed, it is taken from the computer's clock, which
counts the number of seconds that have elapsed since the January 1, 1970. Computers cannot actually generate true
random numbers, as you would (for all we know) if you repeatedly threw a die. Computers are completely determin-
istic, so with a given seed and a given program you will always get the same sequence of random digits. Hence the
word “pseudo.”
 
 
Search WWH ::




Custom Search