encoding  utf-8
 
survey UpperFlood -title "" # -title "Upper Flood Swallet" 
   
   # MASTER CONTROL
   # ==============
   # Fixes entrance, equates component centrelines
   # Note: loops are closed in the relevant sub-survey files, not here.  
   #       This ensures that standalone sub-surveys include loop closure.  
   # Note: scrap joins are listed below INPUT section

#   declination 1972-04-13 -7.630 1972.05.24 -7.619 deg

  centreline
    author 2007.01.23 "Ben Cooper"
    copyright 2010 "Mendip Caving Group"
    
    # Join Golden Chamber survey to the Entrance survey:-     
    #equate RA2@CC.GoldenChamber        RA2@MCGPaper.Entrance
    equate RA2@CC.GoldenChamber        1.13a@LavatoryTrap.Entrance # Approximately
    
    equate 1@BoulderChoke          14@CC.GoldenChamber   
    equate 1@Leg1.MalcolmsWay        39@BoulderChoke

    #equate CH1@CharnelPassage        15@Leg2.MalcolmsWay
    equate 1.1@Disto.CharnelPassage    15@Leg2.MalcolmsWay
    equate MW9@RoyalIcing           9@Leg2.MalcolmsWay

    equate 1@EP_Pony.EastPassage      RI36@RoyalIcing   # Fixed station in Royal Icing Chamber

    equate RI@SouthPassage        RI36@RoyalIcing          
    #equate d7@SouthPassage          RI36@RoyalIcing  # d7 approximate location (could also be 35@RI)

    #equate d8@CentreLineOnly.WestPassage  d8@SouthPassage  # original TF and DW survey
    equate RI42@WestPassage   RI42@RoyalIcing   # Fixed station above Neverland entrance
    
    #Close link (LinkRift)
    equate 1.0@LRDisto.LinkRift.WestPassage 3.38@NeverlandDisto.Neverland
   
    equate N1@NeverlandCC.Neverland      RI42@RoyalIcing
      
  endcentreline

   # INPUTS
   # ======
   input MapLabels.th2     # 2500-scale map labels for Magazine output
   
   input Legend.th
   input Legend.th2
   
   input Grid.th
   input Grid.th2
   input Grid_Larger.th2
   
   input Outline.th2
   
   #input Speculation.th2
   input Snippets.th2
   join wall_SN_NW1   wall_CH_NE1
   join wall_SN_NW2:0  wall_CH_NE2:end
   join wall_SN_NW2:end  wall_CH_NE2:0
   join wall_SN_SW1  wall_CH_SE1

   #input FixedStations.th        # This file defines the cave-wide naming convention for the fixed station network
                    # It is not usually linked in, as it forces loop closure which is better managed in the sub-survey files.
   input FixedStations.th2
   
   input Continuations.th2
   
   input Entrance/Entrance.th
   
   input GoldenChamber/GoldenChamber.th
   join wall_LTs1_1@LavatoryTrap.Entrance  wall_GCs1_1@GoldenChamber
   join l13-1050-287@LavatoryTrap.Entrance  wall_GCs1_2@GoldenChamber  
 
   input BoulderChoke/BoulderChoke.th
   input BoulderChoke/BoulderChoke_s0.th2 # Contains the presumed passage widths
   input BoulderChoke/BoulderChoke_sL.th2 # Contains the detailed labels
   input BoulderChoke/BoulderChoke_s1.th2 # Section from 3D to Rope Climb
   input BoulderChoke/BoulderChoke_s2.th2 # Section from Rope Climb to Easy Squeeze
   input BoulderChoke/BoulderChoke_s3.th2 # Section from Easy Squeeze to Departure Lounge
   join BoulderChoke_s1 StreamwayRegained_s1@GoldenChamber
   
   input MalcolmsWay/MalcolmsWay.th
   equate PAINTED-MW1-stal@Leg1.MalcolmsWay    39@BoulderChoke
   
   input WalkThePlankChamber/WalkThePlankChamber.th
   equate PAINTED-MW51-stal@WalkThePlankChamber        PAINTED-MW51-stal@MalcolmsWay
   join MalcolmsWay_s1@MalcolmsWay Trench1SP1@Trench1.WalkThePlankChamber
  
   input WallStreet/WallStreet.th
   equate s22@WallStreet    22@Leg2.MalcolmsWay

   join WallStreet_s1@WallStreet  MalcolmsWay_s3@MalcolmsWay
   
   input CharnelPassage/CharnelPassage.th
   #input CharnelPassage/CharnelPassage_CC.th2
   input CharnelPassage/CharnelPassage_s1.th2
   input CharnelPassage/CharnelPassage_s2.th2
   join CharnelPassage_s1 MalcolmsWay_s3@MalcolmsWay

   input RoyalIcing/RoyalIcing.th
    #join wall_RIs1_1@RoyalIcing      wall_MWs3_2:29
    #join wall_RIs1_1b@RoyalIcing wall_MWs3_3:end
    #join wall_RIs1_1b@RoyalIcing   wall_MWs3_3:0
    #join wall_RIs1_1c@RoyalIcing wall_MWs3_4:0
    #join wall_RIs1_1c@RoyalIcing   wall_MWs3_4:end
    #join wall_RIs1_5@RoyalIcing      wall_MWs3_1:0

   
   input SouthPassage/SouthPassage.th # South Passage
   input EastPassage/EastPassage.th

   input WestPassage/WestPassage.th
   join WestPassage_s0@WestPassage RoyalIcing_s3@RoyalIcing
   #join wall_RIs3_NW:end   wall_WPs1_1:0  # Northern wall to Royal Icing
   #join wall_RIs3_4:0      wall_WPs1_2:0  # Eastern edge of NL entrance

   input Neverland/Neverland.th
   join NeverlandDisto_s1@Neverland  WestPassage_s0@WestPassage
   
   input Terminal/Terminal.th
   equate 0@Terminal 2@Leg2.MalcolmsWay
   
   input Terminal2/Terminal2.th
   equate 12@Terminal2 12@Terminal
   
   input Terminal3/Terminal3.th
   equate 25@Terminal2 1.0@Terminal3
   
   # MAPS.  Only maps can be selected in thconfig.
   # ====
   # Different maps used for different outputs.  
   # Maps are collections of scraps.  "break" is used to denote levels (underlying levels are greyed)
   # Maps can also be collections of other maps, with "break", "preview below" and "preview above".
   # Maps and Scraps can only be mixed in same map using "preview" prefix for map.
   # Therefore, use "select" in thconfig file to build up selection of maps required.
   # Clearly there are two ways of doing the same: multiple select statements in thconfig, or 
   # multiple map definitions here.  Not sure I've got the right balance, yet.

   # m2500 Small scale outline with text overlays for magazine output
   # =====
   map Map_m2500 -title "Upper Flood Swallet"
       MapLabels_s1
       preview below UF_m1   # "preview below" creates a greyed outline of the cave
       preview below BoulderChoke_m1
       #preview above Centreline_m1 # Preview above removes labels and other detail
       preview below Neverland_m1@Neverland
   endmap
   
   # Ouline_m2500
   # ============
   # Outline only small scale map with no text,  Good for Bill's website overlay and T-shirt.  
   map Outline_m2500
       Outline_m1
       preview below UF_m1   # "preview below" creates a greyed outline of the cave
   endmap

   map Map_mFixedStations -title "Upper Flood Swallet" 
     UF_mFixed
     preview below UF_m1
   endmap

   map Map_Continuations -title "Upper Flood Swallet" 
     Grid_m1
     UF_mContinuations
     preview below UF_m1
   UF_mContinuation_Offset [-0 -100 m] none
   endmap

   # Map_m500 - This is the main detailed 1:500 scale map, all in one page.  
   # ========
   # Good for zooming within pdf on computer or A1 printing
   map Map_m500 # -title "" 
       UF_m0
       UF_m1
   endmap
   
   map Map_Overlay # -title "Upper Flood Swallet" 
       UF_Larger_m0
       UF_m1
   endmap
   
   map Upper_Flood_Atlas # Chapter equivalent to Map_m500
       UF_m1
   endmap

   # COMPONENT MAPS - only contain scraps.  No preview above / below in this section.
   # ==============
   # Component maps are individually selected in the thconfig files and in the Map collections above.
   # Keep full survey separate from Centreline for Preview Below
   # Main Cave Passages

   map UF_m0 -proj plan
       Legend_s1
       Grid_s1
       #Speculation_s1
   endmap
   
   map Grid_m1
       Grid_s1
   endmap
   
   map Outline_m1
       Outline_s1
   endmap
   
   map UF_Larger_m0 -proj plan
       Legend_s1
       Grid_Larger_s1
       #Speculation_s1
   endmap
   
   map UF_mFixed
       FixedStations_s1
   endmap
   
   map UF_m1
       EntranceM@Entrance
       GoldenChamber_map@GoldenChamber
       BoulderChoke_m1
       Neverland_m1@Neverland
       RoyalIcing_m1@RoyalIcing
       SouthPassage_m1@SouthPassage
       EastPassage_map@EastPassage
       WallStreet_map@WallStreet
       WestPassage_m0@WestPassage
       WestPassage_mOffset@WestPassage [-15 -90 m] below
       WestPassage_m3@WestPassage
       WalkThePlankChamber_m1@WalkThePlankChamber
       UF_m2
       break
       BoulderChoke_m0
       MalcolmsWay_map@MalcolmsWay
       TerminalM@Terminal
       Terminal2M@Terminal2
       Terminal3M@Terminal3
       #break
       #Survey_m1
       #Centreline_m1
   endmap

   map UF_m2 -proj plan
       Snippets_s1
       break
       CharnelPassage_s2
       break
       CharnelPassage_s1       
   endmap
   
   map UF_mContinuations
       Continuations_s1
   endmap
   
   # To get offset in the Continuations "preview below" mode is more complex.
   # We need a map that already has the Continuation scrap with preview below of the associated cave scraps
   map UF_mContinuation_Offset
    UF_mContinuation_WP
  WestPassage_mOffset@WestPassage
   endmap
   map UF_mContinuation_WP
     Continuations_s2     
   endmap

   # Technical map overlay showing Ben and Paul's survey of Midnight Chamber.  Seldom selected.
   # Similar will be produced for Martin and Yvonne's survey, when they have provided LRUD.
   #map MC_m1
   #    MC_s1    # Ben and Paul's survey overlay
   #    preview below UF_m1
   #endmap

   # Keep centreline separate for Preview Above in m2500 output
   map Survey_m1 -proj plan
     #CharnelFull
     #CharnelPassage
     SouthPassage
     break
     #FullLRUD.EastPassage
     #CentreLineOnly.WestPassage
   endmap   
   
   #map Centreline_m1       # These are scrap drawings over centreline only data.
       #CharnelPassage_s1
       #SouthPassage_s1 
   #endmap
   
   map BoulderChoke_m0  # Presumed boundary of boulder choke passage, selectable for different outputs
       BoulderChoke_s0
   endmap
   
   map BoulderChoke_mL  # Boulder Choke Detail map with labels and presumed passage walls
       BoulderChoke_sL  # Contains detailed text wanted in detailed map, but not in UF500
       break
       BoulderChoke_s1 
       break
       BoulderChoke_s2
       break
       BoulderChoke_s3
       break
       BoulderChoke_s0  # Presumed boundary
   endmap
   
   map BoulderChoke_m1  # Boulder Choke Passage Walls, use in all outputs
       BoulderChoke_s1 
       break
       BoulderChoke_s2
       break
       BoulderChoke_s3
   endmap
   
   # SURFACE OVERLAYS
   # ================
   # Only one surface / bitmap definition permitted.  Un-comment as required.  
   # The Geo_Surface must be selected or not in thconfig.  
   # This is done within Layout using "surface on"  This is why only one surface can be defined.  
   survey Geo_Surface
     surface 
       input cs_include.th
       bitmap "./1.Images (inputs)/6in BGS map Blkmoor.jpg" [236 177 50000 55000 801.5 732.7 51000 56000]
         #NOTES:-
         # size 436.034mm x 337.346mm (1648 x 1275) pixels
         # Grid 1 62.5mm x 46.827 mm (236, 177)pixels E(350)000,N(155)000
         # Grid 2 212.067mm x 193.858mm (801.5, 732.7)pixels E(351)000,N(156)000 = 1000,1000
         
         # bitmap "../../images/GrebeBlackWater2.png" [327 1203 350500 155600 918 22 350600 155400]
         # Pixel 327, 269      = ST 50500 55600 327,1203 as measured in Photoshop
         # and pixel 918, 1450 = ST 50600 55400 918,22
         # X from Left, Y from top.  940x1472
         
         #bitmap "../../images/
     endsurface

     #surface 
     #    bitmap "../images/UF WWh Grebe on OS base.JPG" [72 2131 300 1000 1625 230 800 400]
         #NOTES:-
         # Grid 1:  72, 2131  300, 1000
         # Grid 2:  1625, 230  800, 400
     #endsurface
   endsurvey
  
endsurvey