/* drgtheme.aml /* aml to turn a DRG into HSV grids and merge with HSV grids for /* thematic data /* Ralph Haugerud, U.S. Geological Survey /* April 1998 /* rhaugerud@usgs.gov /* to be run from arc /* /* NOTE: Watch the resolution of your thematic-map grids! /* At 1:24,000 scale, 30 meters is too coarse. 10 meters /* is OK. /* /* NOTE 2: You may want to modify the tables drghtab, drgstab, and drgvtab /* to better define the colors that work for you. The colors that correspond /* to the DRG index values are given at the end of this aml. /* /* Make sure that none of the output grids (drgg, drgh, drgs, drgv, /* %Output%h, %Output%s, and %Output%v exist. /* /* The input thematic map is presumed to be 3 grids that are named /* xxh, xxs, and xxv where xx is the value of variable ThemMap, set below. /* /* EDIT THE FOLLOWING FOUR LINES TO SUIT: &set DRGPath = /cdrom/data/ &set DRG = o47122e7 &set ThemMap = wc &set Output = wc2 &set AreaColors = 1,5,9,10,11,12 imagegrid %DRGPath%%DRG% drgg display 0 GRID DRGh = slice(drgg, table, drghtab) DRGs = slice(drgg, table, drgstab) DRGv = slice(drgg, table, drgvtab) setwindow drgg setcell drgg %Output%h = con(drgg in {%AreaColors%}, %ThemMap%h, DRGh) %Output%s = con(drgg in {%AreaColors%}, %ThemMap%s, DRGs) %Output%v = con(drgg in {%AreaColors%}, %ThemMap%v, DRGv) QUIT /* grid &return /*from DRG documentation: /* USGS DRG Color Palette /* /* ------------------------------ /* Digital Number Color /* ------------------------------ /* 0 Black /* 1 White /* 2 Blue /* 3 Red /* 4 Brown /* 5 Green /* 6 Purple /* 7 Yellow /* 8 Light Blue /* 9 Light Red /* 10 Light Purple /* 11 Light Grey /* 12 Light Brown /* ------------------------------