/* PROGRAM:    dogsht1.AML
/* PURPOSE:    dogsht1.AML is designed to automatically draw the
/*             geologic map for the northern part of the D.O.G. area
/*             of the 1997-98 NSA project.  To
/*             run it, you type:  &R dogsht1  at the "ARC" prompt.
/*
/* HISTORY:    F.H. Wilson  8/17/93      Unix-AML ver 2.0 (AKPEN.AML)
/*             F.H. Wilson  4/8/97, 7/10/97       NSA.AML ver 1.0
/*                  New lookup table, edited coverage addresses
/*
/* SITE:       USGS/BAG DG-Aviion (Unix)
/*----------------------------------------------------------------
/* CALLED BY:  User at ARC command level
/* CALLS MADE: None external, internal routine: BAILOUT
/*----------------------------------------------------------------
/* USAGE:      &R dogsht1
/* ARGUMENTS:  none
/*
/* EXPLANATION:
/*    Input coverages are the edited and cleaned coverages for each of
/*     the NSA coverages in DOG area of Alaska.  Each must contain the
/*     geologic polygons and arc attributes (They must have an AAT
/*     and a PAT) for the covered area.  It is assumed that they are
/*     all in UTM projections, Iditarod, Kateel River, Nulato, Ophir,
/*     and Sleetmute in zone 4, Kantishna River, Lime Hills, McGrath,
/*     Melozitna, Mount Mckinley, Ruby, Talkeetna, Tanana, and Tyonek
/*     in zone 5, Anchorage, Big Delta, Circle, Fairbanks, Gulkana,
/*     Healy, Livengood, Mount Hayes, Talkeetna Mountains, and Valdez
/*     in zone 6.  ARCPLOT's MAPPROJECTION command is used to convert
/*     all "on the fly" to an Albers Equal area projection for output.
/*     Output is a file designed for the Design-Jet color plotter.
/*
/* Files used are:
/*   Symbolsets
/*       /briar1/pantry/geology.shd
/*       /briar1/pantry/geology_tl.lin
/*       /briar1/pantry/geology.mrk
/*       /briar1/pantry/geology.txt
/*   Lookup tables:
/*       /briar1/wilson/nsa/nsakey.lut
/*       /briar1/wilson/nsa/nsakeyo.lut   (Overlays)
/*       /briar1/wilson/nsa/nsakeyhf.lut   (Hornfels)
/*       /briar1/wilson/nsa:geoline.lut (Question marks removed from
/*                                       arc-code 3)
/*       /briar1/wilson/lookups:linemark.lut
/*   Legend keys:
/*       /briar1/wilson/nsa/dog1.key
/*       /briar1/wilson/nsa/dog2.key
/*       /briar1/wilson/lookups/geology.key
/*   Text files:
/*       /briar1/wilson/nsa/mapcred.dog
/*       /briar1/wilson/nsa/basecred.dog
/*   Projection files:
/*       /briar1/pantry/utm4-alb.prj
/*       /briar1/pantry/utm5-alb.prj
/*       /briar1/pantry/utm6-alb.prj
/*
/*=================================================================
&wat dogsht1.wat
&severity &error &routine bailout
/*
/*#################################################################
/* System dependencies
/*
&s path := /briar1/wilson/nsa/
&s hpath := /nps/nsa/
&s bin := /briar1/wilson/lookups
&s pantry := /briar1/pantry
/*
/* Coverages used are:
/*
&s base := %path%dogarea
&s base1 := dogne
&s base1b := bnddogne
&s base2 := dogse
&s base2b := bnddogse
/*   UTM zone 6
&s cover1 := %hpath%mh/mhcomp
&s cover2 := %hpath%he/hecomp
&s cover3 := %hpath%an/ancomp
&s cover4 := %hpath%bd/bdcomp
&s cover5 := %hpath%ci/cicomp
&s cover6 := %hpath%fb/fbcomp
&s cover7 := %hpath%gu/gucomp
&s cover9 := %hpath%/lg/lgcomp
&s cover10 := %hpath%tk/tkcomp
&s cover11 := %hpath%/va/vacomp
/*   UTM zone 5
&s cover13 := %hpath%tn/tncomp
&s cover14 := %hpath%tl/tlcomp
&s cover12 := %hpath%lh/lhcomp
&s cover16 := %hpath%mg/mgcomp
&s cover17 := %hpath%md/mdcomp
&s cover18 := %hpath%mz/mzcomp
&s cover19 := %hpath%/mm/mmcomp
&s cover20 := %hpath%rb/rbcomp
&s cover21 := %hpath%ty/tycomp
&s cover22 := %hpath%kh/khcomp
/*   UTM zone 4
&s cover23 := %hpath%sm/smcomp
&s cover24 := %hpath%id/idcomp
&s cover25 := %hpath%op/opcomp
&s cover26 := %hpath%nl/nlcomp
&s cover27 := %hpath%kt/ktcomp
/*
&s dog1 := /briar1/wilson/nsa/dog1.key
&s dog2 := /briar1/wilson/nsa/dog2.key
&s geoline := /briar1/wilson/lookups/geology.key
&s wells = %pantry%/oil-gas-wells
&s roads := %pantry%/roads_dnr
/*
/* End system dependencies
/*
/*#################################################################
/*
/* Finally, we start the real work
/*
/* &echo &on
arcplot
/* display 9999 2
/* 
display 1040
/* 
/nsa/dogsht1.gra
mapangle -5
pagesize 33 52
mape %base1b%
/* mape 113600,1505950,495150,1816700
mapunits meters
mapscale 500000
mapposition cen 17 39.2
maplimits 1 27.7 32.5 50.4
linesymbol 9
box 0 0 33 52
linesymbol 1
box .1 27.4 32.9 50.9
box .1 3.5 32.9 27
/*
/*  Shade, character, line, and marker sets
/*
pensize .006
symbolset %pantry%/geology
lineset %pantry%/geology.lin
textset font.txt
textsymbol 3
/*move 31 1.5
/*textsize .2
textangle 0
/*text 'Start time: '
/*move 31 1.25
/*text [quote [date -cal]]
/*move 31 1
/*text [quote [date -ampm]]
textsize .1
/*
/*  Draws polygons and fills in using shadeset and lookup table, then
/*  draws arcs using lineset file and lookup table, and adds polygon
/*  labels using lookup table
/*
/*
/* &goto part1
mapprojection %pantry%/utm6-alb.prj
&do drwing6 &list %cover1% %cover2% %cover6% %cover5% %cover4% %cover9%
/*
     polygonshades %drwing6% nsaclass %path%:nsakeyhf.lut
     polygonshades %drwing6% nsaclass %path%:nsakeyal.lut
     polygonshades %drwing6% nsaclass %path%:nsakey.lut
     polygonshades %drwing6% nsaclass %path%:nsakeyo.lut
     unselect %drwing6% arcs arc-code = 99
     arclines %drwing6% arc-code %pantry%:geoline.lut
     clearselect
     reselect %drwing6% polys area ge 5000000
/*     polygontext %drwing6% nsaclass %path%:nsakey.lut
     linesymbol 1
     annotext %drwing6%_anno
     arcs %drwing6%_anno
     clearselect
     &end
mapprojection off
/*
/*&goto part11
mapprojection %pantry%/utm5-alb.prj
&do drwing5 &list %cover19% %cover13% %cover22%
/*
     polygonshades %drwing5% nsaclass %path%:nsakeyhf.lut
     polygonshades %drwing5% nsaclass %path%:nsakeyal.lut
     polygonshades %drwing5% nsaclass %path%:nsakey.lut
     polygonshades %drwing5% nsaclass %path%:nsakeyo.lut
     unselect %drwing5% arcs arc-code = 99
     arclines %drwing5% arc-code %pantry%:geoline.lut
     clearselect
     reselect %drwing5% polys area ge 5000000
/*     polygontext %drwing5% nsaclass %path%:nsakey.lut
/*
     linesymbol 1
     annotext %drwing5%_anno
     arcs %drwing5%_anno
     clearselect
     &end
mapprojection off
/*
&label part1
/*
/*
/*   Putting on roads
/*
linesymbol 41
reselect %roads% arcs min = 5020
aselect %roads% arcs min = 5028
arcs %roads%
clearselect
linesymbol 57
reselect %roads% arcs min = 5031
arcs %roads%
clearselect
linesymbol 1
/* 
/*
/*  Draws fold axes
/*
/* arclines %fold1% arc-code %bin%:geoline.lut
/* arcmarkers %fold1% arc-code %bin%:linemark.lut middle
/*
/*  Quadrangle outlines and labels
/*
linesymbol 36
textsymbol 3
textsize .3
arcs %base%
/* polygontext %base% name
shadeset colornames.shd
unselect %base1% poly class = 0
polygonshades %base1% 26 
arcs %base1%
shadeset /briar1/pantry/geology.shd
/*
/* &goto part1
/*
/*  Plotting lower half of map
/*
mape %base2b%
/* mape 134600,1226500,537200,1541000
mapposition cen 17 15.2
maplimits .5 3.75 32.5 26.5
textsize .08
/*
/*  Draws polygons and fills in using shadeset and lookup table, then
/*  draws arcs using lineset file and lookup table, and adds polygon
/*  labels using lookup table
/*
/*
/* &goto part12
mapprojection %pantry%/utm6-alb.prj
&do drwing6 &list %cover1% %cover2% %cover3% %cover7% %cover11% %cover10%
/*
     polygonshades %drwing6% nsaclass %path%:nsakeyhf.lut
     polygonshades %drwing6% nsaclass %path%:nsakeyal.lut
     polygonshades %drwing6% nsaclass %path%:nsakey.lut
     polygonshades %drwing6% nsaclass %path%:nsakeyo.lut
     unselect %drwing6% arcs arc-code = 99
     arclines %drwing6% arc-code %pantry%:geoline.lut
     clearselect
     reselect %drwing6% polys area ge 5000000
/*     polygontext %drwing6% nsaclass %path%:nsakey.lut
/*
     linesymbol 1
     annotext %drwing6%_anno
     arcs %drwing6%_anno
     clearselect
     &end
mapprojection off
/*
/*&goto part11
mapprojection %pantry%/utm5-alb.prj
&do drwing5 &list %cover19% %cover14% %cover21%
/*
     polygonshades %drwing5% nsaclass %path%:nsakeyhf.lut
     polygonshades %drwing5% nsaclass %path%:nsakeyal.lut
     polygonshades %drwing5% nsaclass %path%:nsakey.lut
     polygonshades %drwing5% nsaclass %path%:nsakeyo.lut
     unselect %drwing5% arcs arc-code = 99
     arclines %drwing5% arc-code %pantry%:geoline.lut
     clearselect
     reselect %drwing5% polys area ge 5000000
/*     polygontext %drwing5% nsaclass %path%:nsakey.lut
/*
     linesymbol 1
     annotext %drwing5%_anno
     arcs %drwing5%_anno
     clearselect
     &end
mapprojection off
/*
&label part12
/*
/*
/*   Putting on roads
/*
linesymbol 41
reselect %roads% arcs min = 5020
aselect %roads% arcs min = 5028
arcs %roads%
clearselect
linesymbol 57
reselect %roads% arcs min = 5031
arcs %roads%
clearselect
linesymbol 1
/* 
/*
/*  Draws fold axes
/*
/* arclines %fold1% arc-code %bin%:geoline.lut
/* arcmarkers %fold1% arc-code %bin%:linemark.lut middle
/*
/*  Quadrangle outlines and labels
/*
linesymbol 36
textsymbol 3
textsize .3
arcs %base%
/* polygontext %base% name
shadeset colornames.shd
unselect %base2% poly class = 0
polygonshades %base2% 26 
arcs %base2%
shadeset /briar1/pantry/geology.shd
/*
/*&label part1
/*
/*  Writes labels for map
/*
/*  Plots index and inset maps - NEED TO CHECK FOR EXISTANCE OF THESE
/*
/* plot %cpath%penindex.gra box 44.5 14 56.5 24
/* plot %cpath%nsacor.gra 1 21
/* plot %pantry%/usgs_logo.gra box 66 3 69 6
plot /briar1/pantry/scalebar500k.gra 14.7 2.7
/* plot %pantry%/emblem.gra box 69.5 3 72.5 6
/*
/*  Produces legend using KEY... commands
/*
textsymbol 3
textsize .10
/*
&goto part2
&label part2
textsize .15
move 27 3.5
/* textfile %path%mapcred.dog
/*
&goto part3
/*
/*  Oil and gas well labeling
/*
keyposition 67 10
textsize .15
keybox .2 .2
keyseparation .2 .2
keymarker %path%/oilgas.mkey nobox
move 67 12
textsize .15
textfile %path%/oilgas.txt
/*
&label part3
/*
textsymbol 14
textsize .2
move 16.5 2.5
text 'Scale 1:500,000' cc
textsize .5
move 16.5 2.2
TEXT 'GEOLOGIC MAP OF CENTRAL (INTERIOR) ALASKA' CC
textsize .3
move 16.5 1.8
text 'EASTERN REGION' cc
textsize .2
MOVE 16.5 1.4
text 'Compiled by' cc
textsize .25
move 16.5 1.1
TEXT 'Frederic H. Wilson, James H. Dover, Dwight C. Bradley, Florence R. Weber,' cc
move 16.5 .75
text 'Thomas K. Bundtzen, and Peter J. Haeussler' CC
MOVE 16.5 0.35
TEXT '1998' CC
/* MOVE 33 12.5
/* TEXT 'LIST OF LINE SYMBOLS' CC
MOVE 1 51.7
TEXT 'U.S. DEPARTMENT OF THE INTERIOR'
MOVE 1 51.4
TEXT 'U.S. GEOLOGICAL SURVEY'
MOVE 16.5 51.7
TEXT 'Produced in cooperation with the Alaska Divisions of' cc
move 16.5 51.4
text 'Oil and Gas and Geological and Geophysical Surveys' cc
move 32.5 51.7
text 'OPEN-FILE REPORT 98-133' lr
move 32.5 51.4
text 'SHEET 1 OF 3' lr
textsize .18
move 27 2.5
textfile %path%disclaim.er
textangle 45
/* textcolor 2
/* &goto lats
/*
/*   Adding latitude and longitude labels
/*
TEXTSIZE .06
textsymbol 3
TEXTSTYLE TYPESET
/* Longitudes
MOVE 32.1 4.04
TEXT '144!SUP;o!BAK;00'''
MOVE 30.79 26.57
TEXT '144!SUP;o!BAK;00'''
MOVE 31.00 28.2
TEXT '144!SUP;o!BAK;00'''
MOVE 29.54 50.5
TEXT '144!SUP;o!BAK;00'''
MOVE 0.3 3.80
TEXT '151!SUP;o!BAK;30'''
MOVE 1.35 26.3
TEXT '151!SUP;o!BAK;30'''
MOVE 1.5 28.0
TEXT '151!SUP;o!BAK;30'''
MOVE 2.59 50.3
TEXT '151!SUP;o!BAK;30'''
/*
/* Latitudes
/*
MOVE 0.25 4.05
TEXT '61!SUP;o!BAK;00'''
MOVE 32.4 4.27
TEXT '61!SUP;o!BAK;00'''
MOVE 0.96 26.13
TEXT '63!SUP;o!BAK;30'''
MOVE 1.2 28.23
TEXT '63!SUP;o!BAK;30'''
MOVE 31.11 26.39
TEXT '63!SUP;o!BAK;30'''
MOVE 31.25 28.43
TEXT '63!SUP;o!BAK;30'''
MOVE 2.2 50.1
TEXT '66!SUP;o!BAK;00'''
MOVE 29.9 50.35
TEXT '66!SUP;o!BAK;00'''
/*
&goto final
/*
textsize .4
move 1.5 2
text 'DRAFT'
move 28 51
text 'DRAFT'
textangle 0
textcolor 1
move 31 .75
textsymbol 3
textsize .2
text [quote [date -cal]]
/*move 31 .5
/*text [quote [date -ampm]]
/*
&label final
/*
/*
/*   Printer registration marks
/*
markersymbol 50
marker 1 1
marker 1 50
marker 32 1
marker 32 50
/*
/* Map graphics file written out
/*
&echo &off
/* &return
q
/* rotateplot dogsht1.gra dogr.gra
/*
/* hpgl2 dogr.gra dogsht1.jet # # opaque # # # # # %pantry%/djetcal.dat ps
/*
/* Map plot file written out
/*
&echo &off
&watch &off
&return
/*-------------------------------------------------------------------
&routine bailout
&echo &off
&watch &off
&severity &error &ignore
&messages &on
&return; &return &error \An error has occurred in DOGEAST.AML