&rem PSPOT.SML &rem **** Plots point coverage in ARCPLOTW as shaded symbols ********** &rem Version 2.0: 9/13/96 mtc &rem **** error checking ********************************************** &goto usage &if &eq "x%-1" "x" &goto usage &if &eq "x%-1" "x/?" &goto usage &if &eq "x%-2" "x" &value -11 -1 &value -12 -2 &goto *TRUE_0000* &if &EQ "x%-3" "x" &goto *FALSE0000* &if &NE "x%-3" "x#" &LABEL *TRUE_0000* &sv -13 CIRCLE &goto *END__0000* &LABEL *FALSE0000* &extract -13 -3 1 &goto ok &if &eq CIRCLE %-13 &goto ok &if &eq SQUARE %-13 &goto ok &if &eq TRIANGLE %-13 &goto ok &if &eq DIAMOND %-13 &goto ok &if &eq STAR %-13 &goto ok &if &eq CROSS %-13 &goto usage &label ok &LABEL *END__0000* &goto *TRUE_0002* &if &EQ "x%-4" "x" &goto *FALSE0002* &if &NE "x%-4" "x#" &LABEL *TRUE_0002* &sv -14 NO &goto *END__0002* &LABEL *FALSE0002* &extract -14 -4 1 &LABEL *END__0002* &value -15 WKSP &goto *FALSE0004* &if &FN %-11 &type "ERROR: Coverage not found." &return &LABEL *FALSE0004* &goto *TRUE_0005* &if &NF %-11\lab &goto *FALSE0005* &if &NF %-11\pal &LABEL *TRUE_0005* &type "ERROR: Coverage is not point coverage." &return &LABEL *FALSE0005* &goto *FALSE0006* &if &NM %-12 &goto *FALSE0007* &if &FN %-11\pat.dbf &type "ERROR: Coverage has no point attributes." &return &LABEL *FALSE0007* &rem **** see if size item exists ********************************** &extract -12 -12 1 &openw %-15t$items.lis ITEMS %-11.PAT &closew &open %-15t$items.lis error &sv -20 NO &LABEL *WHILE0008* &read -1 *END__0008* &extract -1 -1 2 &goto *FALSE0009* &if &NE %-1 %-12 &sv -20 YES &LABEL *FALSE0009* &goback *WHILE0008* &LABEL *END__0008* &close & DEL %-15t$items.lis &goto *FALSE0010* &if &NE %-20 NO &type "ERROR: Radius item does not exist in PAT." &return &LABEL *FALSE0010* &LABEL *FALSE0006* &goto *FALSE0011* &if &NF %-15spot & DELETE %-15spot -NQ &LABEL *FALSE0011* &rem **** generate selection file ************************************* WIN SEL w %-11 point %-15p$feat.sel &rem **** get current directory *************************************** & CD >%-15t$curdir &open %-15t$curdir error &read -1 done &label done &close & DEL %-15t$curdir &value -16 -1 &rem **** generate SMLs to create spot coverage *********************** &openw %-15p$spot1.sml &write "A %-16" &write "EXTRACT %-11 %-15p$feat.sel %-15point POINT" &write "UNGEN POINT %-15point %-15p$cov.gen" &write "&goto FALSE001 &if &nm %-12" &write " TABLES %-15p$spot2.sml" &write "&label FALSE001" &write "GENERATE %-15spot %-15p$spot3.sml" &write "&goto FALSE002 &if &fn %-15p$error.txt" &write " CLEAN %-15spot" &write "&label FALSE002" &write "& DELETE %-15point -NQ" &write "QUIT" &closew &goto *FALSE0012* &if &NM %-12 &openw %-15p$spot2.sml &write "SEL %-15point.PAT" &write "&openw %-15p$size.lis" &write "LI %-12" &write "&closew" &write "QUIT" &closew &LABEL *FALSE0012* &openw %-15p$spot3.sml &write "&open %-15p$cov.gen error 1" &write "&goto FALSE001 &if &nm %-12" &write " &open %-15p$size.lis error 2" &write " &read -1 error 2" &write "&label FALSE001" &goto *FALSE0013* &if &NE %-13 CIRCLE &write "CIRCLES NOLABELS" &goto *END__0013* &LABEL *FALSE0013* &write "LINES" &LABEL *END__0013* &rem **** get id, coordinate, and size ******************************** &write "&label WHILE001" &write " &read -1 END001 1" &write " &extract -2 -1 1" &write " &goto FALSE002 &if &eq %%-2 END" &write " &extract -11 -1 1" &write " &extract -12 -1 2" &write " &extract -13 -1 3" &write " &goto FALSE003 &if &NM %-12" &write " &read -14 END001 2" &write " &goto END003" &write " &label FALSE003" &write " &cv -14 %-12" &write " &label END003" &write "&cv -14 %%-14 / 2" &goto *FALSE0015* &if &NE %-13 CIRCLE &write "%%-11, %%-12, %%-13, %%-14" &goto *END__0015* &LABEL *FALSE0015* &goto *FALSE0016* &if &NE %-13 SQUARE &write "%%-11" &write "%%<%%-12 - %%-14> %%<%%-13 - %%-14>" &write "%%<%%-12 - %%-14> %%<%%-13 + %%-14>" &write "%%<%%-12 + %%-14> %%<%%-13 + %%-14>" &write "%%<%%-12 + %%-14> %%<%%-13 - %%-14>" &write "%%<%%-12 - %%-14> %%<%%-13 - %%-14>" &write "END" &goto *END__0015* &LABEL *FALSE0016* &goto *FALSE0017* &if &NE %-13 TRIANGLE &write "%%-11" &write "%%-12 %%<%%-13 + %%-14>" &write "%%<%%-12 + %%-14> %%<%%-13 - ( %%-14 * 0.625 )>" &write "%%<%%-12 - %%-14> %%<%%-13 - ( %%-14 * 0.625 )>" &write "%%-12 %%<%%-13 + %%-14>" &write "END" &goto *END__0015* &LABEL *FALSE0017* &goto *FALSE0018* &if &NE %-13 DIAMOND &write "%%-11" &write "%%-12 %%<%%-13 + %%-14>" &write "%%<%%-12 + %%-14> %%-13" &write "%%-12 %%<%%-13 - %%-14>" &write "%%<%%-12 - %%-14> %%-13" &write "%%-12 %%<%%-13 + %%-14>" &write "END" &goto *END__0015* &LABEL *FALSE0018* &goto *FALSE0019* &if &NE %-13 STAR &write "%%-11" &write "%%-12 %%<%%-13 + %%-14>" &write "%%<%%-12 + ( %%-14 * 0.625 )> %%<%%-13 - ( %%-14 * 0.875 )>" &write "%%<%%-12 - %%-14> %%<%%-13 + ( %%-14 * 0.25 )>" &write "%%<%%-12 + %%-14> %%<%%-13 + ( %%-14 * 0.25 )>" &write "%%<%%-12 - ( %%-14 * 0.625 )> %%<%%-13 - ( %%-14 * 0.875 )>" &write "%%-12 %%<%%-13 + %%-14>" &write "END" &goto *END__0015* &LABEL *FALSE0019* &write "%%-11" &write "%%<%%-12 - ( %%-14 / 3 )> %%<%%-13 + %%-14>" &write "%%<%%-12 + ( %%-14 / 3 )> %%<%%-13 + %%-14>" &write "%%<%%-12 + ( %%-14 / 3 )> %%<%%-13 + ( %%-14 / 3 )>" &write "%%<%%-12 + %%-14> %%<%%-13 + ( %%-14 / 3 )>" &write "%%<%%-12 + %%-14> %%<%%-13 - ( %%-14 / 3 )>" &write "%%<%%-12 + ( %%-14 / 3 )> %%<%%-13 - ( %%-14 / 3 )>" &write "%%<%%-12 + ( %%-14 / 3 )> %%<%%-13 - %%-14>" &write "%%<%%-12 - ( %%-14 / 3 )> %%<%%-13 - %%-14>" &write "%%<%%-12 - ( %%-14 / 3 )> %%<%%-13 - ( %%-14 / 3 )>" &write "%%<%%-12 - %%-14> %%<%%-13 - ( %%-14 / 3 )>" &write "%%<%%-12 - %%-14> %%<%%-13 + ( %%-14 / 3 )>" &write "%%<%%-12 - ( %%-14 / 3 )> %%<%%-13 + ( %%-14 / 3 )>" &write "%%<%%-12 - ( %%-14 / 3 )> %%<%%-13 + %%-14>" &write "END" &LABEL *END__0015* &write " &label FALSE002" &write " &goback WHILE001" &write "&label END001" &write "&close &all" &write " " &write "QUIT" &write "&return" &write "&label error" &write "&openw %-15p$error.txt" &write "&write ""I/O Error"" " &write "&closew" &write "QUIT" &write "&return" &closew WIN RUNW ARCX %-15p$spot1.sml &rem **** shade and outline spot coverage ***************************** &goto *FALSE0021* &if &NF %-15p$error.txt & TYPE %-15p$error.txt &goto *END__0021* &LABEL *FALSE0021* SHOW SHADESYMBOL -1 POLYGONSHADES %-15spot %-1 &goto *FALSE0023* &if &NE %-14 YES POLYS %-15spot &LABEL *FALSE0023* &LABEL *END__0021* &rem **** keep the spot coverage in case it's wanted ****************** & DEL %-15p$*.* &return &label usage &type "Usage: &r PSPOT [cover] [size] {symbol} {outline}" &type " " &type " cover = coverage" &type " size = size in map units or PAT item to use for size" &type " symbol = CIRCLE, SQUARE, TRIANGLE, DIAMOND, STAR, or CROSS" &type " (default = CIRCLE)" &type " outline = NO/YES, draw outline using current line symbol" &type " (default = NO)" &return &label error &type "I/O Error" &return &rem ******************************************************************