Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
multiplesections [2019/05/27 10:27]
tarquinwj [Copying them into a new file]
multiplesections [2019/11/11 21:30] (current)
tarquinwj New method that avoids duplication of data
Line 21: Line 21:
 If your cave is extremely simple (then why are you doing this sort of cross section?!) you might just be able to render the entire survey on a projection, and be able to visually identify the stations and splays you are interested in. However, it is quite likely that there will be too many stations and splays to identify the right one, so this section assumes that you will need to render just the relevant stations and splays. If your cave is extremely simple (then why are you doing this sort of cross section?!) you might just be able to render the entire survey on a projection, and be able to visually identify the stations and splays you are interested in. However, it is quite likely that there will be too many stations and splays to identify the right one, so this section assumes that you will need to render just the relevant stations and splays.
  
-Most often, by the time you want to draw multiple cross sections at once, you are dealing with data in multiple separate survey files. That is OK, and it doesn'​t really change the approach.+Most often, by the time you want to draw multiple cross sections at once, you are dealing with data in multiple separate survey files. That is OK, and it doesn'​t really change the approach. You could create an overall .th file that will represent all the subsections at once, but it is perhaps more useful to keep it all in the same file as where the centreline data is defined for each of the passage sections, just to make it more easy to find. It is possible to copy the survey data for the relevant stations and their splays into a new survey, with equates to link them to the existing stations. However, this requires duplication of data and configurations that affect data, which is usually unwanted (even though they will typically be only splay legs which do not affect the surveyed length). Instead, the solution presented here will use "data nosurvey"​ to add stations, with a few more equates to make them link to the existing stations and splays.
  
