/* Make a separate mask for each group of unsampled basins /* Renumber them, and group them, way more complicated than mk_unsampled_groups.aml &s newnum 51 &do name &list dabob_bay east_canal east_canal2 great_bend_no great_bend_s northeast northwest s_shr_lynch_c west_canal clearselect reselect unsampled poly shortname = [quote %name%] &s numlist [listunique unsampled -poly id] clearsel;resel groupsubgroup.vat info OTHERBASINS.GROU in {%numlist%} &s finelist [listunique groupsubgroup.vat -info FINE_NONSAMPS] &do i = 1 &to 22 /* arbitray big number &s finenum = [extract %i% %finelist%] &if [length [extract %i% %finelist%]] > 0 &then ; &do &wo .. /* an extra step arc createworkspace %name%_%i% &wo %name%_%i% setwindow ..\master\basins tmp = con(..\master\groupsubgroup.FINE_NONSAMPS == %finenum%,%newnum%) &ty Assigning %newnum% to %name%_%i%, &ty Old fine_nonsamps value was %finenum% xmin = scalar(999999) xmax = scalar(0) ymin = scalar (9999999) ymax = scalar(0) docell if (tmp > 0) begin if (xmin > $$xmap) xmin = $$xmap if (xmax < $$xmap) xmax = $$xmap if (ymax == 0) ymax = $$ymap ymin = $$ymap end end xm = scalar(xmin - 75) xx = scalar(xmax + 75) ym = scalar(ymin - 75) yx = scalar(ymax + 75) setwindow [show xm] [show ym] [show xx] [show yx] setmask tmp mask = %newnum% setmask off &s newnum [calc %newnum% + 1] setwindow ..\master\basins kill tmp &work ../master &end &end &end