Home

The Therion Book 5.3.16 - Speleoklub Banská Bystrica

image

Contents

1. end of the line or line point index where 0 is the first point A special case is when lt point1 gt and lt point2 gt are scrap IDs than the closest scrap ends are joined together Options e smooth lt on off gt indicates whether two lines are to be connected smoothly e count lt N gt when used with scraps gt Therion will try to join scraps which connect in N locations passages equate Description Sets the survey stations equivalence Syntax equate lt station list gt Context none survey 34 E g use join a b c not join a b followed by join b c 35 Tf you want some object which is clipped by a scrap boundary to continue to a neighbouring scrap use clip off option for that object 30 map Description A map is a collection of either scraps or other maps of the same projection type It s possible to include survey in the map this will display centreline in the map Map object simplifies the data management when selecting data for output See the chapter How the map is put together for more thorough explanation Syntax map lt id gt OPTIONS scrap survey or other map references break next level scrap survey or other map references preview lt above below gt lt other map id gt endmap Context none survey Arguments e lt id gt gt scrap identifier Command like options e the data lines consist of scrap or map references Note that you can not mix them together
2. User may also benefit from comprehensive reference to the METAFONT language which is quite similar to METAPOST Knuth D E The METAFONTbook Reading Massachusetts Addison Wesley 1986 New symbols may be defined in the code metapost section of the layout command This makes it easy to add new symbols at the run time It is also possible to add symbols permanently by compiling them into Therion executable see the Appendix for instructions how to do this Each symbol has to have a unique name which consists of following items 6 gt 6 e one of the letters p I a s for point line area or special symbols respectively e underscore character e symbol type as listed in the chapter Data format with all dashes removed e if the symbol has a subtype add underscore character and subtype e underscore character e symbol set identifier in uppercase Example standard name for a point water flow symbol with a permanent subtype in the MY set is p_waterflow_permanent_MY Standard name for user defined symbol types should not include symbol set identifier e g p_u_bat Each new symbol has to be registered by a macro call 71 r initsymbol lt standard name gt unless it s compiled into Therion executable There are four predefined pens PenA thickest PenD thinnest which should be used for all drawings For drawing and filling use thdraw and thfill commands instead o
3. Y Pore S D B e pens anit Stacho Mudrak Martin Budaj Therion is copyrighted software Distributed under the GNU General Public License Copyright 1999 2014 Stacho Mudrak Martin Budaj This book describes Therion 5 3 16 Code contributions by Marco Corvi Georg Pacher and Dimitrios Zachariadis We owe thanks to Martin Sluka Ladislav Blazek Martin Heller Wookey Olly Betts and all users for their feedback support and suggestions Translations Language XTherion Map header Loch Translated by bg 100 94 100 Alexander Yanev Ivo Tachev CZ 94 100 Ladislav Blazek de 95 100 Roger Schuster Georg Pacher el 98 100 Stelios Zacharias en UK _US 87 95 100 es 87 96 Roman Mu oz fr 100 Eric Madelaine Gilbert Fernandes it 99 100 Marco Corvi mi 98 Kyle Davis Bruce Mutton pl 100 Krzysztof Dudzinski pt _BR _PT 96 Toni Cavalheiro ru 94 99 Vasily V Suhachev sk 99 100 96 Stacho Mudr k sq 99 100 Fatos Katallozi The cover picture shows survey sketch of Hrozn kame olom Chamber in the Cave of Dead Bats in Slovakia and the map of it produced by Therion Table of Contents Introduction Why Therion Features Software eenei Installation Setting up EE How does it work First run Creating data files Basics Data types Coordinate systems Magnetic declination Data format encoding input survey centrelin
4. e if you refer to map you can specify offset at which this sub map will be displayed together with preview type of its original position Syntax is following lt map reference gt lt offset X gt lt offset Y gt lt units gt lt above below none gt e scraps following the break will be placed on another level e preview lt above below gt lt other map id gt will put the outline of the other map in the specified preview position relative to the current map Preview is displayed only if the map is in the map level level as specified by the select command Use the revise command if you want to add maps from higher levels to the preview Options e projection proj lt plan elevation extended none gt gt required if the map contains survey e title lt string gt gt description of the object e survey lt id gt gt associate a survey with map e g all surveying statistics from this survey will be used when this map is selected for output Szi 31 surface Description Surface terrain specification It is possible to display it in two ways as a scanned topographical map both in 2D map and 3D model or surface grid digital elevation model in 3D model only Syntax surface lt name gt cs lt coordinate system gt bitmap lt filename gt lt calibration gt grid units lt units gt grid lt origin x gt lt origin y gt lt x spacing gt lt y spacing gt lt x count gt lt y count gt grid fl
5. re actually creating a text file which should conform to the syntax described in the chapter Data format Actually only a subset of the Therion commands are used in the Map editor multi line scrap endscrap commands which may contain point line and area commands Cf chapter Data format This corresponds with a section of hand drawn map which is built up from points lines and filled areas So the first step is defining the scrap by a scrap endscrap multi line command In the File commands menu click on the Action submenu and select Insert scrap This changes the Action button to Insert scrap if it had any other value After pressing this button a new scrap will be inserted in the beginning of the file You should see lines scrap scrapl endscrap end of file in the preview window above the Insert scrap button This window is a simplified outline of the text file which will be saved by XTherion Only the command scrap point line text why text see below and its type for point and line or ID for scrap are shown The full contents of any command is displayed in the Command preview menu For modifying previously created commands there are additional menus e g Scrap con trol for the scrap command Here you can change the ID very important and other options For details see chapter Data format Now it s possible to insert some point symbols As with scrap insertion go to the File commands menu click on the A
6. 96 point 321 454 236 22 station name 1 Map with station names in this case looks like this 1 use use Station names are before symbol survey names follow this symbol Creating non existing surveys If you import your 3d file using import create 3d surveys create all survex prefixes are taken into account and if surveys with corresponding names do not exist they are created In this case if you do input create th2 right after import command you refer to stations in th2 file with names shown on the map 97 O sub create ol sub create gegeate a 0 create Ignoring station prefixes Last possibility is to import your 3d file using import ignore 3d surveys ignore Also in this case station references in corresponding th2 file are same as station names on the next map 98 ignore 3 ignore sub 0 ignore 1 ignore sub 1 il Note that no surveys are created in this case Station names are taken from 3d files without change Managing large projects Assume a situation when you want to join these three small maps within single large project Assume that coordinates of cave entrances are specified in the top level cave 3d file If your joining code will be import cave 3d surveys use survey cave input use use th input create create th input ignore ignore th endsurvey not all stations are replaced correctly The created series is placed wrong on th
7. Y1 X2 Y2 In the selection mode you can select existing line or point objects and set their attributes in the corresponding menus move them or delete them Ctrl d or Action button in File commands menu after setting Action to Delete There is a Search and select menu which makes it easy to switch between objects and visualize things you can t see at the first look at the picture For example if you enter expression station and press Show All all stations on the picture will become red XTherion doesn t do any syntax checking it only writes drawn objects with their at tributes to a text file Any errors are detected only when you process these files with Therion TIP Entering symbols of the same type at once saves you a lot of time because you need not change symbol type and fill options for each new symbol Options box preserves the old value and it s enough to change a few characters It is a good idea to start with drawing all survey stations don t forget to give them names according to real names in the centreline command than all passage walls followed by all other point symbols lines and areas Finally draw cross sections Additional tools Help Calibrate bitmap produces OziExplorer compatible MAP file based on georef erencig data included in a PDF map If the map in PDF format has been converted to raster using external program convertor uses raster image and pdf map with the same base name locate
8. author of the data and its creation date e copyright lt date gt lt string gt gt copyright date and name e title lt string gt gt description of the object Command like options e date lt date gt gt survey date If multiple dates are specified a time interval is created e explo date lt date gt gt discovery date If multiple dates are specified a time interval is created e team lt person gt lt roles gt gt a survey team member The first argument is his her name the others describe the roles of the person in the team optional currently not used The following role keywords are supported station length tape back compass back bearing back clino back gradient counter depth station position notes pic tures pics instruments insts assistant dog e explo team lt person gt gt a discovery team member e instrument lt quantity list gt lt description gt gt description of the instrument that was used to survey the given quantities same keywords as team person s role e infer lt what gt lt on off gt p infer plumbs on tells the program to interpret gradients 90 as UP DOWN this means no clino corrections are applied infer equates on will case program to interpret shots with 0 length as equate commands which means that no tape corrections are applied e declination lt value gt lt units gt gt sets the declination for subsequent shots true bearing measured bear
9. derlying overlying unsurveyed presumed pit flowstone moonmilk border visible default invisible temporary presumed water flow permanent default conjectural intermittent survey cave default surface default if centreline has surface flag The subtype may be specified also directly in lt type gt specification using as a separator Any subtype specification can be used with user defined type u In this case you need also to define corresponding metapost symbol see the chapter New map symbols 23 Slope line marks upper border of the sloping area It s necessary to specify 1 size in at least one point Gradient lines length and orientation is an average of specified 1 sizes and orientations in the nearest points If there is no orientation specification gradient marks are perpendicular to the slope line 24 Outer outline of large boulders If the line is closed it is filled with the background colour 25 Inner edges of large boulders 26 Line showing cross section position If both control points red dots of a B zier curve grey line are given then the section line blue is drawn up to the perpendicular projection dotted of the first control point and from the projection dotted of the section control point No section curve is displayed 27 Survey line is automatically drawn by Therion 28 Used to indicate connection between maps in offset or the same points in extended elevation 29 For
10. formatted legend can be easily changed using legendtextcolor legendtextsize legendtextsectionsize and legendtextheadersize token registers e g for large blue text code tex map legendwidth 20cm legendtextcolor color 0 0 100 legendtextsize size 20 legendtextheadersize size 60 It is possible to display the whole map framed by setting the framethickness dimen register to positive value e g 0 5mm Customizing text labels There is a preliminary interface to changing font sizes for labels via the METAPOST macro 70 fonts_setup lt tinysize gt lt smallsize gt lt normalsize gt lt largesize gt lt hugesize gt which may be used inside of the code metapost section of the layout command lt nor malsize gt applies to point label lt smallsize gt applies to remark and all other point labels Each of them may apply to line label according to its size option Example code metapost fonts_setup 6 8 10 14 20 default values depend on scale for 1 200 they are 7 8 10 12 14 New map symbols Therion s layout command makes it easy to switch among various predefined map symbol sets If there is no such symbol or symbol set you want it s possible to design new map symbols However this requires knowledge of the METAPOST language which is used for map visualization It s described in Hobby J D A User s Manual for MetaPost available at http cm bell labs com cm cs cstr 162 ps gz
11. OPTIONS Arguments e lt object gt gt any survey or map identified by its ID Options e recursive lt on off gt gt valid only when a survey is selected If set on by default all subsurveys of the given survey are recursively selected unselected e map level lt number gt gt valid only when a map is selected Determines the level at which map expansion for atlas export is stopped By default 0 is used if basic is specified expansion is done up to the basic maps Note Map previews are displayed only as specified in maps in the current map level e chapter level lt number gt gt valid only when a map is selected Determines the level at which chapter expansion for atlas export is stopped By default 0 is used if or is specified no chapter is exported for this map If title pages option in layout is on each chapter starts with a title page unselect Description Unselects objects from export Syntax unselect lt object gt OPTIONS Arguments The same as the select command Options The same as the select command 48 text Description Specifies translation of any default therion text in output Syntax text lt language ID gt lt therion text gt lt my text gt Arguments e lt language ID gt gt standard ISO language identifier e g en or en_UK e lt therion text gt gt therion text to translate For list of therion texts and available translations see thlang tex
12. and SHOT TO_ID S 2 ID Lists caves surveys continuations Using export continuation list you get an overview of all points in the centreline and scraps marked as a possible continuation export cave list gives you a tabular information about surveyed caves you need to specify entrance flags in your data including length depth and entrance s location Detailed information about each sub survey gives export survey list command The length includes shots with approximate flags but not explored duplicate or surface 2D maps Maps for printing Maps are produced in PDF and SVG formats which may be viewed or printed in a wide variety of viewers Be sure to uncheck Fit page to paper or similar option if you want to print in the exact scale In atlas mode some additional information is put on each page page number map name and page label Especially useful are the numbers of neighbouring pages in N S E and W directions as well as in upper and lower levels There are also hyperlinks at the border of the map if the cave continues on the next page and on the appropriate cells of the Navigator 6l using station attribute for centreline point and point continuation in scraps 62 PDF files are highly optimized scraps are stored in XObject forms only once in the document and than referenced on appropriate pages Therion uses most advanced PDF features like transparency and layers Created PDF files may be optionally pos
13. file it had been defined Similar to th files there may be one file INDEX th2 per directory which includes all th2 files defines scrap joins and maps 48 E g survey entrance in the file entrance th 49 Remember that surveys create namespaces so you may reference only objects in the given survey and all subsurveys 0Tf you include maps in the top level survey you may reference any survey station in any scrap which is very flexible On the other side you have than use longer names in stations references like 3 dno katakomby jmn dumbier 42 When drawing scraps you should check if the outline is properly defined all lines creating the outer border should have outline out option all lines surrounding inner pillars outline in option Scrap outlines can t intersect themselves otherwise the inner side of the scrap can t be determined There are two simple tests that scrap outline is correct e there is no METAPOST warning scrap outline intersects itself e when you set passage fill to any color color map fg lt number gt option in layout you may see what Therion considers to be inside of the scrap How to create models The model is created from scrap outlines The height and depth of the passage are computed from passage height and dimensions point map symbols Therion in depth How the map is put together This chapter explains how clip place visibility and context options of point line and
14. iff legend option of the layout command was set to on or all values e legendtitle gt token register containing translated legend title e insertlegend gt macro for inserting legend symbols pictures with translated descrip tions in the specified number of columns according to legend columns layout option e formattedlegend gt combines all three above commands to get preformatted legend with header and symbols typeset in two columns if legend option is set on North arrow and scale bar may be displayed using e ifnortharrow gt conditional true if map projection is plan and symbol north arrow is not hidden in layout e ifscalebar gt conditional true if scalebar is not hidden e northarrow gt PDF form with the north arrow e scalebar gt PDF form with the scale bar There is a general purpose macro for typesetting in multiple columns e begmulti lt i gt endmulti gt text between these macros is typeset in lt i gt columns Example how to create atlas with lists of surveyors etc followed by map pages and with legend at the end code tex atlas atlastitlepages insertmaps formattedlegend Page layout in the map mode In the map mode it s possible to use a lot of predefined variables which are described in the previous chapter 62 Default adjust the legend columns layout option to get them more or less 63 Not to be used with map legend where multiple columns are to be adjusted by legend columns l
15. more about it here is a brief explanation of the above flowchart Program names are in roman font data files in italics Arrows show data flow between programs Temporary data files are not shown Meaning of colors e black Therion programs and macros XTherion is written in Tcl Tk so it needs this interpreter to run e red TRX package Tn the PDF map Therion renders most of the accented characters as a combination of accent and a base character Some obscure accents might be omitted Precomposed accented letters are included for Slovak and Czech languages 10 e green input files created by the user and output files created by Therion Therion itself does the main task It reads the input files interprets them finds closed loops and distributes errors Next it transforms all other data e g 2D maps according to new stations position Therion exports data for 2D maps in METAPOST format METAPOST gives the actual shape to abstract map symbols according to map symbol definitions it creates a lot of PostScript files with small fragments of the cave These are read back and converted to a PDF like format which forms input data for pdfT X PdfTFX does all the typesetting and creates a PDF file of the cave map Therion also exports 3D model full or centreline in various formats Centreline may be exported for further processing in any SQL database First run After explaining the basic principles of Therion it s a good
16. of lines with the outline out or outline in options passage walls have outline out by default These lines shouldn t intersect otherwise Therion METAPOST can t determine the interior of the scrap and METAPOST issues a warning message scrap outline intersects itself Each scrap has its own local cartesian coordinate system which usually corresponds with the millimeter paper if you measure the coordinates of map symbols by hand or pixels of the scanned image if you use XTherion Therion does the transformation from this local coordinate system to the real coordinates using the positions of survey stations which are specified both in the scrap as point map symbols and in centreline data If the scrap doesn t contain at least two survey stations with the name reference you have to use the scale option for calibrating the scrap This is usual for cross sections 21 The transformation consists of the following steps e Linear transformation shifting scaling and rotation which best fits stations drawn in the scrap to real ones Best means that the sum of squared distances between cor responding stations before and after transformation is minimal The result is displayed red if debug option of the layout command is set on e Non linear transformation of the scrap which 1 moves survey stations to their correct position 2 is continuous Displayed blue in the debug mode e Non linear transformation of t
17. on off gt gt specify whether survey creates namespace on by default e declination lt specification gt gt set the default declination for all data objects in this survey which can be overridden by declination definitions in subsurveys The lt specification gt has three forms 1 an empty string This will reset the declination definition 2 lt value gt lt units gt will set a single value also for undated surveys 3 lt date1 gt lt value1 gt lt date2 gt lt value2 gt lt units gt will set declination for several dates Then the declination of each shot will be set according to the date specification of the data object If you want to explicitly set the declination for undated survey data use instead of date 3 Note it s not possible to reference any object from the higher level surveys 16 If no declination is specified and some geodetic coordinate system is defined the dec lination is automatically computed using built in geomagnetic model N B The declination is positive when the magnetic north is east of true north e person rename lt old name gt lt new name gt gt rename a person whose name has been changed e title lt string gt gt description of the object e entrance lt station name gt gt specifies the main entrance to the cave represented by this survey If not specified and there is exactly one station marked entrance in this survey it is considered to repre
18. or no tick respectively e section gt text list of points which get the orientation arrow or 1 to indicate no arrows e slope gt numeric 0 no border 1 border text list of point direction length triplets Usage example def 1_wall_bedrock_UIS expr P T identity pickup PenA thdraw P enddef initsymbol 1_wall_bedrock_UIS Area symbols Areas are similar to lines they take only one argument path in absolute coordinates You may fill them in three ways e fill an uniform or randomised grid in a temporary picture having dimensions bbox path with some point symbols clip it according to path and add to the currentpic ture 73 e fill path with a solid colour e fill path with a predefined pattern using a withpattern keyword Patterns are defined using the same user interface without the patterncolor macro as described in the article Bolek P METAPOST and patterns TUGboat 3 XIX 1998 pp 276 283 available online at http www tug org TUGboat Articles tb19 3 tb60bolek pdf You may use standard METAPOST draw and similar macros without setting of T variable in pattern definitions Example on how to define and use patterns beginpattern pattern_water_UIS draw origin 10up withpen pensquare scaled 0 02u patternxstep 18u patterntransform identity rotated 45 endpattern def a_water_UIS expr p T identity thclean p thfill p withpattern pattern_water_UIS enddef i
19. org The TEX macros are used inside of code tex atlas part of the layout command see the chapter Processing data for details The basic one predefined by Therion is the 64 dopage macro The idea is simple for each page Therion defines TFX variables count token and box registers which contain the page elements map navigator page name etc At the end of each page macro dopage is invoked This defines the position of each element on the page By redefining this macro you ll get desired page layout Without this redefinition you ll get the standard layout Here is the list of variables defined for each page Bozes mapbox gt The box containing the map Its width height is set according to the size and overlap options of the layout command to size_width 2 overlap or size_height 2 overlap respectively navbox gt The box containing the navigator with dimensions size_width 2 nav_size_x 1 nav_factor or size_height 2 nav_size_yt 1 nav_factor respectively Both mapbox and navbox also contain hyperlinks Count registers pointerE pointerW pointerN pointerS contain the page number of the neigh bouring pages in the E W N and S directions If there is no such a page its page number is set to 0 pagenum current page number Token registers pointerU pointerD contain information about pages above and below the current page It consists of one or more concatenated records Each record
20. the name of the source file e use extern libs gt Don t copy TEX and METAPOST macros to working directory TEX and METAPOST should search for them on their own Use with caution e v version gt Display version information e x gt Generate file xtherion dat with additional information for X Therion XTherion compiler XTherion makes it easier to run Therion especially on systems without a command line prompt Compiler window is the default window of XTherion To run Therion it s enough to open a configuration file and press F9 or Compile button XTherion displays messages from Therion in the lower part of the screen Each error message is highlighted and is hyperlinked to the source file where the error occurred After a first run there are activated additional menus Survey structure and Map structure User may comfortably select a survey or map for export by double clicking on some of the items in the tree Simple click in the Survey structure tree displays some basic information about the survey in the Survey info menu 59 What we get Information files Log file Besides the messages from Therion and other programs used the log file contains infor mation about computed values of magnetic declination and meridian convergence loop errors and scrap distortions Absolute loop error is Ax Ay Az where Az is the difference between the iden tical start and end points of the loop be
21. units gt gt lt number gt lt length units gt per drawing unit 3 lt numi gt lt num2 gt lt length units gt gt lt num1 gt drawing units corresponds to lt num2 gt lt length units gt in reality 4 lt numi gt lt num8 gt lt length units gt gt this is the most general format where you specify in order the x and y coordinates of two points in the scrap and two points 22 in reality Optionally you can also specify units for the coordinates of the points in reality This form allows you to apply both scaling and rotation to the scrap cs lt coordinate system gt gt assumes that calibrated local scrap coordinates are given in specified coordinate system It is useful for absolute placing of imported sketches where no survey stations are specified stations lt list of station names gt gt stations you want to plot to the scrap but which are not used for scrap transformation You don t have to specify draw them with the point station command sketch lt filename gt lt x gt lt y gt gt underlying sketch bitmap specification lower left cor ner coordinates walls lt on off auto gt gt specify if the scrap should be used in 3D model reconstruction flip none horizontal vertical gt flips the scrap after scale transformation station names lt prefix gt lt suffix gt gt adds given prefix suffix to all survey stations in the current scrap Saves some typing author lt da
22. user defined line symbols 30 Usually open to surface 31 E g border invisible 27 nN e LINE DATA specify either the coordinates of a line segment lt x gt lt y gt or coordinates of a B zier curve arc lt c1x gt lt cly gt lt c2x gt lt c2y gt lt x gt lt y gt where c indicates the control point e close lt on off auto gt gt determines whether a line is closed or not e mark lt keyword gt gt is used to mark the point on the line see join command e orientation orient lt number gt gt orientation of the symbols on the line If not spec ified it s perpendicular to the line on its left side 0 lt number lt 360 e outline lt in out none gt gt determines whether the line serves as a border line for a scrap Default value is out for walls none for all other lines Use outline in for large pillars etc e reverse lt on off gt gt whether points are given in reverse order e size lt number gt gt line width left and right sizes are set to one half of this value e r size lt number gt gt size of the line to the right e 1 size lt number gt gt same to the left Required for slope type e smooth lt on off auto gt gt whether the line is smooth at the given point Auto is default e adjust lt horizontal vertical gt gt shifts the line point to be aligned horizontally ver tically with the previous point or next point if there is no previous point The result is horiz
23. value Example station 4 pit to explore continuation attr code V 19 If there is a passage that was explored but not surveyed yet estimated explored length of this passage can be added to the station with continuation flag Just add explored lt explored length gt to the station flags Explored lengths are a part of survey cave statistics displayed separately Example station 40 ugly crollway continuation explored 100m cs lt coordinate system gt p gt coordinate system for stations with fixed coordinates fix lt station gt lt x gt lt y gt lt z gt lt std x gt lt std y gt lt std z gt gt fix station coordi nates with specified errors only the units transformation not calibration is applied to them equate lt station list gt gt set points that are equivalent data lt style gt lt readings order gt gt set data style normal topofil diving cartesian cylpolar dimensions nosurvey and readings order Reading is one of the following keywords station from to tape length back compass back bearing back clino back gradient depth fromdepth todepth depthchange counter fromcount tocount northing easting altitude up ceiling down floor left right ignore ignoreall See Survex manual for details For interleaved data both newline and direction keywords are supported If backward and forward compass or clino reading are given the average of them is computed If one of the sh
24. varchar CENTRELINE_ID intege SURVEY_ID integer FROM_ID integer X real TO_ID integer Y real LENGTH real Z real BEARING real GRADIENT real ADJ_LENGTH real PERSON ID integer EXPLO PERSON_ID integer CENTRELINE_ID intege NAME varchar SURNAME varchar ADJ_BEARING real ADJ_GRADIENT real ERR_LENGTH real ERR_BEARING real ERR_GRADIENT real Table and column names are self explaining for undefined or non existing values NULL is used FLAG in SHOT_FLAG table is dpl or srf for duplicated or surface shots in STA TION_FLAG table ent con fix spr sin dol dig air ove arc for stations with entrance continuation fixed spring sink doline dig air draught overhang or arch attributes respectively Examples of simple queries follow List of survey team members with an information how much has each of them surveyed 61 select sum LENGTH sum SURFACE_LENGTH NAME SURNAME from CENTRELINE TOPO PERSON where CENTRELINE ID TOPO CENTRELINE_ID and PERSON ID PERSON_ID group by NAME SURNAME order by 1 desc 4 asc Which parts of the cave were surveyed in the year 1998 select TITLE from SURVEY where ID in select SURVEY_ID from CENTRELINE where TOPO_DATE between 1998 01 01 and 1998 12 31 How long are passages lying between 1500 and 1550 m a s l select sum LENGTH from SHOT STATION S1 STATION S2 where S1 Z S2 Z 2 between 1500 and 1550 and SHOT FROM_ID S1 ID
25. 5 tar gz package The source code is a primary Therion distribution It needs to be compiled and installed according to instructions in the Appendiz Installation on Windows Run the setup program and follow instructions It installs all the required stuff and creates shortcuts to XTherion and Therion Book Setting up environment Therion reads settings from the initialization file Default settings should work fine for users using just latin characters standard TFX and METAPOST If you want to use own fonts for latin or non latin characters in PDF maps edit initial ization file Instructions on how to do this are in the Appendiz How does it work So now it s clear what Therion needs let s have a look at the way it interacts with all these programs scanned sketches XTherion 4 Plain base v input data therion mp makempx gt mpto Therion 4 gt MetaPost dvitomp T X Plain format info amp log files M Plain format maps models DB pdfTeX aes Y Loch amp other viewers PDF maps therion tex DON T PANIC When your system is set up right the majority of this is hidden from the user and all necessary programs are run automatically by Therion For working with Therion it is enough to know that you have to create input data best done with XTherion run Therion and display output files 3D model map log file in the appropriate program For those who want to understand
26. Click gt select object right below the top object useful when several points lie above each other Thinking in Therion Although everything well almost everything about Therion input files has been ex plained this chapter offers some additional tips and hints How to enter centreline The basic building block is the centreline command If the cave is larger than a few meters it s a good idea to split data in more files and separate centreline data from map data We usually use one th file containing centreline per survey trip It s handy to start with an empty template file as shown below where dots will be replaced with appropriate texts encoding IS08859 1 survey title centreline team team date units clino compass grad data normal from to compass clino length 41 endcentreline endsurvey To create a unique namespace the centreline command is enclosed in survey end survey command It s useful when the survey has the same name as the file which contains it The points will than be referenced using character see the survey command description For really large caves it s possible to build a hierarchical structure of directories In such a case we create one special file called INDEX th which includes all other th files from given directory and contains equate commands to define connections between surveys How to draw maps The most important thing is to devise divi
27. H real 60 create table PERSON ID integer NAME varchar SURNAME varchar create table EXPLO PERSON_ID integer CENTRELINE_ID integer create table TOPO PERSON_ID integer CENTRELINE_ID integer create table STATION ID integer NAME varchar SURVEY_ID integer X real Y real Z real create table STATION_FLAG STATION_ID integer FLAG char 3 create table SHOT ID integer FROM_ID integer TO_ID integer CENTRELINE_ID integer LENGTH real BEARING real GRADIENT real ADJ_LENGTH real ADJ_BEARING real ADJ_GRADIENT real ERR_LENGTH real ERR_BEARING real ERR_GRADIENT real create table SHOT_FLAG SHOT_ID integer FLAG char 3 which is followed by a mass of SQL insert commands This file may be loaded into any SQL database after some database dependent initialization which may include running a SQL server and connecting to it creating a database and connecting to it A good idea is to start a transaction before loading this file if database doesn t start a transaction automatically It s important to set up database encoding to match the one specified in Therion export database command SURVEY CENTRELINE ID integer ID integer PARENT_ID integer SURVEY_ID integer NAME varchar TITLE varchar FULL_NAME varchar TOPO_DATE date TITLE varchar EXPLO_DATE date TOPO LENGTH real PERSON_ID integer SURFACE_LENGTH real DUPLICATE_LENGTH ID integer STATION_ID integer ID integer SHOT_ID integer NAME
28. area commands exactly work It gives also explanation of color trans parency symbol hide and symbol show options of the layout command While exporting the map Therion has to determine three attributes for each point line or area symbol visibility clipping and ordering 1 Symbol is visible if all of the following is true e it has visibility option set on all symbols by default e it hasn t been hidden by the symbol hide option in layout e if its context option is set the corresponding symbol hasn t been hidden by the symbol hide option in layout Only visible symbols are exported 2 Some symbols are clipped by the scrap outline These are by default all the following e point symbols symbolic passage fills bedrock guano e line symbols all line symbols which don t have outline option set with the exception of section arrow label gradient and water flow e area symbols all 43 The default setting may be changed using the clip option if this is allowed for par ticular symbol All other symbols are not clipped by the scrap boundary 3 Ordering Each symbol belongs to one of the following groups which are drawn consecutively e bottom gt all symbols with place bottom option set e default bottom gt all area symbols by default e default gt symbols which don t belong to any other group e default top gt ceiling step and chimney by default e top gt all symbols with place top option
29. ations from your project project using export continuation list o questions html File questions html then contains following list 103 Comment Explored Survey Station Code water too cold to continue survey 50 0 Sample cave strong wind from breakdown Sample cave pit Sample cave Using user defined symbol types If therion does not offer any appropriate symbol for the feature you want to draw to the map you can use user defined symbol type type u valid for point line and area objects The syntax is very simple Assume you want to create bat point line and area You just use u bat as a type bat is in fact subtype of u type So your code will be like this point 555 0 480 0 u bat or line u bat or area u bat When you export map without defining the symbols in METAPOST user defined symbols are highlighted in red without any graphical representation ee To display them correctly you need to define symbols for them in METAPOST languge the same way as ordinary symbols are usually redefined Firstly point symbol In the code metapost section of your layout define point u bat symbol like this 104 def p_u_bat expr pos theta sc al T identity shifted pos thfill bat_path scaled 2 0 withcolor black enddef similarly the line u bat symbol def l_u_bat expr P T identity cas Q dlzka arclength P mojkrok adjust_step dlzka 1 0u pickup PenD forever t arctim
30. ayout option 69 cavename comment copyrights explotitle topotitle cartotitle exploteam topoteam cartoteam explodate topodate cartodate cavelength cavedepth cavelengthtitle cavedepthtitle cavemaxz caveminz thversion currentdate outcscode outcsname northdir magdecl gridconv ifnortharrow ifscalebar northarrow scalebar iflegend legendtitle insertlegend begmulti lt i gt endmulti formattedlegend legendcolumns In order to place them somewhere on the map page you have to define maplayout macro in the code tex map section of the layout command It should contain one or more legendbox invocations The legendbox macro has four parameters coordinates ranging 0 100 alignment specification N E S W NE SE SW NW or C and the content to be displayed A simple example is def maplayout legendbox 0 100 NW northarrow which displays north arrow in the upper left corner of the map sheet For user s convenience there is legendcontent token register It contains preformat ted cave name north arrow scale bar explo topo carto teams comment copyrights and legend The legendcontent is also used in the default map layout definition def maplayout legendbox 0 100 NW the legendcontent Width of the above text may be adjusted by legendwidth dimen register its default value is set by legend width layout option The color and size of texts in the pre
31. by one option The next two lines contain data coordinates of B zier curves to be drawn The next line smooth off specifies an option which applies to subsequent data i e not for the whole line unlike the option id in the first line and the last line contains some more data e if the value of an option or argument contains spaces you should enclose this value in or If you want to put a double quote into text in you need to insert it twice Quotes are used for strings brackets for numerical values and keywords e each line ending with a backslash is considered to continue on the next line as if there was neither line break nor backlash e everything that follows until the end of line even inside a command is considered to be a comment and is ignored e multiline comments inside comment endcomment block are allowed in data and configuration files Data types Therion uses following data types e keyword gt a sequence of A Z a z 0 9 and _ characters not starting with e ext_keyword gt keyword that can also contain characters but not on the first position e date gt a date or a time interval specification in a format YYYY MM DD HH MM SS SS YYYY MM DD HH MM SS SS or to leave a date unspec ified e person gt a person s first name and surname separated by whitespace characters Use to separate first name and surname if there are more names e
32. ccording to the most recent known coordinates of survey stations In 1999 we begun to think about creating own program for map drawing We knew about programs which were perfectly suited for particular sub tasks There was METAPOST a high level programming language for vector graphics description Survex for excellent 7 processing of survey shots and T X for typesetting the results We had only to glue them together By Xmas 1999 we had a minimalistic version of Therion working for the first time This consisted only of about 32 kB of Perl scripts and METAPOST macros but served the purpose of showing that our ideas were implementable During 2000 2001 we searched for the optimal format of the input data programming language concept of interactive map editor and internal algorithms with the help of Martin Sluka Prague and Martin Heller Ziirich In 2002 we were able to introduce the first really usable version of Therion which met our requirements Features Therion is a command line application It processes input files which are including 2D maps in text format and creates files with 2D maps or 3D model as the output The syntax of input files is described in detail in later chapters You may create these files in an arbitrary plain text editor like ed or vi They contain instructions for Therion like point 1303 1004 pillar where point is a keyword for point symbol followed by its coordinates and a symbol type specificati
33. ction submenu and select Insert point than press newly renamed Insert point button A shortcut for all this is Ctrl p Than click on the 42 Note Therion doesn t use background images in any way unless you assign them to some scrap using sketch option 36 desired spot in the working area and you ll see a blue dot representing a point symbol Its attributes can be adjusted in the Point control menu You ll stay in insert mode each click on the working area adds a new point symbol Take care not to click twice on the same place you would insert two point symbols in the same place To escape from insert to select mode press Esc key on the keyboard or Select button in the File commands menu What will the order of commands in the output file Exactly the same as in the outline in the File commands menu Newly created point line and text objects are added before the currently marked line in the outline It is possible to change the order by selecting a line and pressing Move down Move up or Move to buttons in the File commands menu This way you can also move objects between scraps Drawing lines is similar to drawing in other vector editing programs which work with B zier curves Guess how to enter the line insertion mode other than using the shortcut Ctrl l Click where the first point should be then drag the mouse with pressed left button and release it where the first control point should be Than click somewh
34. d at the coordinates origin For the final map all drawings are transformed as specified in the T transforma tion variable so it s necessary to set this variable before drawing This is usually done in two steps assume that four arguments are P R S A eset the U pair variable to a eat of the symbol for correct alignment The alignment argument A is a pair representing ratios sift and 2i Hence aligned A means shifted xpart A xpart U ypart A ypart U e set the T transformation variable 72 T identity aligned A rotated R scaled S shifted P For drawing and filling use thdraw and thfill commands instead of METAPOST s draw and fill These take automatically care of T transformation An example definition may be def p_entrance_UIS expr P R S A U 2u 5u T identity aligned A rotated R scaled S shifted P thrill 20 50 0 60 2 50 cycele enddef initsymbol p_entrance_UIS Line symbols Line symbols differ from point symbols in respect that there is no local coordinate system Each line symbol gets the path in absolute coordinates as the first argument Therefore it s necessary to set T variable to identity before drawing Following symbols take additional arguments e arrow gt numeric 0 is no arrows 1 arrow at the end 2 begin 3 both ends e contour gt text list of points which get the tick or one of 1 2 or 3 to mark undefined tick tick in the middle
35. d by fix e g value fix 1300 this value is used as an absolute altitude The value can optionally be followed by length units dimensions value lt above gt lt below gt lt units gt specifies passage dimensions a bove below centerline plane used in 3D model line Description Line is a command for drawing a line symbol on the map Each line symbol is oriented and its visualization may depend on its orientation e g pitch edge ticks The general rule is that the free space is on the left rock on the right Examples the lower side of a pitch higher side of a chimney and interior of a passage are on the left side of pitch chimney or wall symbols respectively Syntax line lt type gt OPTIONS OPTIONS LINE DATA OPTIONS LINE DATA 26 endline Context scrap Arguments e lt type gt is a keyword that determines the type of line The following types are sup ported passages wall contour slope floor step pit ceiling step chimney over hang ceiling meander floor meander passage fills flowstone moonmilk rock border rock edge water flow labels label I 26 27 28 29 special border arrow section survey map connection u Command like options e subtype lt keyword gt gt determines line subtype The following subtypes are supported for given types wall invisible bedrock default sand clay pebbles debris blocks ice un
36. d in the same directory to calculate the calibration data 441n the case of survey stations XTherion automatically increases the station number for the next symbol inserted 45 Calibration information for nine distinct points is present if centreline contains station s fixed using geodetic coordinate system s 38 If the PDF file is used directly you have to set DPI and output format before automatic conversion to a raster format PocketTopo data exported in Therion format from PocketTopo application can be imported in text editor as well as in map editor File Import PocketTopo therion export and Backgroud Images Insert PocketTopo therion export The same file is used for both imports Importing sketch does not create scrap data directly The drawing is just displayed on the background like scanned bitmaps and should be digitized manually Keyboard and mouse shortcuts in the Map editor General e Ctrl Z gt undo e Ctrl Y gt redo e F9 gt compile current project e to select object in the listbox using keyboard switch using Tab into desired listbox move with underlined cursor to desired object press Space e PageUp PageDown gt scroll up down in the side panel e Shift PageUp PageDown gt scroll up down in file commands window Drawing area and background images e RightClick gt scroll drawing area e Double RightClick on the image gt move the image Inserting scrap e Ctrl R gt
37. ding and ability to open multiple files To make entering data easy it supports table formatting of centreline data There is a menu Data table for typing the data It may be customized to user s data order by pressing a Scan data format button when the cursor is below the data order specification data option in the centreline command XTherion map editor Map editor allows you to draw and edit map fully interactively But don t expect too much XTherion is not a truly WYSIWYG editor It displays only the position not the actual shape of drawn point or line symbols Visually there is no difference between a helictite and a text label both are rendered as simple dots The type and other attributes of any object are specified only in the Point control and Line control menus Exercise Find two substantial reasons why the map drawn in XTherion can t be identical with Therion output If you answer this you ll know why XTherion will never be true WYSIWYG editor Authors laziness is not the correct answer Let s begin by describing typical use of the map editor First you have to decide which part of the cave which scrap you ll draw After creating a new file in the map editor you may load one or more images scanned survey sketches from the cave as a background for the drawing Click on the Insert button in Background images menu Unfortunately as a limitation of Tcl Tk language 39 File enco
38. ding is specified on the first line of the file This line is hidden by XTherion and may be accessed only indirectly using the right hand menu 40 Tt s possible to draw more than one scrap in one file in which case all inactive scraps are rendered yellow 41 XTherion can t scale nor rotate individual images so use the same orientation scale and DPI for all images used in the same scrap 35 only GIF PNM and PPM plus PNG and JPEG if you installed tkImg extension images are supported Additionally XTherion supports XVI XTherion vector image format which displays centreline and LRUD information on the background and Pocket Topo data exported in Therion format see below All opened images are placed in the upper left corner of the working area Move them by double clicking and dragging with the right mouse button or through a menu For better performance on slower computers it s possible to temporarily unload a currently unused image from memory by unchecking its Visibility check box It s possible to open an existing file without loading of background images using Open XP menu The size and zoom setting of the drawing area is adjusted in the corresponding menu Auto adjust calculates optimal size of the working area according to the sizes and positions of loaded background images After these preparation steps you re ready for drawing or more precisely for creating a map data file It s important to remember that you
39. e scrap point line area join equate map surface import prade revise Custom sibus XTherion XTherion text edisi XTherion map editor Additional tools Keyboard and mouse ouied in th Map editor Thinking in Therion How to enter centreline How to draw maps How to create models Therion in depth How the map is put Eoin Processing data Configuration file system encoding language SCS ob ek A sketch warp input OoOoOonNN 10 11 12 12 13 14 14 15 15 15 16 17 21 23 26 29 30 30 31 32 33 33 33 34 34 35 35 38 39 41 41 42 43 43 43 46 46 46 46 46 46 47 47 source select unselect text layout setup3d sketch colors export Running Therion XTherion compiler What we get Information files Log file XTherion SQL export ee at Se oe Lists caves surveys continuations 2Dmaps Maps for printin Maps for GIS Special purpose maps 3D models Loch Bo ade ive ar fan dp MA SS Changing layout of PDF maps Page layout in the atlas mode Page layout in the map mode Customizing text labels New map symbols Point symbols Line symbols Area symbols Special symbols Appendix Compilation Quick start Hacker s guide Environment variables Initialization files Therion XTherion Limitations Example data H
40. e any other therion file Empty lines or lines starting with are ignored lines ending with a backslash continue on next line Currently supported initialization commands follow e loop closure lt therion survex gt By default survex is used if present otherwise therion e encoding default lt encoding name gt Set the default output encoding currently unused e encoding sql lt encoding name gt Set the default output encoding for SQL export e language lt xx _YY gt Default output language See the copyright page for the list of available languages e units lt metric imperial gt Set default units e mpost path lt file path gt Set the full path to a METAPOST executable if Therion can t find it mpost is the default e mpost options lt string gt Set METAPOST options e pdftex path lt file path gt Set the full path to a pdfT X executable if Therion can t find it pdfetex is the default e identify path lt file path gt 78 Set the full path to ImageMagick s identify executable if Therion can t find it iden tify is the default convert path lt file path gt Set the full path to ImageMagick s convert executable if Therion can t find it con vert is the default source path lt directory gt Path to data and configuration files Used mostly for system wide grades and layout definitions tmp path lt directory gt Path where temporary directory sho
41. e cas of P thfill bat_path scaled 0 5 shifted point t of P withcolor black cas cas mojkrok exitif cas gt dlzka mojkrok 3 for rounding errors endfor enddef and finally the area u bat symbol pattern in this case h bat pattern beginpattern pattern_bat fill bat_path withcolor black endpattern h bat area symbol def a_u_bat expr Path T identity thclean Path thfill Path withpattern pattern_bat enddef These symbols will be included also in the legend To change the way how they are drawn there just define appropriate macro Its name should be symbol macro name with _legend suffix def 1_u_bat_legend l_u_bat 2 2 8 8 inscale enddef Finally add description of your new symbols that will be shown in the legend using text command anywhere in the configuration file 105 text en point u bat bat text en line u bat bat path text en area u bat lot of bats After all these definitions you receive bat point line and area symbols with proper graph ical representation and legend boxes LA wall bat path I border lot of bats 106
42. e data lines consist of border line references IDs e place lt bottom default top gt gt changes displaying order in the map e clip lt on off gt gt specify whether a symbol is clipped by the scrap border 32 An empty area which can be used to clean the background 33 For user defined area symbols may be followed by arbitrary subtype 29 e visibility lt on off gt gt displays hides the symbol e context lt point line area gt lt symbol type gt gt to be used with symbol hide and symbol show layout options symbol will be hidden shown according to rules for spec ified lt symbol type gt Options e id lt ext_keyword gt gt ID of the symbol join Description Join works in two modes it joins either two scraps or two or more points or lines in a map together When joining more than two points or lines use one join command for all of them not a sequence of join commands for pairs When joining scraps only passage walls are joined It s a good idea to place a scrap join in the passage which is as simple as possible otherwise you have to specify join for each pair of objects which should be joined Syntaz join lt point1 gt lt point2 gt lt pointN gt OPTIONS Context none scrap survey Arguments e lt pointX gt can be an ID of a point or line symbol optionally followed by a line point mark lt id gt lt mark gt e g podang1_131 podang1 mark1 lt mark gt can be also end
43. e map 99 This is because in top level import command survey create is imported from file cre ate create 3d with wrong coordinates and we import top level 3d file with surveys use switch This means cave create 1 will be imported here as create 1 cave and not 1 create cave To solve this problem we need to re import stations from top level cave 3d file once more with surveys create switch import cave 3d surveys use import cave 3d surveys create survey cave input use use th input create create th input ignore ignore th endsurvey After this additional import final looks as expected ignore 3 cave sub create cave use cave jore sub 1 cave 100 Conclusion Even if there are several possibilities how to map survex prefix structure to therion survey structure the most clean solution is to create survey structure to desired depth in th files using empty survey endsurvey pairs and allways use surveys use switch when importing 3d files Question marks handling Possible continuations are treated special way in therion in both centerline and map files You may associate text description explored length behind this continuation or any other atribute to it like Code if you have your own coding standard for continuations Question marks in centerline In the centerline object you may add a special flags to the station where continuation is possible Just use following syntax station 5 pit con
44. e of cs is used for all output files If no cs is defined in the configuration file the first cs therion encounters in the data files is used as an output cs Inside the layout specifies coordinate system for subsequent location data origin grid origin sketch warp Syntax e sketch warp lt algorithm gt Specifies which scrap warping morphing algorithm to use Possible algorithms are line the default plaquette invented by Marco Corvi input Works like input command in data files includes other files source Description Specifies which source data files Therion should read You can specify several files here one per line You can also specify them using the s command line option see below It is also possible to type some small snippets of code directly in configuration file using the multi line syntax Syntax source lt file name gt or source therion commands endsource Arguments e lt file name gt 47 select Description selects objects surveys and maps for export By default all survey objects are selected If there is no map selected all scraps belonging to selected surveys are selected by default for map export If there are no scraps or maps in the data centreline from all surveys is exported in the map When exporting maps in different projections you need to select them for each projection separately Syntaz select lt object gt
45. ection line None is default e gradient lt none center point gt gt can be used only with the contour type and indi cates where to put a gradient mark on the contour line If there is no gradient speci fication behaviour is symbol set dependent e g no tick in UIS tick in the middle in SKBB e head lt begin end both none gt gt can be used only with the arrow type and indicates where to put an arrow head End is default e text lt string gt gt valid only for label lines e height lt value gt gt height of pit or wall pit available in METAPOST as a numeric variable ATTR__height ery N Options e id lt ext_keyword gt gt ID of the symbol area Description Area is specified by surrounding border lines They may be of any type but must be listed in order and each pair of consecutive lines must intersect In order to be sure that lines intersect even after scrap transformation you may e g continue a lake border 1 cm behind a passage wall these overlaps will be automatically clipped by scrap border You may use invisible border to achieve this inside of the passage Syntax area lt type gt place lt bottom default top gt clip lt on off gt visibility lt on off gt border line references endarea Context scrap Arguments e lt type gt is one of following water sump sand debris blocks flowstone moonmilk snow ice clay pebbles bedrock u Command like options e th
46. ed e UTM1 UTM60 gt Universal Transverse Mercator in northern hemisphere and given zone WGS84 datum e UTM N UTM60N gt same as UTM1 UTM60 e UTM1S UTM60S gt UTM in southern hemisphere WGS84 datum e lat long long lat gt latitude N positive S negative and longitude E positive W negative in given order in degrees deg min sec allowed WGS84 datum By default not supported on output e EPSG lt number gt gt Most of EPSG coordinate systems Almost every coordinate sys tem used worldwide has its own EPSG number To find number of your system see extern proj4 nad epsg file in the therion source distribution e ESRI lt number gt gt Similar to EPSG but ESRI standard e JTSK iJTSK gt Czechoslovak S JTSK system used since 1920s with south and west axis JTSK and its modified version with axis pointing east and north and negative numbers iJTSK JTSK is not supported on output iJTSK is e JTSKO3 iJTSKO3 gt new S JTSK realisation introduced in Slovakia in 2011 e OSGB lt H N 0 S or T gt lt A Z except I gt p gt British Ordnance Survey National Grid e S MERC gt the spherical Mercator projection as used by various online mapping sites Magnetic declination Therion contains built in IGRF Earth geomagnetic field model valid for period 1900 2020 It is automatically used if the cave is located in space using any of supported geodetic coordinate systems and no declination is specifi
47. ed by user The computed dec lination is listed in the LOG file for information 2 See http www ngdc noaa gov IAGA vmod 14 Data format The syntax of input files is explained in the description of individual commands Studying the example files distributed with Therion will help you understand See also an example in the Appendiz Each of the following sections describes one Therion command using the following struc ture Description notes concerning this command Syntax schematic syntax description Context specifies the context in which is this command allowed The survey context means that the command must be enclosed by survey endsurvey pair The scrap context means that the command must be enclosed within scrap endscrap pair Context all means that the command may be used anywhere Arguments a list of the obligatory arguments with explanations Options a list of the available options Command like options options for multi line commands which can be specified among the data lines encoding Description sets the encoding of input file This allows the use of non ASCII characters in input files Syntax encoding lt encoding name gt Context It should be the very first command in the file Arguments e lt encoding name gt gt to see a list of all the supported encoding names run Therion with print encodings option UTF 8 Unicode and ASCII 7 bit encodings are always sup
48. ere else this point will be the second point of the curve and drag the mouse adjusting the second control point of the previous arc and the first control point of the next one simultaneously If this explanation sounds too obscure you can get some practise working in some of the standard vector editors with comprehensive documentation The line will be finished after escaping from the insertion mode Beginning and orientation of the line is marked by a small orange tick to the left at the first point For line symbols there are two control menus Line control and Line point control First one sets attributes for the whole curve like type or name The check box reverse is important Therion requires oriented curves and it is not unusual that you begin to draw from the wrong end The Line point control menu enables you to adjust the attributes of any selected point on the line such as the curve being smooth at this point which is on by default or the presence of neighbouring control points lt lt and gt gt check boxes Areas are specified by their surrounding lines Click on nsert area and then click on the lines surrounding the desired area They are automatically inserted in the Area control and named if not already named An alternate way is to insert them as a text command the contents of which entered in the Text editor menu of the Map editor is usual area endarea multi line command see the chapter Data forma
49. f B zier curves 55 r N sketch colors Syntax e sketch colors lt number of colors gt This option can be used to reduce size of sketch bitmap images in maps export Description Exports selected surveys or maps Syntax e export lt type gt OPTIONS Arguments e lt type gt gt The following export types are supported model gt 3D model of the cave map gt one page 2D map atlas gt 2D atlas in more pages cave list gt summary table of caves survey list gt summary table of surveys continuation list gt list of possible continuations database gt SQL database with centreline Options common e encoding enc lt encoding gt gt set output encoding e output o lt file gt gt set output file name If no file name is given the prefix cave is used with an extension corresponding to output format If the output filename is given and no output format is specified the format is deter mined from the filename extension model e format fmt lt format gt gt set model output format Currently the following output formats are supported loch native format default compass plt file survex 3d file dxf esri 3d shapefiles vrml 3dmf and km1 Google Earth e enable lt walls cave surface centerline splay shots surface all gt and 56 disable lt walls cave surface centerline splay shots surface all gt gt selects which features to export if the format supports it Surface
50. f METAPOST s draw and fill The following variables are also available e boolean ATTR__shotflag_splay ATTR__shotflag_duplicate ATTR__shotflag_approx gt set for line survey e boolean ATTR__stationflag_splay gt set true for endstations of splay shots e boolean ATTR__scrap_centerline gt set true for scraps created from centreline e boolean ATTR__elevation gt true for extended elevation false for plan projection e numeric ATTR__height gt height of a pit or wall pit e string ATTR__id gt contains current object ID e string ATTR__survey gt contains current survey name e string ATTR__scrap gt contains current scrap name e picture ATTR__text gt contains typeset text e g for point continuation e string NorthDir gt true or grid e numeric MagDecl gt magnetic declination in degrees e numeric GridConv gt grid meridian convergence in degrees Point symbols Point symbols are defined as macros using def enddef commands Majority of point symbol definitions has four arguments position pair rotation numeric scale numeric and alignment pair Exceptions are section which has no visual representa tion all labels which require special treatment as described in the previous chapter and station which takes only one argument position pair All point symbols are drawn in local coordinates with the length unit u Recommended ranges are 0 5u 0 5u in both axes The symbol should be centere
51. fore the error distribution measured along the x coordinate axis similarly for y and z Percentual loop error is calculated as absolute error loop length Average error is simple arithmetic average of all loop errors Scrap distortion is calculated using the distortion measure defined for all pairs of points point symbols points and control points of line symbols in the scrap The measure is calculated as Leal where d is the distance of points before warping and d is the distance of points after warping The maximal and average scrap distortions are calculated as a maximum or average of such measures applied to all pairs of points XTherion Therion provides some basic facts about each survey length vertical range N S range E W range number of shots and stations if x option is given This information is displayed in XTherion Compiler window Survey info menu when some survey from the Survey structure menu is selected SQL export SQL export makes it easy to get very detailed and subtle information about centreline It is a text file starting with tables declaration where stands in the following listing for a maximal value required by the column data create table SURVEY ID integer PARENT_ID integer NAME varchar FULL_NAME varchar TITLE varchar 7 create table CENTRELINE ID integer SURVEY_ID integer TITLE varchar TOPO_DATE date EXPLO_DATE date LENGTH real SURFACE_LENGTH real DUPLICATE_LENGT
52. g libpng zlib All programs with the exception of BWidget and tkImg package are usually included in Linux Unix or MacOS X distributions For Windows consider using MinGW and MSYS http www mingw org It s a distribution of GNU utilities with GNU make and GCC BTW why not to use precompiled Windows version 75 Quick start e unpack the source distribution therion 5 tar gz e cd therion e make config macosx or make config win32 if you use MacOS X or Windows re spectively e make e sudo make install Hacker s guide Make parameters Therion s makefile may take some optional parameters e config linux config macosx config win32 gt configure Therion for a specific plat form Linux is a default e config release config oxygen config ozone gt set optimization level for C compiler none 02 and 03 e config debug gt useful before debugging the program e install gt install Therion e clean gt delete all temporary files Adding new translations Therion supports translation of map labels Suppose you want to add a new language ae e run perl process pl export xx in the thlang Therion source subdirectory This creates a file texts_xx txt This file is UTF 8 encoded e edit the texts_xx txt file Add your translations at lines beginning with xx run make update e compile Therion Adding new encodings Although UTF 8 Unicode encoding covers all characters which Therion is ab
53. hanges to the macro files After modifying the files in the mpost and tex directories it s necessary to run Perl scripts genmpost pl and gentex pl which generate C header files and compile Therion executable again Environment variables Therion reads following environment variables e THERION gt not required search path for x therion ini file s e HOME HOMEDRIVE HOMEPATH on WinXP gt not required but usually present on your system search path for x therion ini file s e TEMP TMP gt system temporary directory where Therion stores temporary files in a directory named th PID where PID is a process ID unless tmp path is specified in the initialization file Consult the documentation of your OS how to set them 64 This section applies to old style font selection using tex fonts command in the initialization file and is obsolete when using pdf fonts command TT Initialization files Therion s and XTherion s system dependent settings are specified in the file therion ini or xtherion ini respectively They are searched for in the following directories eon UNIX THERION HOME therion etc usr etc usr local etc eon Windows THERION HOME therion lt Therion installation directory gt C WINDOWS C WINNT C Program Files Therion Therion If no file is found Therion uses its default settings If you want to list them use print init file option The initialization file is read lik
54. has a special format page name page number destination If there are no such pages the value is set to notdef See the description of the processpointeritem macro below for how to extract and use this information pagename gt name of the current map according to options of the map command pagelabel gt the page label as specified by origin and origin label options of the layout command 65 The following variables are set at the beginning of the document e hsize vsize gt T X page dimensions set according to page width and page height parameters of the page setup option of the layout command They determine our playground when defining page layout using the dopage macro e ifpagenumbering gt This conditional is set true or false according to the page numbers option of the layout command There are also some predefined macros which help with the processing of pointer variables e showpointer with one of the pointerE pointerW pointerN or pointerS as an argument displays the value of the argument If the value is 0 it doesn t display anything This is useful because the zero value no neighbouring page shouldn t be displayed e showpointerlist with one of the pointerU or pointerD as an argument presents the content of this argument Which contains pointerU or pointerD see above For each record it calls the macro processpointeritem which is responsible for data formatting Macro sho
55. he scrap which 1 moves joined points together 2 doesn t move survey stations 3 is continuous Finally the position of curves control points is adjusted to preserve smoothness The result is final map Syntax scrap lt id gt OPTIONS point line and area commands endscrap lt id gt Context none survey Arguments e lt id gt gt scrap identifier Options e projection lt specification gt gt specifies the drawing projection Each projection is identified by a type and optionally by an index in the form typel index The index can be any keyword The following projection types are supported 1 none gt no projection used for cross sections or maps that are independent of survey data e g digitization of old maps where no centreline data are available No index is allowed for this projection 2 plan gt basic plan projection default 3 elevation gt orthogonal projection a k a projected profile which optionally takes a view direction as an argument e g elevation 10 or elevation 10 deg 4 extended gt extended elevation a k a extended profile e scale lt specification gt gt is used to pre scale convert coordinates from pixels to meters the scrap data If scrap projection is none this is the only transformation that is done with coordinates The lt specification gt has four forms 1 lt number gt gt lt number gt meters per drawing unit 2 lt number gt lt length
56. hed and he will rule over the all Gospel according to Thomas 2nd century Changing layout of PDF maps This chapter is extremely useful if you re not satisfied with the predefined layout of map symbols and maps provided and want to adapt them to your needs However you need to know how to write plain TREX and METAPOST macros to do this Page layout in the atlas mode The layout command allows basic page setup in the atlas mode This is done through its options such as page setup or overlap But there are no options which would specify the position of map navigator and other elements inside the area defined by page width and page height dimensions e g why is the navigator below the map and not on its right or left side There are many possible arrangements for a page Rather than offer even more options for the layout command Therion uses the TFX language to describe other page layouts This approach has the advantage that the user has direct access to the advanced typesetting engine without making the language of Therion overcomplex Therion uses pdfTFX with the plain format for typesetting So you should be familiar with the plain T X if you wish to define new layouts The ultimate reference for plain TEX is Knuth D E The TRXbook Reading Massachusetts Addison Wesley 1984 For pdfT X s extensions there is a short manual Thanh H T Rahtz Hagen H The pdfTRX user manual available at http www pdftex
57. id for extra points specifies the distance to the nearest station or station specified using from option If not specified appropriate value from LRUD data is used from lt station gt gt valid for extra points specifies reference station visibility lt on off gt gt displays hides the symbol context lt point line area gt lt symbol type gt gt to be used with symbol hide and symbol show layout options symbol will be hidden shown according to rules for spec ified lt symbol type gt id lt ext_keyword gt gt ID of the symbol Type specific options name lt reference gt gt if the point type is station this option gives the reference to the real survey station extend prevlious lt station gt gt if the point type is station and scrap projection is extended elevation you can adjust the extension of the centreline using this option scrap lt reference gt gt if the point type is section this is a reference to a cross section scrap explored lt length gt gt if the point type is continuation you can specify length of pas sages explored but not surveyed yet This value is afterwards displayed in survey cave statistics text gt text of the label remark or continuation It may contain following formatting keywords 21 Example if you specify context point air draught to a label which displays the observation date the symbol hide point air draught command would hide both air draught arro
58. idea to try it on the example data e Download the sample data from Therion web page and unpack it somewhere on your computer s hard drive e Run XTherion under Unix and MacOS X by typing xtherion in the command line under Windows there is a shortcut in the Start menu e Open the file thconfig from the sample data directory in the Compiler window of XTherion e Press F9 or compile in the menu to run Therion on the data you ll get some mes sages from Therion METAPOST and T X e PDF maps and 3D model are created in the data directory Additionally you may open survey data files th in the Text editor window and map data files th2 in the Map editor window of XTherion Although the data format may look confusing for the first time it will be explained in the following chapters 11 and learning have we written this work Examine this book ponder the meaning we have dispersed in various places and gathered again what we have concealed Only for yot children of doctrine Vosigitur do tring amp fapienti filii perquirite in hoc libro colligendo noftramdifperfam pent ees in diuerfis locis propofui mus amp quod occultatum eft 4 nobis in uno loco manifeftum fecimus illud in alio ut fapientibus uobis patefiat uobis enim folis cripfimus in one place we have disclosed in another that it may be understood by your wisdom Henricus C Agrippa ab Nettesheym 1533 Creat
59. illar curtain he lictite soda straw crystal wall calcite popcorn disk gypsum gypsum flower aragonite cave pearl rimstone pool rimstone dam anastomosis kar ren scallop flute raft cone clay tree equipment anchor rope fixed ladder rope ladder steps bridge traverse camp no equipment passage ends continuation narrow end low end flowstone choke breakdown choke clay choke entrance others dig archeo material paleo material vegetable debris root water flow spring sink ice stalactite ice stalagmite ice pillar gradient air draught map connection extra u Options e subtype lt keyword gt gt determines the object s subtype The following subtypes for given types are supported station temporary default painted natural fixed air draught winter summer undefined default water flow permanent default intermittent paleo The subtype may be specified also directly in lt type gt specification using as a separator Any subtype specification can be used with user defined type u In this case you need also to define corresponding metapost symbol see the chapter New map symbols 9 General altitude label All altitudes are exported as a difference against grid Z origin which is 0 by default To display altitude on the passage wall use altitude option for any line point of the passage wall 0 Height of formations inside of the pa
60. ing declination The declination is positive when the magnetic north is east of true north If no decli nation is specified or the declination is reset then a valid declination specification is searched for in all surveys the data object is in See declination option of survey command 18 e grid angle lt value gt lt units gt gt specifies the magnetic grid angle declination against grid north esd lt quantity list gt lt value gt lt units gt gt sets the standard deviation for the given measurements The Quantity list can contain the following keywords length tape bearing compass gradient clino counter depth x y z position easting dx nor thing dy altitude dz e grade lt grade list gt gt sets standard deviations according to the survey grade specifi cation see grade command All previously specified standard deviations or grades are lost If you want to change an SD use the sd option after this command If multiple grades are specified only the last one applies You can specify grades only for position or only for surveys If you want to combine them you must use them in one grade line e units lt quantity list gt lt factor gt lt units gt p set the units for given measurements same quantities as for sd e calibrate lt quantity list gt lt zero error gt lt scale gt gt set the instrument calibra tion The measured value is calculated using the following formula measured val
61. ing data files Basics The input files for Therion are in text format There are a few rules about how such a file should look There are two kinds of commands One line commands and multi line commands A one line command is terminated by an end of line character The syntax of these is command argi argN option1 valuel option2 value2 where arg1 argN are obligatory arguments and pairs option value are options which you may freely omit Which arguments and options are available depends on the particular command An example may be point 643 5 505 0 gradient orientation 144 7 with three obligatory arguments and one optional option value pair Sometimes op tions have no or multiple values Multi line commands begin similarly to one line commands but continue on subsequent lines until explicit command termination These lines may contain either data or options which are applied to subsequent data If a data line starts with a word 64 reserved for an option you have to insert in front of it The syntax is command argi argN option1 valuel option2 value2 optionX valueX data endcommand Again for better illustration a real example follows line wall id walltobereferenced 1174 0 744 5 1194 0 756 5 1192 5 757 5 1176 0 791 0 smooth off 1205 5 788 0 1195 5 832 5 1173 5 879 0 12 endline This command line has one obligatory argument a line type passage wall in this case followed
62. insert scrap Inserting line e Crtl L gt insert new line and enter an insert line point mode e LeftClick gt insert line point without control points e Ctrl LeftClick gt insert line point very close to existing point normally it s inserted right above closest existing point e LeftClick drag gt insert line point with control points e hold Ctrl while dragging gt fix the distance of previous control point 46 shostscript and convert should be installed on your system Note that Windows installation does not include ghostscript 47 This is a special text format which needs to be imported using XTherion and can not be processed by Therion directly 39 e LeftClick drag on the control point gt move its position e RightClick on one of the previous points gt selects the previous point while in insert mode useful if you want to change also the direction of previous control point e Esc or LeftClick on the last point gt end the line insertion e LeftClick on the first line point gt close the line and end line insertion Editing line e LeftClick drag gt move line point e Ctrl LeftClick drag gt move line point close to the existing point normally it is moved right above closest existing point e LeftClick on control point drag gt move control point Adding line point e select the point before which you want to insert points insert required points press Esc or left click on the point yo
63. ion 3 deg centreline calibrate length 0 0 96 data normal from to compass length clino 1 2 0 10 10 endcentreline endsurvey centreline equate 20first 1 second endcentreline scraps are usually in separate th2 files 81 scrap si author 2004 Therion team point 763 746 station name 2 second point 702 430 station name 20first point 352 469 station name 1 first point 675 585 air draught orientation 240 scale large line wall close on 287 475 281 354 687 331 755 367 981 486 846 879 683 739 476 561 293 611 287 475 endline endscrap map mi title Test map sl endmap endsurvey Corresponding configuration file could be encoding utf 8 source test layout 11 scale 1 100 layers off endlayout select mi main export model fmt survex export map layout 11 If you save data file as test th and configuration file as thconfig you may process them with Therion History e 1999 Oct first concrete ideas 82 Nov start of programming Perl scripts and METAPOST macros Dec 27 Therion compiles simple map in PostScript format for the first time 32 kB of Perl and 7 kB of METAPOST and T X source code The map warping model was substantially different from the current one positions of features were relative to a particular survey shot not to positions of all stations in a scrap This version already included some interesting features such as transformation functions which allowed user
64. ip none vertical horizontal grid data endsurface Context none survey Command like options e cs lt coordinate system gt b gt coordinate system for bitmap calibration and grid origin specification e bitmap lt filename gt lt calibration gt gt scanned topographical map calibration may have two forms 1 X1 Y1 x1 y1 X2 Y2 x2 y2 units where upper case X Y variables are pic ture coordinates pixels lower left corner is 0 0 lower case x y variables are real coordinates Optional units apply to real coordinates metres by default 2 X1 Y1 station1 X2 Y2 station2 where upper case X Y variables are picture coordinates and station1 and station2 are survey stations names e grid units lt units gt gt units in which grid is specified Metres by default e grid lt origin x gt lt origin y gt lt x spacing gt lt y spacing gt lt x count gt lt y count gt lt origin x gt lt origin y gt p gt specify coordinates of the lower left S W corner of the grid lt x spacing gt lt y spacing gt gt distance between grid nodes in W E and S N directions lt x count gt lt y count gt gt number of nodes in the row and number of rows which form the grid see below e grid data gt a stream of numbers giving the altitude a s l in grid nodes It starts in the grid origin and fills the grid in rows in the row from W to E rows from S to N e grid flip none vertical horizontal gt useful if your grid expor
65. is use extend vertical 5 5 Or you can completely hide this leg from extended centerline using extend hide 5 5 92 Stations in extended elevation scraps Even if the station 1 is present more then one time in the map therion automatically detects correct position of this station in each scrap and they are usually drawn correctly The only thing that is missing is connection line between stations 1 in these two branches Therion does not automatically generate these lines because their shape usually depends on particilar map To draw such a line all you need to do is to create a simple scrap with this line Here is an example scrap sc proj extended point 0 O station name 1 from 5 visibility off point 100 0 station name 1 from 2 visibility off line map connection 5 0 15 100 15 93 100 5 endline endscrap As you can see even there are two stations with same name they are distinguished by from option which specifies previous station in extended elevation Using this scrap you receive the final map Dipsplaying overlaying maps in offset Assume that there are two maps mi and m2 m1 is above m2 By default therion displays m1 overlying m2 To display map m2 in offset you need to create a map containing m2 and specify offset and preview type for m2 in this map Example map m12 mi break m2 0 8 m below endmap 94 After selecting the m12 in configuration file you recei
66. is currently exported in therion format only wall source lt maps centerline all gt gt set source data for passage wall modeling map atlas format fmt lt format gt gt set map format Currently pdf svg xhtml survex dxf esri kml Google Earth xvi and bbox for map pdf for atlas are supported projection lt id gt p gt unique identifier that specifies the map projection type See the scrap command for details If there is no map defined all scraps in the given projection are exported If there are no scraps with the specified projection then Therion will display centreline from selected surveys layout lt id gt gt use predefined map or atlas layout layout xxx gt where xxx stands for other layout options Using this you can change some layout properties directly within the export command encoding enc lt encoding gt gt set output encoding common for lists format fmt lt format gt gt set continuation output format Currently the following out put formats are supported html default txt km1 and dbf continuation list attributes lt on off gt gt set whether to export user defined attributes in continua tion list table filter lt on off gt gt set whether continuations without comment text should be fil tered out cave list location lt on off gt gt set whether to export coordinates of cave entrances in the table surveys on off gt exports raw lis
67. is set top e grid is displayed if grid is set top 45 We both step and do not step in the same rivers Heraclitus of Ephesus 6th 5th century BC Processing data Besides data files which contain survey data Therion uses a configuration file which contains instructions on how the data should be presented Configuration file The configuration filename can be given as an argument to therion By default Therion searches for file named thconfig in the current working directory It is read like any other therion file i e one command per line empty lines or lines starting with are ignored lines ended with a backslash continue on the next line A list of currently supported commands follow system Allows to execute system commands during therion compilation Normally Therion waits until the subprocess is finished If you want to continue compilation without break use lt command gt amp syntax on Linux and start lt command gt syntax on Windows encoding Works like the encoding command in data files specifies character sets language Syntax e language lt xx_ YY gt Sets the output language for translatable texts cs Syntax ecs lt coordinate system gt 54 E g to open or refresh external PDF viewer 46 5 3 Outside of layout command specifies the coordinate system for output It is not possible to specify more coordinate systems for different outputs the last occurenc
68. istory Future General 2D maps 3D models XTherion Loch Labyrinth Case studies ore Drawing maps in therion Listing caves Area symbols Sketch morphing 47 48 48 49 49 55 56 56 58 59 60 60 60 60 62 62 62 63 63 63 63 64 64 69 70 71 72 73 73 74 75 75 76 76 77 78 78 80 81 81 82 84 84 84 84 84 84 84 85 85 87 87 Extended elevation control Stations in extended elevation scraps Dipsplaying overlaying maps in offset Importing survex 3d files Using surveys specified in th files Creating non existing surveys Ignoring station prefixes Managing large projects Conclusion fe ae Me Question marks handling Question marks in centerline Question marks in maps Exporting question mark lists Using user defined symbol types 90 93 94 96 96 97 98 99 101 101 101 102 103 104 LET NO ONE IGNORANT OF GEOMETRY ENTER HERE alleged inscription over the entrance of Plato s Academy 4th century BC Introduction Therion is a tool for cave surveying Its purpose is to help e archive survey data on computer in a form as close to the original notes and sketches as possible and retrieve them in a flexible and efficient way e draw a nice up to date plan or elevation map e create a realistic 3D model of the cave It runs on Unix Linux MacOS X and Win32 operating systems Source code and Win dows installer are available on the Therion web page http therion
69. latino vf vpalatino tfm and palatino tfm Add the line palatino lt xl2 enc lt palatino ttf to the pdfIfX s map file The same should be done for the italic and bold faces and corresponding sans serif and sans serif oblique fonts If you re lazy try tex fonts xl2 palatino palatino palatino palatino palatino We should use actually virtual font vpalatino instead of palatino which contains no kerning or ligatures but pdf TFX doesn t support pdfincludechars command on virtual fonts To be improved If you want to add some unsupported encodings read the chapter Compilation Hacker s guide XTherion Initialization file for XTherion is actually a Tcl script evaluated when XTherion starts The file is commented see the comments for details 80 Limitations e scrap size gt 2 8 x 2 8 m in the output scale METAPOST limit e page size gt PDF map or atlas 5 x 5 m pdfT X limit SVG map unlimited e scraps count gt approx 500 6000 depending on frequency of cross sections current METAPOST limit 4 scraps sections lt 4096 may be arbitrarily increased pdfTEX limit 2 x pages images patterns 6 scraps sections lt 32500 Example data Following simple example illustrates basic usage of Therion commands encoding utf 8 survey main title Test cave survey first centreline units compass grad data normal from to compass clino length 1 2 100 5 10 endcentreline endsurvey survey second declinat
70. layout which defines the landscape A4 layout without the navigator nor any texts There is only a map on the page Note the insertmaps macro Map pages are inserted at its position This is not done automatically because you may wish to insert some other pages before the first map page More advanced is the default definition of the dopage macro def dopage vbox centerline framed mapbox bigskip line vbox to ht navbox hbox size 20 the pagelabel ifpagenumbering space the pagenum fi space size 16 the pagename ifpagenumbering medskip hbox qquad qquad vtop hbox to Opt hss showpointer pointerN hss hbox to Opt llap showpointer pointerW hskip0O 7em raiselpt hbox to Opt hss updownarrow hss raiselpt hbox to Opt hss leftrightarrow hss rlap hskip0O 7em showpointer pointerE hbox to Opt hss showpointer pointerS hss qquad qquad vtop 67 QQ Qn Qn Qn nN N N N N N def arr uparrow showpointerlist pointerU def arr downarrow showpointerlist pointerD fi vss scalebar hss box navbox f Using other plain TEX macros or TFX primitives it s possible to add other features e g a different layout for odd and even pages headers and footers or adding a logo to each page In addition to map pages contains atlas additional items title page basic facts about the cave legend with used map symbols etc Therion automatical
71. le to process it may be inconvenient to use it In that case it s possible to add support for any 8 bit encoding for text input files Copy a translation file to the thchencdata directory add its name to ifiles hash in the beginning of the Perl script generate p1 run it and recompile Therion 76 The translation file should contain two hexadecimal values of a character first one in the 8 bit encoding second one in Unicode in each line Possible comments follow the character Adding new TRX encodings It s easy to add new encodings for 2D map output Copy an appropriate encoding mapping file with an enc extension to the texenc encodings run the Perl script mktexenc pl located in the texenc directory and compile Therion Therion uses the same encoding files as afm2tfm program from the T X distribution which has the same format as an encoding vector in a PostScript font You may find more details in the chapter 6 3 1 5 Encoding file format in the documentation to Dvips program Generating new TRX and METAPOST headers Therion uses TEX and METAPOST for 2D map visualization and typesetting Predefined macros are compiled into the Therion executable and are copied to the working directory just before running METAPOST and TRX unless the use extern libs option is used Layout command makes it possible to modify some macros in the configuration file at the run time However it s possible to make permanent c
72. ly generates list of used map symbols and lists of persons who have discovered surveyed and drawn selected part of the cave Following token registers may be used according to user s requirements before or after the insertmaps macro e explotitle topotitle cartotitle gt translated titles e exploteam topoteam cartoteam gt participating members according to team explo team options for centreline and author option of scraps e explodate topodate cartodate gt corresponding dates e comment P is set according to map comment option of the layout command e copyrights gt is set according to copyright options for surveys and other objects e cavename gt name of the exported map set according to title option of exported map e cavelength cavedepth gt approximate length and depth of displayed map e cavelengthtitle cavedepthtitle gt translated labels e cavemaxz caveminz gt altitude max min value e thversion gt current therion version e currentdate gt current date e outcscode outcsname gt output coordinat system code and name e northdir P true or grid 68 e magdecl gt magnetic declination in degrees e gridconv gt grid meridian convergence in degrees There is a macro atlastitlepages which combines most of the token registers men tioned above to get simple preformatted atlas introductory pages For legend displaying there are e iflegend gt conditional true
73. n label lt x label gt lt y label gt own pages lt number gt page grid lt on off gt legend lt on off all gt legend columns lt number gt legend width lt n gt lt units gt map comment lt string gt map header lt x gt lt y gt lt off n s e w ne nw se sw center gt map header bg lt on off gt map image lt x gt lt y gt lt n s e w ne nw se sw center gt lt filename gt statistics lt explo topo carto copyright all off number gt lt explo topo length on off gt scale bar lt length gt lt units gt survey level lt N all gt language lt xx _YY gt colour color lt item gt lt colour gt debug lt on all first second scrap names station names off gt doc author lt string gt doc keywords lt string gt doc subject lt string gt doc title lt string gt code lt metapost tex map tex atlas gt endcode endlayout Arguments lt id gt gt layout identifier to be used in the export command Command like options e copy lt source layout id gt gt set properties here that are not modified based on the given source layout map presentation related e scale lt picture length gt lt real length gt gt set scale of output map or map atlas M A default 1 200 50 e base scale lt picture length gt lt real length gt gt if set Therion will optically scale the map by a scale base scale factor This has the same effect as if the map printed in base scale would be photo red
74. nitsymbol a_water_UIS Special symbols There are currently two special symbols scale bar and north arrow Both are experi mental and subject to change 74 1 When a distinguished but elderly scientist states that something is possible he is almost certainly right When he states that something is impossible he is very probably wrong 2 The only way of discovering the limits of the possible is to venture a little way past them into the impossible 3 Any sufficiently advanced technology is indistinguishable from magic Arthur C Clarke 1973 Appendix Compilation If you want to compile Therion from source code and run it you need first three are required only during compilation e GNU C C compiler e GNU make e Perl e Tcl Tk 8 4 3 and newer http www tcl tk with BWidget widget set http sourceforge net projects tcllib and optionally tkImg extension http sourceforge net projects tkimg e TFX distribution with at least TEX with Plain format recent pdfT X and METAPOST http www tug org e LCDF Typetools package http www 1lcdf org type e ImageMagick distribution with convert and identify utilities if you want to use warping of survey sketches e ghostscript if you want to create calibrated images from georeferenced PDF maps To compile Loch you need e freetype 2 and newer freetype config must work e wxWidgets 2 6 and newer wx config must work e VTK 5 0 and newer e libjpe
75. nother survey sketch 88 This image after morphing Morphed sketch after extra points insertion And the morphed walls 89 Extended elevation control Assume following situation in plan view when there is a loop in centerline between stations 1 and 4 small chimney near station 5 and entrance to the cave is at station 6 By default centerline extended elevation of this situation looks like this 90 This is obviously not what we would like to get To control process of extended elevation there is a special extend option in centerline command First of all we would like to start our extended elevation at station 6 where the entrance is This can be done by specifying extend start 6 in the centerline Now it looks better but there is still a problem with a branch containing station 5 If we would like to start this branch from station 4 we need to forbid therion to extend station 5 from 1 This can be done by specifying extend ignore 1 5 This means that shot from 1 to 5 will be ignored when extended elevation is generated If we would like to extend branch starting with station 5 to the left we need to specify also 91 extend left 5 This will extend all stations from station 5 to the left As we have mentioned before there is a small chimney above station 5 In this case it is much more natural to draw this shot as vertical because it is a chimney To specify th
76. nt colours to see how Therion distorts map data See the description of scrap command for details The points with distance changed most during transformation are displayed orange If scrap names is specified scrap names are shown for each scrap station names displays name of each survey station survey level lt N al1 gt gt N is the number of survey levels displayed next to the station name M A default 0 PDF related doc author lt string gt gt set document author M A doc keywords lt string gt gt set document keywords M A doc subject lt string gt gt set document subject M A doc title lt string gt gt set document title M A customization code lt metapost tex map tex atlas gt gt Add redefine TFX and METAPOST macros here This allows user to configure various things like user defined symbols map and atlas layout at one place amp c See the chapter Changing layout for details 54 left margin size height page height paper height 50 K 74 Hipmanov d m a okolie 68 98 Trnavsk melafyre 73 75 132 JSV objav page width nt 80 EITE eee eee ee ee i Jee Rape ae ee a A ok Rep en SE Se ete a paper width e endcode gt should end the TeX and METAPOST sections setup3d Syntax e setup3d lt value gt Temporary hack to set sampling distance in meters when generating piecewise linear 3d 5 3 model from passage walls made o
77. ols north arrow scale bar symbol hide lt point line area group special gt lt symbol type gt gt don t display particular symbol or group of symbols You may use group cave centerline group surface centerline point cave station point surface station and group text in symbol hide and symbol show Ni commands Use flag lt entrance continuation sink spring doline dig gt as a lt symbol type gt to hide stations with particular flags e g symbol hide point flag entrance May be combined with symbol show M A 51 e symbol show lt point line area group special gt lt symbol type gt gt display partic ular symbol or group of symbols May be combined with symbol hide M A e symbol colo u r lt point line area group special gt lt symbol type gt lt colour gt gt change colour of particular symbol or group of symbols M A page layout related e size lt width gt lt height gt lt units gt gt set map size in the atlas mode If not specified it will be calculated from page setup and overlap In map mode applies iff page grid is on M A default 18 22 2 cm e overlap lt value gt lt units gt gt set overlap size in paper units in the atlas mode or map margin in the map mode M A default 1 cm e page setup lt dimensions gt lt units gt gt set page dimensions in this order paper width paper height page width page height left margin and top margin If not specified it will be com
78. on Hand editing of such files is not easy especially when you draw maps you need to think in spatial Cartesian coordinate terms Thus there is a special GUI for Therion called XTherion XTherion works as an advanced text editor map editor where maps are drawn fully interactively and compiler which runs Therion on the data It may look quite complicated but this approach has a lot of advantages e There is strict separation of data and visualization The data files specify only what is where not what it looks like The visual representation is added by METAPOST in later phases of data processing It s very similar concept to XML data representation This makes it possible to change map symbols used without changing the input data or merge more maps created by different persons in different styles into one map with unified map symbols set 2D maps are adapted for particular output scale level of abstraction non linear scaling of symbols and texts All data are relative to survey station positions If the coordinates of survey stations are changed in the process of loop closure then all relevant data is moved correspondingly so the map is always up to date e Therion is not dependent on particular operating system character encoding or input files editor input files will remain human readable e It s possible to add new output formats e 3D model is generated from 2D maps to get a realistic 3D model without entering
79. ontal vertical line segment If all line points have this option they are aligned to the average y or x coordinate respectively This option is not allowed in the plan projection e place lt bottom default top gt gt changes displaying order in the map e clip lt on off gt gt specify whether a symbol is clipped by the scrap border e visibility lt on off gt gt displays hides the symbol e context lt point line area gt lt symbol type gt gt to be used with symbol hide and symbol show layout options symbol will be hidden shown according to rules for spec ified lt symbol type gt Type specific options e altitude lt value gt gt can be specified only with the wall type This option creates an altitude label on the wall All altitudes are exported as a difference against grid Z origin which is 0 by default If the value is specified it gives the altitude difference of the point on the wall relative to the nearest station The value can be prefixed by a keyword fix then no nearest station is taken into consideration the absolute given value is used instead Units can follow the value Examples 4 4 m fix 1510 m e border lt on off gt gt this option can be specified only with the slope symbol type It switches on off the border line of the slope 28 e direction lt begin end both none point gt gt can be used only with the section type It indicates where to put a direction arrow on the s
80. orphing Future Although Therion is already used for map production there are a lot of new features to be implemented General e loop closure information in SQL 2D maps e complete the predefined symbol sets e generate registers for atlas e use MPlib instead of METAPOST 3D models e improve passage walls modeling XTherion e improve 2D editing capabilities Loch e colour schemes e survey tree for selecting sub surveys to display e spatial filtering e g clipping by planes e support for multiple surfaces Labyrinth e completely new GUI in the far future see http labyrinth speleo sk 84 There is no royal road to geometry Euclid 3rd century BC There is no royal road but there is a road Frederick P Brooks 1987 Case studies This chapter is automatically generated from the samples directory in the Therion source code Drawing maps in therion Rabbit Cave plan Length 76m Depth 5m Surveyed by Martin Budaj Miroslav Hofer Stacho Mudr k 1997 Rabbit Cave extended elevation 10m Length 76m Depth 5m Surveyed by Martin Budaj Miroslav Hofer Stacho Mudr k 1997 Listing caves When surveying caves in some large area you often need to generate an up to date list of all caves in that area In therion dataset cave can be defined in several ways depending on the level of cave survey If you have just surveyed entrance station e g using GPS or s
81. ot stations is named either or the shot has splay attribute set Dot should be used for shots ending on features inside passage dash for shots ending on passage walls floor or ceiling Although Therion makes no distinction between them yet it should be used to improve 3D modeling in the future group endgroup gt group endgroup pair enables the user to make temporary changes in almost any setting calibrate units sd data flags walls lt auto on off gt gt turn on off passage shape generation from LRUD data for subsequent shots If set auto passage is generated only if there is no scrap referencing given centreline vthreshold lt number gt lt units gt gt threshold for interpreting LRUD readings as left right front back reading perpendicular to the shot If passeges are horizontal inclination lt vthreshold LR is perpendicular to the shot and UD is vertical If passages are more or less vertical inclination gt vthreshold even UD becomes perpendicular to the shot otherwise passages would not look very good In the case of vertical shots UD is interpreted as north south dimension from the station to allow tube like modelling of verticals 4 dimension may be specified as a pair lt from gt lt to gt meaning the size at the beginning and end of the shot 20 e extend lt spec gt lt station gt lt station gt gt control how the centerline is extended lt spec gt is one of
82. page numbering A default 0 page grid lt on off gt p gt show pages key plan M default off map legend related map header lt x gt lt y gt lt off n s e w ne nw se sw center gt gt print map header at location specified by lt x gt lt y gt Predefined map header contains some basic information about cave name scale north arrow list of surveyors etc It is fully customizable see the chapter Changing layout for details lt x gt is easting left right on page lt y gt is northing up down page Ranges for lt x gt and lt y gt are 100 200 Lower left corner of the map is 0 0 upper right corner is 100 100 The header is aligned with the specified corner or side to this anchor point M default 0 100 nw map header bg lt on off gt gt when on background of map header is filled with back ground color e g to hide map grid M default off map image lt x gt lt y gt lt n s e w ne nw se sw center gt lt filename gt gt include image specified by lt filename gt into map at location specified by lt x gt lt y gt For coordinates and alignment details see map header specification legend width lt n gt lt units gt gt legend width M A default 14 cm legend lt on off all gt gt display list of used map symbols in the map header If set to all all symbols from the current symbol set are displayed M A default off colo u r legend lt on off gt gt turn on off legend of map fg colou
83. ported input Description inserts the contents of a file in place of the command Default extension is th and may be omitted For greatest portability use relative paths and Unix slashes not Windows backslashes as directory separators Syntax input lt file name gt Contect all 15 Arguments e lt file name gt survey Description Survey is the main data structure Surveys may be nested this allows a hierarchical structure to be built Usually some level of this hierarchical structure survey represents caves higher levels karst areas and lower levels e g passages Each survey has its own namespace specified by its lt id gt argument Objects like survey stations or scraps see below which belong to a subsurvey of the current survey are referenced as lt object id gt lt subsurvey id gt or if there are more nesting levels lt object id gt lt subsubsurvey id gt lt subsurvey id gt This means that object identifiers must be unique only in the scope of one survey For instance survey stations names can be the same if they are in different surveys This allows stations to be numbered from 0 in each survey or the joining of two caves into one cave system without renaming survey stations Syntax survey lt id gt OPTIONS other therion objects endsurvey lt id gt Context none survey Arguments e lt id gt gt survey identifier Options e namespace lt
84. puted from size and overlap A default 21 29 7 20 28 7 0 5 0 5 cm e page numbers lt on off gt gt turn on off page numbering A default true e exclude pages lt on off gt lt list gt p gt exclude specified pages from cave atlas The list may contain page numbers separated by a comma or dash for intervals e g 2 4 7 9 23 means that pages 2 4 5 6 7 9 and 23 should be omitted Only the map pages should be counted Set own pages 0 and title pages off to get the correct page numbers to be excluded Changes of own pages or title pages options don t affect page excluding A e title pages lt on off gt gt turn on off title pages before each atlas chapter A default off e nav factor lt factor gt gt set atlas navigator zoom factor A default 30 e nav size lt x size gt lt y size gt gt set number of atlas pages in both directions of navi gator A default 2 2 e transparency lt on off gt gt set transparency for the passages underlying passages are also visible M A default on e opacity lt value gt gt set opacity value used if transparency is on Value range is 0 100 M A default 70 e surface opacity lt value gt gt set the surface bitmap opacity used if transparency is on Value range is 0 100 M A default 70 e surface lt top bottom off gt gt set the position of the surface bitmap above below the map M A default off e sketches lt on off gt gt turn on off di
85. rade lt id gt lt quantity list gt lt value gt lt units gt endgrade Context all revise Description This command is used to set or change properties of an already existing object Syntax The syntax of this command for object created with single line command is 37 only with 3d files where survey structure is specified 33 revise id option1 valuel option2 value2 For objects created with multi line commands is syntax following revise id option1 valuel option2 value2 optionX valueX data endrevise Context all Arguments The id stands for object identifier the id of an object you want to revise must always be specified Custom attributes Objects survey centreline scrap point line area map and surface can contain user defined attributes in a form attr lt name gt lt value gt lt name gt may contain alphanumeric characters lt value gt is a string The custom attributes are used in map export depending on output format e in shapefile export they are written directly to the associated dbf file e in maps generated using METAPOST PDF SVG the attributes are written in the METAPOST source file as strings named like ATTR_ lt name gt and can be evaluated and used by user in symbols definition macros You can test presence of such a variable using if known ATTR_ lt name gt fi XTherion XTherion is a GUI Graphical User Interface for Therion I
86. rs when map fg is set to altitude scrap or map M A 53 r N legend columns lt number gt gt adjusts the number of legend columns M A default 2 map comment lt string gt gt optional comment displayed at the map header M statistics lt explo topo carto copyright all off number gt or statistics lt explo topo length on hide off gt gt display some basic statistics if set to off team members are sorted alphabetically otherwise according to their con tribution to exploration and surveying M A default off scale bar lt length gt lt units gt gt set the length of the scale bar M A language lt xx _YY gt gt set output language Available languages are listed on the copyright page See the Appendix if you want to add or customize translations M A colo u r lt item gt lt colour gt gt customize colour for special map items map fg map bg preview above preview below label Colour range is 0 100 for grayscale 0 100 0 100 0 100 triplet for RGB colours For map fg you can use altitude scrap or map as colours In this case the map is coloured according to altitude scraps or maps For map bg you can use transparent to omit page background completely For labels you can switch colour on off If on labels are coloured using the colour of associated scrap debug lt on all first second scrap names station names off gt gt draw scrap in different stages of transformation in differe
87. sent a cave also This information is used for cave list export centreline Description Survey data centreline specification The syntax is borrowed from Survex with minor modifications the Survex manual may be useful as an additional reference for the user A synonym term centerline may be used Syntax centreline OPTIONS date lt date gt team lt person gt lt roles gt explo date lt date gt explo team lt person gt instrument lt quantity list gt lt description gt calibrate lt quantity list gt lt zero error gt lt scale gt units lt quantity list gt lt factor gt lt units gt sd lt quantity list gt lt value gt lt units gt grade lt grade list gt declination lt value gt lt units gt grid angle lt value gt lt units gt infer lt what gt lt on off gt mark lt type gt flags lt shot flags gt station lt station gt lt comment gt lt flags gt cs lt coordinate system gt fix lt station gt lt x gt lt y gt lt z gt lt std x gt lt std y gt lt std z gt equate lt station list gt data lt style gt lt readings order gt break group endgroup walls lt auto on off gt 17 vthreshold lt number gt lt units gt extend lt spec gt lt station gt lt station gt station names lt prefix gt lt suffix gt SURVEY DATA endcentreline Context none survey Options e id lt ext_keyword gt gt id of the object e author lt date gt lt person gt gt
88. set Ordering of symbols inside of each group follows the order of commands in the input file symbols which come first are drawn last i e they are displayed at the top of each group Now we are ready to describe how the map or atlas chapter is constructed e map area is filled with color map bg e surface bitmaps are displayed if surface is set bottom e FOR each scrap outline is filled white e grid is displayed if grid is set bottom e preview below is filled with color preview below e FOR each level BEGIN of transparency FOR each scrap outline is filled with color map fg FOR each scrap area symbols are filled and clipped to scrap boundary END of transparency BEGIN of clipping by text labels for all labels in this and upper levels FOR each scrap draw all symbols to be clipped with the exception of line survey ordered from bottom to top draw line survey symbols clip to scrap boundary FOR each scrap 51 Or File commands menu in XTherion 52 As specified using the preview option in the map command 53 Level is a collection of scraps not separated by a break in the map command 44 draw all symbols not to be clipped with the exception of point station and all labels ordered from bottom to top draw point station symbols END of clipping by text labels FOR each scrap draw all point and line labels including wall altitude e preview above is drawn with color preview above e surface bitmaps are displayed if surface
89. sion of the cave into scraps Scrap is the basic building block of the map It s almost always a bad idea to try to fit each scrap to corre sponding th file with centreline from one survey trip The reason is that connections between scraps should be as simple as possible Scraps in general are independent on centreline hierarchy so try to forget the survey hierarchy when drawing maps and choose best scrap joins We usually insert maps in the last but one level in survey hierarchy Each scrap may than contain arbitrary part of any survey in the last level of hierarchy For example there is a survey main which contains surveys a b c and d Surveys a d contain centreline data from four survey trips and each of them is in a separate file There is a map main_map which contains scraps s1 and s2 If the main_map is located in the main survey scrap s1 may cover part of the centreline from survey a complete survey b and part of c s2 will cover part of the a and c surveys and a complete d survey The survey stations names will be referenced using symbol e g 1 a in the scraps Scraps are usually stored in th2 files Each file may contain more scraps To keep data well organized we have some naming conventions in the file foo th2 all scraps are named foo_si where i is 1 2 an so on Cross sections are named foo_ci lines foo_li etc This helps a lot with large cave systems if some scrap is referenced you immediately know in which
90. specification of the input format for survey data or splitting large maps to multiple sheets e 2000 Jan xthedit Tcl Tk a graphical front end for Therion Feb 18 start of reprogramming Perl Apr 1 first hyperlinked PDF cave map atlas Aug experiments with PDF pdfT X and METAPOST e 2001 Nov start of reimplementation from scratch Therion C with some Perl scripts inherited from the previous version notion of a scrap interactive 2D map editor ThEdit as a replacement of xthedit Delphi Dec ThEdit exports simple map for the first time e 2002 Mar Therion 0 1 Therion is able to process survey data centreline of the Cave of Dead Bats XTherion text editor designed for Therion Tcl Tk Jul 27 Therion 0 2 Therion compiles simple map consisting of two scraps for the first time 800 kB of source code Aug XTherion extended to 2D map editor as a replacement of ThEdit Sep Therion compiles first real and complex map of a cave XTherion extended to compiler e 2003 Mar First version of The Therion Book finished Apr Therion included in Debian GNU Linux Jun all Perl scripts rewritten in C Therion is one executable program now al though using Survex and TFX e 2004 Mar Therion 0 3 Therion exports 3D model created from 2D maps Loop closure algorithm included into Therion e 2006 83 Oct Therion 0 4 New 3D viewer Loch e 2007 Feb Therion 0 5 Support for bitmap sketches m
91. speleo sk Therion is distributed under the GNU General Public License Why Therion In the 1990s we ve done a lot of caving and cave surveying Some computer programs existed which displayed survey shots and stations after loop closure and error elimination These were a great help especially for large and complicated cave systems We used the output of one of them TJIKPR as a background layer with survey stations for hand drawn maps After finishing a huge 166 page Atlas of the Cave of Dead Bats in early 1997 we soon had a problem we found new passages connecting between known passages and surveyed them After processing in TJIKPR the new loops influenced the position of the old surveys most survey stations now had a slightly different position from before due to the changed error distribution So we could either draw the whole Atlas again or accept that the location of some places was not accurate in the case of loops with a length of approximately 1km there were sometimes errors of about 10m and try to distort the new passages to fit to old ones These problems remained when we tried to draw maps using some CAD programs in 1998 and 1999 It was always hard to add new surveys without adapting the old ones to the newly calculated positions of survey stations in the whole cave We found no program that was able to draw an up to date complex map i e not just survey shots with LRUD envelope in which the old parts are modified a
92. splaying of morphed sketch bitmaps M A de fault off 55 Note colour change currently applies to pattern fills only if 1 output format is PDF and 2 META POST version is at least 1 000 52 ea layers lt on off gt gt enable disable PDF 1 5 layers M A default on grid lt off bottom top gt gt enable disable grid optionally coordinates values may be also displayed M A default off cs lt coordinate system gt gt coordinate system for origin and grid origin north lt true grid gt gt specify default orientation of the map By default true astro nomical north is used It is ignored when used with local coordinate system grid origin lt x gt lt y gt lt x gt lt units gt gt set coordinates of grid origin M A grid size lt x gt lt y gt lt z gt lt units gt gt set grid size in real units M A default is equal to scalebar size grid coords lt off border all gt gt specify where to label grid with coordinates M A default off origin lt x gt lt y gt lt z gt lt units gt gt set origin of atlas pages M A origin label lt x label gt lt y label gt gt set label for atlas page which has the lower left corner at the given origin coordinates May be either a number or a character M A default 0 0 own pages lt number gt gt set number of own pages added before the first page of auto matically generated pages in atlas mode currently required for correct
93. ssage like pit etc see below for details 1 Height of the passage see below for details 2 If no text is specified the name of the nearest station is used 3 Unlike other point symbols these are clipped by the scrap border See the chapter How the map is put together 4 Always use spring and sink symbols with a water flow arrow 5 Number of ticks is set according to scale option 6 Virtual point used to indicate connection between shifted maps extended elevation map offset 7 Additional morphing point 8 For user defined point symbols 9 if station subtype is not specified Therion reads it from centreline if it s specified there 20 E g station fixed 24 orientation orient lt number gt gt defines the orientation of the symbol If not speci fied it s oriented to north 0 lt number lt 360 align gt alignment of the symbol or text The following values are accepted center c top t bottom b left 1 right r top left tl top right tr bottom left bl bottom right br scale gt symbol scale can be tiny xs small s normal m large 1 huge xl Normal is default place lt bottom default top gt gt changes displaying order in the map clip lt on off gt gt specify whether a symbol is clipped by the scrap border You cannot specify this option for the following symbols station station name label remark date altitude height passage height dist lt distance gt gt val
94. string gt a sequence of any characters Strings may contain special tag lt lang XX gt to separate translations In multilingual strings only the text between lt lang XX gt where XX is the language selected in initialization or configuration file and the next lt lang YY gt tag is displayed on the output If no match is found everything before any occurence of lt lang ZZ gt tag is displayed e units gt length units supported meter s centimeter s inch es feet s yard s also m cm in ft yd Angle units supported degree s minute s also deg min grad s mil s percent age clino only A degree value may be entered in decimal notation x y or in a special notation for degrees minutes and seconds deg min sec 13 N ON oN Coordinate systems Therion supports coordinate transformations in geodetic coordinate systems You can specify cs option in centreline surface import and layout objects and then enter XY data in given system You can also specify output cs in configuration file If you do not specify any cs in your dataset it is assumed you are working in local coordinate system and no conversions are done If you specify cs anywhere in the data you have to specify it for all location data fix origin in layout etc cs applies to all subsequent location data until other cs is specified or until the end of the current object whichever comes first Following coordinate systems are support
95. t If you draw some scraps with none projection it s necessary to calibrate the drawing area The scale can be defined only one way in X Therion using coordinates of two points specified both in the picture coordinate system and in the real coordinate system After selecting a scrap click on its header in the File commands menu two small red squares connected by red arrow will appear by default they ll be in the lower corners 43 CAUTION The command text is not a Therion command It s only a nickname for a block of an arbitrary text in XTherion In the file saved by XTherion there ll only be whatever you type into the Text editor or see in the Command preview It may be an area definition or whatever you want such as a comment beginning with a character 37 of drawing area You have to drag them to points with known coordinates usually intersections of mm grid lines on the scanned drawing If you can not see these points you can either e press Scale button in the Scraps menu and click on two different places on the image where the endpoints of calibration arrow should be or e move mouse pointer to desired position read pointer coordinates from the status bar and enter these coordinates into picture scale points boxes in the Scraps control After filling X1 Y1 and X2 Y2 coordinate pairs the calibration arrow will be moved corre spondingly Then you have to enter real coordinates of these points X1
96. t helps a lot with creating input data files Currently it works in three main modes text editor map editor and compiler It is not necessary for Therion itself you may edit input files in your favourite text editor and run Therion from the command line XTherion is also not the only GUI which may be used with Therion It is possible to write a better one which would be more user friendly more WYSIWYG faster more robust and easier to use Any volunteers 38 Here we re concerned with creating data so only the two first modes are described in this section For compiler features see the chapter Processing data 34 This manual does not describe such familiar things as if you want to save a file go to menu File and select Save or press Ctrl s Browse the top menu for a minute to get feeling of XTherion For each mode of operation there is an additional right or left menu The submenus may be packed you may unpack them by clicking on the menu button For most of the menus and buttons there is a short translated description in the status line so it s not hard to guess the meaning of each one The order of submenus on the side may be customized by the user Right click on the menu button and select in the menu which of the other menus it should be swapped with XTherion text editor XTherion s text editor offers some interesting features which may help with creating text input files support for Unicode enco
97. t of caves when set off Otherwise survey structure with aggregated ststistics is also displayed 56 SVG embedded in XHTML file which contains also legend 57 ESRI shapefiles Multiple files are written to a directory with the specified filename 58 Xtherion vector image XVI images may be used in xtherion to draw in scale maps Scale 100 DPI image resolution is assumed and grid size from layout are used in export 59 Text file containing geographic coordinates of lower left and upper right corners of the map area 60 For cave list and continuation list 57 Kezi database e format fmt lt format gt gt currently only sql e encoding enc lt encoding gt gt set output encoding File formats summary export type available formats model loch dxf esri compass survex vrml 3dmf kml 5 8 map pdf svg xhtml dxf esri survex xvi kml bbox atlas pdf database sql lists html txt kml dbf Running Therion Now after mastering data and configuration files we re ready to run Therion Usually this is done from the command line in the data directory by typing therion The full syntax is therion q L 1 lt log file gt s lt source file gt p lt search path gt d x use extern libs lt cfg file gt or therion h help v version print encodings print tex encodings print init file print environment print symbols Arguments lt cfg file gt Therion takes onl
98. t processed in applications like pdfT X or Adobe Acrobat it s possible to extract or change some pages add comments or encryption etc If the map was produced using georeferenced data then it also contains georeferencing information This can be extracted by XTherion to produce georeferenced raster images see X Therion Additional tools for details Maps for GIS Maps produced in DXF ESRI or KML formats may be further processed in appropriate software These maps do not contain visualized map symbols Special purpose maps Map in XVI format contains centreline with LRUD and optionally morphed sketches and can be imported in XTherion to serve as a background for digitization Map in Survex format is intended for a quick preview in Aven 3D models Therion may export 3D model in various formats besides its native format These may be loaded in appropriate viewing editing or raytracing programs to be printed or further processed If the format doesn t support arbitrary passage shape definition only the centreline is included Loch Loch is a 3D model viewer included in the Therion distribution It supports e g high resolution rendering to file and stereo view using 3D glasses 63 Ko 0 9 Give ar E TPAVDEAYANGJTOT TENA EN COTIMPEAVDYNAP po SXNITTTTPG Jesus said Let him who seeks continue seeking until he finds When he finds he will become troubled When he becomes troubled he will be astonis
99. t to on default OpenType fonts used in pdf fonts are converted to PFB fonts if they are PostScript based Some information is lost in the PFB format but there is advantage that pdfT X can embed subset of PFB fonts in contrast with OpenType fonts which must be fully embedded e tex fonts lt encoding gt lt rm gt lt it gt lt bf gt lt ss gt lt si gt Original and more complicated way to set up fonts for PDF maps You need to explic itly specify encoding maximum 256 characters from the font that will be used The list of currently supported encodings gives the print tex encodings command line option The same encoding must be used while generating TFX metrics tfm files for those fonts e g with the afm2tfm program and this encoding must be explicitly given also in the pdfT X s map file The only exception is the base set of Computer Modern fonts which use raw encoding This encoding doesn t need to be specified in the pdfT X s map file Encoding has to be followed by five font specifications for regular italic bold sans serif and sans serif oblique styles Default setting is tex fonts raw cmri0 cmti10 cmbx10 cmssi0 cmssil0 Example how to use other fonts e g TrueType Palatino in xl2 an encoding derived from ISO8859 2 encoding Run ttf2afm e xl2 enc o palatino afm palatino ttf afm2tfm palatino afm u v vpalatino T xl2 enc vptovf vpalatino vpl vpalatino vf vpalatino tfm You get files vpa
100. tandard surveying meth ods all you need to do is to assign entrance flag using 85 station cave 1 Unsurveyed cave entrance If there is some explored passage behind this entrance but you did not survey it properly you should add also continuation flag and explored flag followed by explored length Explored but unsurveyed passage lengths are also part of summary statistics station cave 2 Unsurveyed but explored entrance continuation explored 80m If you have properly surveyed some cave its data are usually in some survey structure Survey becomes a cave if it has main entrance station specified using entrance option Example survey small_cave title Tunnel cave entrance 0 If survey contains survey data but it has no main entrance specified it is not considered as a cave just as data organization unit and thus not present in the cave list Only surveys containing some caves i e entrance stations or surveys with main entrance defined are present in the final cave list table After caves in your data have been properly defined you can generate table using export cave list o caves html Resulting table looks like this Length Depth Explored Altitude Tunnel cave Unsurveyed cave Unsurveyed but explored 86 Area symbols Therion area types a E 5 a pebbles flowstone snow ing Sketch morph Original survey sketch 87 Image after morphing Walls after morphing A
101. te gt lt person gt gt author of the data and its creation date copyright lt date gt lt string gt gt copyright date and name title lt string gt gt description of the object point Description Point is a command for drawing a point map symbol Syntax point lt x gt lt y gt lt type gt OPTIONS Context scrap Arguments lt x gt and lt y gt are the drawing coordinates of an object lt type gt determines the type of an object The following types are supported special objects station section dimensions Tf there are some survey stations in the scrap the cs specification is ignored 6 Survey station For each scrap with the exception of scraps in none projection at least one station with station reference name option has to be specified T section is an anchor for placing the cross section at this point This symbol has no visual repre sentation The cross section must be in the separate scrap with none projection specified You can specify it through the scrap option 8 Use value option to specify passage dimensions above below centerline plane used while creating 3D model 23 Nn N Kezi N Keri N labels label remark altitude height passage height station name date symbolic passage fills bedrock sand raft clay pebbles debris blocks water ice guano Snow speleothems flowstone moonmilk stalactite stalagmite p
102. ted from other program needs to be flipped 36 You need to enter elevation data in order to display the topographical map in 3D model Currently only JPEG maps are supported in 3D 32 import Description Reads survey data in different formats currently processed centreline in 3d plt xyz formats Survey stations may be referenced in scraps etc When importing Survex 3D file stations are inserted in survey hierarchy if there exists identical hierarchy to that in 3D file Syntaz import lt file name gt OPTIONS Context survey all Options e filter lt prefix gt gt if specified only stations with given prefix and shots between them will be imported Prefix will be removed from station names e surveys create use ignore gt specifies how to import survey structure works only with 3d files create P split stations into subsurveys if subsurveys do not exist create them use gt split stations into existing subsurveys ignore gt do not split stations into sub surveys e cs lt coordinate system gt gt coordinate system for stations with fixed coordinates e calibrate lt x gt lt y gt lt z gt lt X gt lt Y gt lt Z gt gt coordinates in the imported file are shifted from lower case coordinates to upper case coordinates grade Description This command is used to store predefined precisions of centreline data See sd option description for centreline command Syntax g
103. the following normal reverse gt extend given and following stations to the same reverse direction as previous station If two stations are given direction is applied only to given shot left right gt same as above but direction is specified explicitly vertical gt do not move station shot in X direction use only Z component of the shot start gt specify starting station shot ignore gt ignore specified station shot continue extended elevation with other station shot if possible hide gt do not show specified station shot in extended elevation If no stations are specified lt spec gt is valid for following shots specified e station names lt prefix gt lt suffix gt gt adds given prefix suffix to all survey stations in the current centreline Saves some typing scrap Description Scrap is a piece of 2D map which doesn t contain overlapping passages i e all the passages may be drawn on the paper without overlapping For small and simple caves the whole cave may belong to one scrap In complicated systems a scrap is usually one chamber or one passage Ideally a scrap contains about 100 m of the cave Each scrap is processed separately by METAPOST scraps which are too large may exceed METAPOST s memory and cause errors Scrap consists of point line and area map symbols See chapter How the map is put together for explanation how and in which order are they displayed Scrap border consists
104. tinuation attr Code V explored 20m When you export map and use symbol show point flag continuation in your layout station with continuation flag specified is marked by question mark con tinuation symbol is shown above the station r You may redefine continuation symbol to show also continuation description stored in _text attribute using following layout code 101 code metapost def p_continuation expr pos theta sc al draw default continuation symbol p_continuation_UIS pos theta sc al if text attribute is set if known ATTR__text and picture ATTR__text set labeling color to light orange push_label_fill_color 1 0 0 9 0 8 draw filled label with text next to p_label urt ATTR__text 5u 25u transformed T 0 0 8 restore original labeling color pop_label_fill_color fi enddef endcode Then also continuation description is displayed in the map a pit Question marks in maps In the scrap th2 file you can use text code and explored options to continuation symbol 102 point 796 0 676 0 continuation attr Code A explored 50m text water too cold to continue survey In the map also the question marks only are displayed by default When you redefine continuation symbol as mentioned above you can show also continu ation codes and descriptions water too cold to continue survey Exporting question mark lists You may also export a list of all continu
105. too much data e although the support for WYSIWYG is limited you get what you want Software requirements A program should do one thing and do it well Ken Thompson Therefore we use some valuable external programs which are related to the problems of typesetting and data visualization Therion can then do its task much better than if it was a standalone application in which you could calibrate your printer or scanner and with one click send e mail with your data Therion needs e TEX distribution Necessary only if you want to create 2D maps in PDF or SVG format e Tcl Tk with BWidget and optionally tkImg extension It is only required for XTherion e LCDF Typetools if you want to use easy setup for custom fonts in PDF maps e convert and identify utilities from ImageMagick distribution if you want to use warping of survey sketches e ghostscript if you want to create calibrated images from georeferenced PDF maps Windows installer includes all required packages with the exception of ghostscript Read the Appendix if you want to compile Therion yourself For displaying of maps and models you may use any of the following programs e any PDF or SVG viewer displaying 2D maps e any GIS supporting DXF or shapefile formats for analyzing the maps e appropriate 3D viewer for models exported in other than default format e any SQL database client to process exported database Installation Installation from sources therion
106. ts txt file layout Description Specifies layout for 2D maps Settings which apply to atlas mode are marked A map mode M Syntax layout lt id gt OPTIONS copy lt source layout id gt cs lt coordinate system gt north lt true grid gt scale lt picture length gt lt real length gt base scale lt picture length gt lt real length gt units lt metric imperial gt rotate lt number gt symbol set lt symbol set gt symbol assign lt point line area group special gt lt symbol type gt lt symbol set gt symbol hide lt point line area group special gt lt symbol type gt symbol show lt point line area group special gt lt symbol type gt symbol colour lt point line area group special gt lt symbol type gt lt colour gt size lt width gt lt height gt lt units gt overlap lt value gt lt units gt page setup lt dimensions gt lt units gt page numbers lt on off gt exclude pages lt on off gt lt list gt title pages lt on off gt nav factor lt factor gt nav size lt x size gt lt y size gt transparency lt on off gt opacity lt value gt surface lt top bottom off gt surface opacity lt value gt 49 sketches lt on off gt layers lt on off gt grid lt off top bottom gt grid origin lt x gt lt y gt lt x gt lt units gt grid size lt x gt lt y gt lt z gt lt units gt grid coords lt off border all gt origin lt x gt lt y gt lt z gt lt units gt origi
107. u selected at the beginning Deleting line point e select the point you want to delete press Edit line Delete point in the Line control panel Splitting line e select the point at which you want to split the line press Edit line Split line in the Line control panel Inserting point e Ctrl P gt switch to insert point mode e LeftClick gt insert point at given position e Ctrl LeftClick gt insert point very close to existing point normally it will be inserted right above the closest point e Esc gt escape from the inset point mode Editing point e LeftClick drag gt move point e Ctrl LeftClick drag gt move point close to the existing point normally it is moved right above closest existing point e LeftClick drag on point arrows gt change point orientation or sizes according to given switches in Point control panel 40 Inserting area e press Ctrl A or File commands Insert area to switch to the insert area border mode e RightClick on the lines that surround desired area e Esc to finish area border lines insertion Editing area e select area you want to edit e pres Insert in the Area control to insert other border lines at current cursor position e pres Insert ID to insert border with given ID at current cursor position e pres Delete to remove selected area border line Selecting an existing object e LeftClick gt select object on the top e Right
108. uced to the scale M A e rotate lt value gt gt rotates the map M A default 0 e units lt metric imperial gt gt set output units M A default metric e symbol set lt symbol set gt gt use symbol set for all map symbols if available Be aware that symbol set name is case sensitive M A Therion uses following predefined symbol sets UIS International Union of Speleology ASF Australian Speleological Federation AUT Austrian Speleological Association CCNP Carlsbad Caverns National Park NZSS New Zealand Symbol Set SKBB Speleoklub Bansk Bystrica NN N r N e symbol assign lt point line area group special gt lt symbol type gt lt symbol set gt gt display a particular symbol in the given symbol set This option overrides symbol set option If the symbol has a subtype lt symbol type gt argument may have one of the following forms type subtype or simply type which assigns new symbol set to all subtypes of a given symbol Following symbols may not be used with this option point section which isn t rendered at all and all point and line labels label remark altitude height passage height station name date See the chapter Changing layout Customizing text labels for details how to change labels appearance M A Group may be one of the following all centerline sections water speleothems oq NO passage fills ice sediments equipment N There are two special symb
109. ue read value zero error x scale The supported quantities are the same as sd e break gt can be used with interleaved data to separate two traverses e mark lt station list gt lt type gt gt set the type of named stations lt type gt is one of fixed painted and temporary default If there is no station list all subsequent stations are marked e flags lt shot flags gt gt set flags for following shots The supported flags are surface for surface measurements duplicate for duplicated surveys splay for short side legs that are hidden in maps and models by default These are excluded from length calculations All shots having one of the stations named either or are splay shots by default see also data command If flag is set to approx imate it is included to total length calculations but also displayed separately in survey statistics It should be used for shots that were not surveyed properly and need to be resurveyed Also not is allowed before a flag e station lt station gt lt comment gt lt flags gt gt set the station comment and its flags If is specified as a comment it is ignored Supported flags entrance continuation air draught winter summer sink spring doline dig arch overhang Also not is allowed before a flag to remove previously added flag You can also specify custom attributes to the station using attr flag followed by attribute name and
110. uld be created tmp remove lt 0S command gt System command to delete files from the temporary directory tex env lt on off gt Works on Windows only When set to off default Therion temporarily clears all environment variables related to T X Useful if there is other TRXdistribution installed on your system which had set up any environment variables which could confuse TEX and METAPOST programs supplied in Therion for Windows distribution Set to on if you use other TEX distribution for maps processing text lt language ID gt lt therion text gt lt my text gt Using this option you can change any default therion text translation in output For list of therion texts and available translations see thlang texts txt file cs def lt id gt lt proj4def gt Define a new coordinate system lt id gt using Proj4 syntax pdf fonts lt rm gt lt it gt lt bf gt lt ss gt lt si gt Set up fonts to be used in PDF maps The command has to be followed by paths specifying where regular italic bold sans serif and sans serif oblique fonts are located in your system TrueType and OpenType fonts are supported Therion requires LCDF Typetools to be installed on your system to use this command Example pdf fonts usr share fonts Serif ttf usr share fonts Serif Italic ttf usr share fonts Serif Bold ttf usr share fonts Sans ttf usr share fonts Sans Oblique ttf otf2pfb lt on off gt 79 NN When se
111. ve Joining arrows are created from map connection points specified in scraps that are moved Otherwise these points are ignored If the situation is more complicated e g there is m3 below m2 you need to create more complicated map structure to handle this map m23 m2 break m3 8 0 m below endmap map m123 mi break m23 0 8 m below 95 endmap Then m128 looks like this Importing survex 3d files Therion surveys nearly correspond to station prefixes defined by begin end pairs in survex source files Usually there does not exist one to one mapping between them So if you want to keep your centerline in survex files you need to solve the problem how to match survex and therion data structures This sample shows three different ways how to deal with station prefixes when importing survex 3d files to therion Using surveys specified in th files If you will import 3d file with surveys use switch then therion tries to find the match between survex prefix and therion survey name If this match is found stations are inserted into survey found Otherwise prefix is left with station names Example code import use 3d surveys use input use out th2 survey use input use in th2 endsurvey In this case you should take care where you input your th2 files containing scraps In use out th2 file you should refer to station names using point 165 744 176 58 station name 2 use but in the use in th file using
112. w and the corresponding label 22 For SVG output only lt br gt lt thsp gt lt it gt lt bf gt lt rm gt and lt lang XX gt keywords are taken into account all others are silently ignored 25 lt br gt gt line break lt center gt lt centre gt lt left gt lt right gt gt line alignment for multi line labels Ignored if there is no lt br gt tag lt thsp gt gt thin space lt rm gt lt it gt lt bf gt lt ss gt lt si gt gt font switches lt rtl gt and lt rt1 gt gt marks beginning and end of a right to left written text lt lang XX gt gt creates multilingual label see string type for detailed description value gt value of height passage height or altitude label or point dimensions height according to the sign of the value positive negative or unsigned this type of symbol represents chimney height pit depth or step height in general The numeric value can be optionally followed by if the value is presumed and units can be added e g value 40 ft passage height the following four forms of value are supported lt number gt the height of the ceiling lt number gt the depth of the floor or water depth lt number gt the dis tance between floor and ceiling and lt number gt lt number gt the distance to ceiling and distance to floor altitude the value specified is the altitude difference from the nearest station If the altitude value is prefixe
113. wpointerlist should be used without redefinition in the place where you want to display the content of its argument for custom data formatting redefine pro cesspointeritem macro e processpointeritem has three arguments page name page number destination and visualizes these data The arguments are delimited as follows def processpointeritem 1 2 3 endarg An example definition may be def processpointeritem 1 2 3 endarg 7 hbox pdfstartlink attr Border 0 0 0 goto name 3 2 1 pdfendlink note how to use the destination argument or much simpler if we don t need hyperlink features def processpointeritem 1 2 3 endarg 7 hbox 2 1 For font management there are macros e size 1 for size changes e color 1 2 3 for colour changes RGB values in the range 0 100 and e rm it bf ss si for type face switching 66 See below for a list of predefined texts which may be used in the atlas There is also a framed macro which takes a box as an argument and displays the box framed The frame style can be customized by redefining the linestyle macro which defaults to 1 J 1 j 1 5 w Now we re ready to define the dopage macro You may choose which of the predefined elements to use A very simple example would be layout my_layout scale 1 200 page setup 29 7 21 27 7 19 1 1 cm size 26 7 18 cm overlap 0 5 cm code tex atlas def dopage box mapbox insertmaps end
114. y one optional argument the name of a configuration file If no name is specified thconfig in the current directory is used If there is no thconfig file e g current directory is not a data directory Therion exits with an error message Options e d gt Turn on debugging mode The current implementation creates a temporary direc tory named thTMPDIR in your system temporary directory and does not delete any temporary files 58 e h help gt Display short help e L gt Do not create a log file Normally therion writes all the messages into a therion log file in the current directory e 1 lt log file gt gt Change the name of the log file e p lt search path gt gt This option is used to set the search path or list of colon separated paths which therion uses to find its source files if it doesn t find them in the working directory e q gt Run therion in quiet mode It will print only warning and error messages to STDERR e print encodings gt Print a list of all supported input encodings e print tex encodings gt Print a list of all supported encodings for PDF output e print init file gt Print a default initialization file For more details see the Ini tialization section in the Appendix e print environment gt Print environment settings for therion e print symbols gt Print a list of all therion supported map symbols in symbols xhtm1 file e s lt source file gt gt Set

Download Pdf Manuals

image

Related Search

Related Contents

Yealink BT40  Manuel - SCS La Boutique  神戸医療産業都市構想 医療関連企業のポートアイランドへの  Instrucciones de uso y de mantenimiento para  USER`S MANUAL Profibus Option Card For Toshiba VF  User Manual - Quinn  Manual de Instrucciones Contenido de la Caja  S-Stage KIT(88cc)取扱説明書  ULE Starter Kit User Manual  Dell U2211H User's Manual  

Copyright © All rights reserved.
Failed to retrieve file