-Create ​new .th file which will contain the data representing only those stations. Give it a "survey somename" ​that you will use to reference it, which must not clash with the existing surveysCopy the survey station'​s splay legs from their original survey data .th file, into this new file. Yes, it means some data is duplicatedbut they are normally only splay legsso they do not affect ​the cave's measured lengthIf you also need to copy survey ​legs between stations (you don't normally need to), use "​flags ​duplicate"-"flags not duplicate" ​around them to make sure they do not add to the overall ​cave length.+Pick station that will be included in your cross section. Give each of its splays an actual name, rather than using "-" to create anonymous splaysFor exampleif they are on station "​5"​you could call the splays "​5a",​ "​5b",​ etcSurround the splay legs with "​flags ​splay" ​and "flags not splay" ​so that they do not add length ​to your cave. 
  
-You will also need to copy any configurations that influence ​the data. This will include any instrument calibrations,​ and any dates which affect declination. Since you will probably be copying ​stations ​from multiple surveys, ​you might need to create multiple ​"centreline" ​sections in the survey, one for each station, containing the appropriate calibration and splay data. If all the station names are different (lucky ​you!)you do not need to rename them. If two of them are the same by chanceyou can rename one of them, eg7a. Alternativelyyou can put "survey ​passage2"​ around each of them, with an appropriate subsurvey name.+Create a new subsurvey within ​the existing survey file which will contain ​stations ​representing only those stations within the cross section ​you are working on. Give it a "survey somename" ​that you will use to reference itwhich must not clash with the existing surveyssuch as "​survey sectiona"​Give that subsurvey a centrelinewhich must have date matching its parent ​survey ​if you want to avoid getting warnings.
  
-Open the master survey file that contains all of the passages that you will be working with. In a simple cave with just one data file (unlikely!)this will be the main data file. Tell it to "input somename.th" - your new data file. Then use "​equate 7@somename 7@realsurvey"​ to equate ​the points ​in your new cross section ​surveywith their real points in the main dataNow all of the splays ​in your new data file should perfectly match the existing onesand be indistinguishable from them in the rendered survey.+In the subsurvey'​s centreline sectionuse "data nosurvey from to"​. ​This allows you to avoid repeating the survey ​data and calibrations. Then one line at a time, list the splay legs around each of the stations that will be in the cross section, ​such as "5 5a"If the cross section is going to have stations without any splays ​attached to themrepeat ​the station name like "5 5" to avoid getting a warning that you are using "​equate"​ to create a new station.
  
-Create a new "​thconfig"​ file, which will project the new survey data on the correct bearing - 355 for the demonstration.+Then for each station and splay end, add an "​equate"​ command, equating the point in the subsurvey to its corresponding point in the parent survey, such as "​equate 5@sectiona 5". 
 + 
 +As an example, imagine that you are working on westwing.th,​ in a survey called "​westwing",​ and stations 5, 12 and 23 will all be in the final cross section: 
 + 
 +<​code>​ 
 +survey westwing 
 +  ... configurations ... 
 + 
 +  #cross sections 
 +  equate 5@sectiona 5 
 +  equate 5a@sectiona 5a 
 +  equate 5b@sectiona 5b 
 +  equate 5c@sectiona 5c 
 +  equate 5d@sectiona 5d 
 +  equate 23@sectiona 23 
 +  equate 23a@sectiona 23a 
 +  equate 23b@sectiona 23b 
 +  equate 23c@sectiona 23c 
 +  equate 23d@sectiona 23d 
 +  survey sectiona 
 +    centreline 
 +      date 2019.10.20 
 +      data nosurvey from to 
 +      5 5a 
 +      5 5b 
 +      5 5c 
 +      5 5d 
 +      12 12 #no splays for this station 
 +      23 23a 
 +      23 23b 
 +      23 23c 
 +      23 23d 
 +    endcentreline 
 +  endsurvey 
 + 
 +  centreline 
 +    ... configurations ... 
 +    data normal from to length compass clino 
 +    ... the real survey data ... 
 +    4 5 ... etc ... 
 +    flags splay 
 +    5 5a ... etc ... 
 +    5 5b ... etc ... 
 +    5 5c ... etc ... 
 +    5 5d ... etc ... 
 +    flags not splay 
 +    5 6 ... etc ... 
 +    ... more real data ... 
 +    11 12 ... etc ... #no splays 
 +    12 13 ... etc ... 
 +    ... more real data ... 
 +    22 23 ... etc ... 
 +    flags splay 
 +    23 23a ... etc ... 
 +    23 23b ... etc ... 
 +    23 23c ... etc ... 
 +    23 23d ... etc ... 
 +    flags not splay 
 +    23 24 ... etc ... 
 +    ... more real data ... 
 +  endcentreline 
 +endsurvey 
 +</​code>​ 
 + 
 +If you also need to copy survey legs between stations (you don't normally need to), Therion seems to know that it should not add the lengths twice. However, if it somehow causes problems for you, use "flags duplicate"​-"​flags not duplicate"​ around the legs to make sure they do not add to the overall cave length. 
 + 
 +Repeat this for any other surveys that contain stations that will be in the cross section. For simplicity, use the same "​sectiona"​ name for all of them. 
 + 
 +Create a new "​thconfig"​ file, which will project the new survey data on the correct bearing - 355 for the demonstration. Use the "​select"​ command to select all of the relevant sections from all surveys that will be in the cross section. These can be in multiple surveys; just use a select statement for each of them in turn.
  
 <​code>​ <​code>​
 source "​master.th"​ source "​master.th"​
-select ​mysurvey@master +select ​sectiona@westwing.mycave.master 
-export map -projection [elevation 355] -fmt xvi -output "section2.xvi"+select sectiona@underwest.mycave.master 
 +export map -projection [elevation 355] -fmt xvi -output "sectiona.xvi"
 </​code>​ </​code>​
  
 Run it to export the XVI file. Run it to export the XVI file.
 +
 +A significantly easier approach would be for it to be possible to [[https://​github.com/​therion/​therion/​issues/​156|name groups, so that they can be selected like surveys]]. This would massively simplify this section.
  
 ====Using the XVI to draw the cross sections==== ====Using the XVI to draw the cross sections====
  • multiplesections.1558945630.txt.gz
  • Last modified: 6 months ago
  • by tarquinwj