/* edges.aml /* makes HSV grids for a DEM, image emphasizes changes /* in slope in low-slope areas, with elevation color-coding /* INPUT: a DEM (specify name in command line) /* OUTPUT: 3 grids, h, s, and v /* Ralph Haugerud, USGS Seattle /* last modified April 1998 /* rhaugerud@usgs.gov /* /* to be run from GRID &arg ZGrid &s slopeg = slopegrid &s ElvStep = 5 &s HueStep = 15 %slopeg% = slope(%ZGrid%, DEGREE) h0 = %ZGrid% div %ElvStep% h1 = con(isnull(%ZGrid%), 0, %ZGrid% <= 0, 180, 170 - (h0 * %HueStep%)) /* sets Z < 0 to hue = 180 (cyan) %ZGrid%h = (h1 + 7200) mod 360 %ZGrid%s = con(isnull(%ZGrid%), 0, %ZGrid% < -200, 99, %ZGrid% < 1, int(50 - %ZGrid% / 4), 40) /* if Z < 1, saturation = f(depth), else saturation = 40 %ZGrid%v = con(isnull(%ZGrid%), 99, %slopeg% > 10, 60, int(99 - 4 * %slopeg%)) kill slopegrid all kill h0 all kill h1 all &return