diff --git a/Scripts/pyCreateTh/Lib/__pycache__/general_fonctions.cpython-313.pyc b/Scripts/pyCreateTh/Lib/__pycache__/general_fonctions.cpython-313.pyc index abae06b..843528c 100644 Binary files a/Scripts/pyCreateTh/Lib/__pycache__/general_fonctions.cpython-313.pyc and b/Scripts/pyCreateTh/Lib/__pycache__/general_fonctions.cpython-313.pyc differ diff --git a/Scripts/pyCreateTh/Lib/__pycache__/global_data.cpython-313.pyc b/Scripts/pyCreateTh/Lib/__pycache__/global_data.cpython-313.pyc index 86fdd28..c5cb955 100644 Binary files a/Scripts/pyCreateTh/Lib/__pycache__/global_data.cpython-313.pyc and b/Scripts/pyCreateTh/Lib/__pycache__/global_data.cpython-313.pyc differ diff --git a/Scripts/pyCreateTh/Lib/general_fonctions.py b/Scripts/pyCreateTh/Lib/general_fonctions.py index 5abab59..486ec4c 100644 --- a/Scripts/pyCreateTh/Lib/general_fonctions.py +++ b/Scripts/pyCreateTh/Lib/general_fonctions.py @@ -199,10 +199,10 @@ def load_config(args, configIni="config.ini"): survey_keys = { 'Author': 'Author', - 'Copyright1': None, - 'Copyright2': None, - 'Copyright3': None, - 'Copyright_Short': 'CopyrightShort', + 'Copyright1': 'Copyright', + 'Copyright2': 'Copyright', + 'Copyright3': 'Copyright', + 'Copyright_Short': None, 'map_comment': 'mapComment', 'club': 'club', 'thanksto': 'thanksto', @@ -221,6 +221,7 @@ def load_config(args, configIni="config.ini"): config['Survey_Data']['Copyright2'], config['Survey_Data']['Copyright3'] ]) + global_data.CopyrightShort = config['Survey_Data']['Copyright_Short'] elif attr: setattr(global_data, attr, config['Survey_Data'][key]) @@ -232,7 +233,8 @@ def load_config(args, configIni="config.ini"): 'survey_prefix_name': 'SurveyPrefixName', 'shot_lines_in_th2_files': ('linesInTh2', lambda x: x.lower() == 'true'), 'station_name_in_th2_files': ('stationNamesInTh2', lambda x: x.lower() == 'true'), - 'kSmooth': ('kSmooth', float), + 'wall_lines_in_th2_files': ('wallLinesInTh2', lambda x: x.lower() == 'true'), + 'kSmooth': ('kSmooth', float) } for key, value in app_keys.items(): diff --git a/Scripts/pyCreateTh/Lib/global_data.py b/Scripts/pyCreateTh/Lib/global_data.py index 3f8d76f..18cbcd3 100644 --- a/Scripts/pyCreateTh/Lib/global_data.py +++ b/Scripts/pyCreateTh/Lib/global_data.py @@ -11,8 +11,8 @@ error_count = 0 # Compteur d'erreurs ## [Survey_Data] default values Author = "Created by pyCreateTh.py" -Copyright = "# Copyright (C) pyCreateTh.py" -CopyrightShort = "Licence (C) pyCreateTh.py" +Copyright = "# Copyright(C) pyCreateTh.py" +CopyrightShort = "Licence(C) pyCreateTh.py" mapComment = "Created by pyCreateTh.py" cs = "UTM30" club = "Therion" @@ -28,7 +28,7 @@ therionPath = "C:/Therion/therion.exe" SurveyPrefixName = f"Survey_" linesInTh2 = True stationNamesInTh2 = True -wallLineInTh2 = True +wallLinesInTh2 = True kSmooth = 0.5 XVIScale = 100 @@ -100,6 +100,7 @@ th2File = """ ##XTHERION## xth_me_image_insert {insert_XVI} {Copyright} + # File generated by pyCreateTh.py version {version} date: {date} # x_min: {X_Min}, x_max: {X_Max} ecart : {X_Max_X_Min} diff --git a/Scripts/pyCreateTh/config.ini b/Scripts/pyCreateTh/config.ini index a68e595..7960f3b 100644 --- a/Scripts/pyCreateTh/config.ini +++ b/Scripts/pyCreateTh/config.ini @@ -27,7 +27,7 @@ therion_path = C:\Program Files\Therion\therion.exe # Survey prefix name use tu create Survey folders survey_prefix_name = Explo_ -# Options for Th2 files +# Options for th2 files shot_lines_in_th2_files = False station_name_in_th2_files = False wall_lines_in_th2_files = False diff --git a/Scripts/pyCreateTh/pyCreateTh.py b/Scripts/pyCreateTh/pyCreateTh.py index 9083aba..2c44330 100644 --- a/Scripts/pyCreateTh/pyCreateTh.py +++ b/Scripts/pyCreateTh/pyCreateTh.py @@ -986,8 +986,8 @@ def create_th_folders(ENTRY_FILE, df_splays = df_splays.drop(columns="is_zero_length") th2_walls = [] - - if globalData.wallLineInTh2 : + + if globalData.wallLinesInTh2 : th2_walls, x_min, x_max, y_min, y_max = wall_construction_smoothed(df_lines, df_splays, x_min, x_max, y_min, y_max) @@ -1044,7 +1044,7 @@ def create_th_folders(ENTRY_FILE, Copyright_Short = globalData.CopyrightShort, points="\n".join(th2_points), lines="\n".join(th2_lines) if globalData.linesInTh2 else "", - walls="\n".join(th2_walls) if globalData.wallLineInTh2 else "", + walls="\n".join(th2_walls) if globalData.wallLinesInTh2 else "", names="\n".join(th2_names) if globalData.stationNamesInTh2 else "", projection="plan", projection_short="P", @@ -1115,7 +1115,7 @@ def create_th_folders(ENTRY_FILE, th2_walls = [] - if globalData.wallLineInTh2 : + if globalData.wallLinesInTh2 : th2_walls, x_min, x_max, y_min, y_max, = wall_construction_smoothed(df_lines, df_splays, x_min, x_max, y_min, y_max) @@ -1171,7 +1171,7 @@ def create_th_folders(ENTRY_FILE, Copyright_Short = globalData.CopyrightShort, points="\n".join(th2_points), lines="\n".join(th2_lines) if globalData.linesInTh2 else "", - walls="\n".join(th2_walls) if globalData.wallLineInTh2 else "", + walls="\n".join(th2_walls) if globalData.wallLinesInTh2 else "", names="\n".join(th2_names) if globalData.stationNamesInTh2 else "", projection="extended", projection_short="C", @@ -2917,7 +2917,7 @@ if __name__ == u'__main__': # Reading config.ini # ################################################################################################# config_file = load_config(args) - + ################################################################################################# # titre # ################################################################################################# diff --git a/Scripts/pyCreate_th2/config.ini b/Scripts/pyCreate_th2/config.ini deleted file mode 100644 index 173dfcb..0000000 --- a/Scripts/pyCreate_th2/config.ini +++ /dev/null @@ -1,22 +0,0 @@ -# Configuration values for pyCreate_th2.ph -[Survey_Data] -Author = Alexandre Pont -Copyright1 = # Copyright (C) ARSIP 2025 -Copyright2 = # This work is under the Creative Commons Attribution-NonCommercial-NoDerivatives License: -Copyright3 = # -Copyright_Short = Licence CC by-nc-nd : http://creativecommons.org/licenses/by-nc-nd/4.0/ -map_comment = Massif de la Pierre Saint Martin - Larra -club = ARSIP -thanksto = Merçi à tout le monde -datat = https://github.com/Alex38Lyon/Synthese-PSM_LARRA -wpage = https://www.arsip.fr/ -cs = UTM30 - - -[Application_Data] -template_path = ./template -station_by_scrap = 30 -final_therion_exe = True -therion_path = C:\Program Files\Therion\therion.exe -shot_lines_in_th2_files = False -station_name_in_th2_files = False diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/cadaster.cpython-313.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/cadaster.cpython-313.pyc deleted file mode 100644 index 98fc761..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/cadaster.cpython-313.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/cadaster.cpython-39.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/cadaster.cpython-39.pyc deleted file mode 100644 index c850b7a..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/cadaster.cpython-39.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/geo.cpython-313.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/geo.cpython-313.pyc deleted file mode 100644 index 2b7dfa8..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/geo.cpython-313.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/geo.cpython-39.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/geo.cpython-39.pyc deleted file mode 100644 index 63eb93e..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/geo.cpython-39.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/gpx.cpython-39.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/gpx.cpython-39.pyc deleted file mode 100644 index 7856127..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/gpx.cpython-39.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/lang.cpython-39.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/lang.cpython-39.pyc deleted file mode 100644 index 3d39a59..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/lang.cpython-39.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/satmap.cpython-39.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/satmap.cpython-39.pyc deleted file mode 100644 index 5202f81..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/satmap.cpython-39.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-310.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-310.pyc deleted file mode 100644 index 28daa27..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-310.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-311.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-311.pyc deleted file mode 100644 index c4adef8..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-311.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-313.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-313.pyc deleted file mode 100644 index 1c479dd..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-313.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-38.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-38.pyc deleted file mode 100644 index cecd77a..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-38.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-39.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-39.pyc deleted file mode 100644 index 59bea3d..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/survey.cpython-39.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-310.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-310.pyc deleted file mode 100644 index 6f67e93..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-310.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-311.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-311.pyc deleted file mode 100644 index 922a5fb..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-311.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-313.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-313.pyc deleted file mode 100644 index f2f151b..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-313.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-38.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-38.pyc deleted file mode 100644 index 24afba5..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-38.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-39.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-39.pyc deleted file mode 100644 index c55a801..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion.cpython-39.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-310.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-310.pyc deleted file mode 100644 index f804724..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-310.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-313.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-313.pyc deleted file mode 100644 index 199d8ad..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-313.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-38.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-38.pyc deleted file mode 100644 index 16c2459..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-38.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-39.pyc b/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-39.pyc deleted file mode 100644 index 5148a2a..0000000 Binary files a/Scripts/pyCreate_th2/helpers/__pycache__/therion_classes.cpython-39.pyc and /dev/null differ diff --git a/Scripts/pyCreate_th2/helpers/cadaster.py b/Scripts/pyCreate_th2/helpers/cadaster.py deleted file mode 100644 index 1d76d70..0000000 --- a/Scripts/pyCreate_th2/helpers/cadaster.py +++ /dev/null @@ -1,307 +0,0 @@ -from dataclasses import dataclass,field -from enum import Enum -import pandas as pd -import numpy as np -from os.path import abspath, exists - -from helpers.geo import * -#from geo import * -from subprocess import check_output, CalledProcessError - -class Expedition(str, Enum): - """A class to represent the different expeditions""" - - UP2006 = "UP2006" - UP2008 = "UP2008" - UP2010 = "UP2010" - UP2014 = "UP2014" - UP2017 = "UP2017" - UP2019 = "UP2019" - UP2023 = "UP2023" - ENG08 = "ENG08" - ITA08 = "ITA08" - unknown = "unknown" - -def assignExpedition(name: str) -> Expedition: - """Assign the correct expedition given a date""" - target = Expedition.unknown - - for expedition in Expedition: - if expedition.name.__contains__(name): - target = expedition - - return target - -@dataclass -class Cave: - """A class that contains the information about a specific cavity""" - cadnum : str - exped : Expedition - comment : str - altitude : str - carto : str - explo_status : int - _index : int - coordinates : coordinatePairUTM = coordinatePairUTM(x=-999.,y=-999.) - name : str = "undefined" - length: float = 0 - depth : float = 0 - complete_name: str = "undefined" - explorers : str = "undefined" - _search_string : str = field(init=False) - _folder_path : str = field(init=False) - _sector_folder_path : str = field(init=False) - - - def __post_init__(self) -> None: - self._search_string=f"{self.cadnum} {self.name}" - - # set the local folder path for the caves - - def add_coordinates(self, coords : coordinatePairUTM) -> None: - """A method for adding coordinates to the Cave entry""" - self.coordinates = coordinatePairUTM(coords.x,coords.y) - self.coordinates.add_lat_long_from_xy() - self.coordinates.add_sector() - self._folder_path = f"../therion/data/{self.cadnum[:-3]}/{self.name}" - self._sector_folder_path = f"../therion/data/{self.cadnum[:-3]}/{self.cadnum[:-3]}.th" - - - def makeTheriontemplate(self) -> str: - """ Generate an empty therion file using the cave data""" - - TEMPLATE = f"""survey {self.name} -title '{self.complete_name}' \\ - -attr cadnum {self.cadnum} \\ - -attr exped {self.exped}\n - - \tcentreline - \t\tcs epsg:32718 - \t\t#fix ENT {self.coordinates.x} {self.coordinates.y} {self.altitude} - - \t#explo-date {self.exped} - \t#team "{self.explorers}" - - \tunits length meters - \t units compass clino degrees - \tdata normal from to tape compass clino - \t# - - \tendcentreline - - endsurvey - """ - - return TEMPLATE - - - def make_folder(self) -> None: - """A method which creates an empty folder for the cave of interest.""" - filepath = abspath(self._folder_path).strip('\n') - print(filepath) - - try: - check_output(f'mkdir {filepath}', shell=True) - cavename = self.name.strip("\n").strip(' ') - TH_FILE = f'{filepath}/{cavename}.th' - print("Name of the filepath",TH_FILE) - MD_FILE = f"{filepath}/NOTES.md" - - if not exists(TH_FILE): - with open(TH_FILE, 'w+') as th_file: - th_file.write(self.makeTheriontemplate()) - with open(MD_FILE, 'w+') as md_file: - md_file.write(self.comment) - - except CalledProcessError: - TH_FILE = f"{filepath}/{self.name}.th" - MD_FILE = f"{filepath}/NOTES.md" - - if not exists(TH_FILE): - - with open(TH_FILE, 'w+') as th_file: - th_file.write(self.makeTheriontemplate()) - with open(MD_FILE, 'w+') as md_file: - md_file.write(self.comment) - pass - - def make_entry_in_sector_file(self) -> None: - """adds an entry line to the sector .th file""" - with open(self._sector_folder_path, "r+") as f: - lines = f.readlines() - - startindex = [x for x,line in enumerate(lines) if ("centreline" in line) or ("centerline" in line)] - formatted = f""" - #input {self.name}/{self.name}.th - """ - lines.insert(startindex[0]-1,formatted) - f.seek(0) - endindex = [x for x,line in enumerate(lines) if ("endcentreline" in line) or ("endcenterline" in line)] - name_as = f'"{self.complete_name}"' - formatted = f""" - fix ENT_{self.cadnum} {self.coordinates.x} {self.coordinates.y} {self.altitude} - station ENT_{self.cadnum} {name_as} - #equate ENT_{self.cadnum} 0@{self.name} - - """ - lines.insert(endindex[0],formatted) - f.seek(0) - f.writelines(lines) - -class CaveExistsError(Exception): - pass -class CadasterNotLoadedError(Exception): - pass -class CaveNotFoundError(Exception): - pass - -class MoreCavesFoundError(Exception): - pass - -@dataclass -class CaveCadaster: - """A class that expects a list of caves and contains methods for reporting info about these caves""" - caves : list[Cave] = field(default_factory=list) - - def add_entry(self, cave: Cave) -> None: - """Enter an instance of a Cave to the database""" - self.caves.append(cave) - - def check_existing(self, cave: Cave) -> None: - """Check from a cave's coodinates that it does not already exist in the cadaster""" - - for existing_cave in self.caves: - if cave.coordinates.x != float('nan'): - dist = np.sqrt((cave.coordinates.x - existing_cave.coordinates.x)**2 + (cave.coordinates.y - existing_cave.coordinates.y)**2) - if dist < 1: - raise CaveExistsError("the cave exists already") - - def find_cave(self,search_string: str) -> list[Cave]: - """Return a Cave instance given a cadastral number""" - - targets = [] - for cave in self.caves: - if cave._search_string.lower().__contains__(search_string.lower()): - targets.append(cave) - - if len(targets)>=1: - return targets - else: - raise CaveNotFoundError("there is no cave with this cadastral number") - - def delete_cave(self, search_string: str) -> None: - cave = self.find_cave(search_string) - - proceed = input("Are you sure you want to delete this cave entry? Type to proceed.") - if proceed == 'y': - self.caves.remove(cave) - print(f"Deleting the cave '{cave.name}' from the database") - else: - print(f"keeping the cave '{cave.name}' in the database") - - def generate_dataframe(self) -> pd.DataFrame: - """A method which generates a pandas.DataFrame out of the list of caves objects""" - lines = [] - for cave in self.caves: - line = [cave.cadnum, - cave.coordinates.sector_name, - cave.complete_name, - f'{cave.name}', - cave.comment, - cave.coordinates.x, - cave.coordinates.y, - cave.altitude, - cave.length, - cave.depth, - cave.explorers, - cave.exped, - f"{cave.coordinates._orig_lat:.7f}", - f"{cave.coordinates._orig_long:.7f}", - cave.carto, - cave.explo_status - ] - - lines.append(line) - - cols = ['cadnum', - 'secteur', - 'complete_name', - 'name', - 'comment', - 'X_UTM18S', - 'Y_UTM18S', - 'altitude', - 'length', - 'depth', - 'explorers', - 'exped', - 'latitude', - 'longitude', - 'carto', - 'explo_status' - ] - - return pd.DataFrame(lines,columns=cols) - - def write_to_file(self, output_path: str)-> None: - """Writing the pandas.DataFrame to a file formatted exactly as expected for rereading into cave cadaster""" - df = self.generate_dataframe() - #df.sort_values(by='cadnum', inplace =True) - df.to_csv(output_path) - -def generate_entry_from_file(df: pd.DataFrame, row: int) -> Cave: - """A function to generate an entry from a specific line of a formatted dataframe""" - line = df.loc[row] - - coords = coordinatePairUTM(x=line.X_UTM18S,y=line.Y_UTM18S) - coords.add_lat_long(lat=line.latitude,long=line.longitude) - coords.add_sector() - - cave = Cave( - cadnum=line.cadnum, - exped= assignExpedition(str(line.exped)), - comment=line.comment, - altitude= line.altitude, - coordinates=coords, - name= line['name'], - complete_name= line.complete_name, - explorers= line.explorers, - length= line.length, - depth= line.depth, - carto=line.carto, - explo_status=line.explo_status, - _index = row - ) # type: ignore - return cave - -def initialise_database(filepath : str) -> CaveCadaster: - """Reads a csv file containing the cave data into a CaveCadaster object""" - df = pd.read_csv(filepath) - cadaster = CaveCadaster() - - for row in range(len(df)): - cadaster.add_entry(generate_entry_from_file(df,row)) - - return cadaster - -# play with a subclass for the different sectors of cave exploration. -@dataclass -class CadasterSector(CaveCadaster): - """A cave cadaster subclass""" - - parent : CaveCadaster = CaveCadaster() - name : str = 'undefined' - root_cadnum : int = 999 - caves: list[Cave] = field(init = False, default_factory=list) - next_cad_num : int = field(init=False) - - def __post_init__(self) -> None: - self.caves = [cave for cave in self.parent.caves if str(cave.cadnum)[:3].__contains__(str(self.root_cadnum))] - self.next_cad_num = self.root_cadnum*1000+len(self.caves)+1 - - def add_entry(self, cave: Cave) -> None: - self.next_cad_num +=1 - return super().add_entry(cave) - - -## test - diff --git a/Scripts/pyCreate_th2/helpers/geo.py b/Scripts/pyCreate_th2/helpers/geo.py deleted file mode 100644 index 1080b38..0000000 --- a/Scripts/pyCreate_th2/helpers/geo.py +++ /dev/null @@ -1,130 +0,0 @@ -from dataclasses import dataclass, field -from typing import Tuple -from shapely.geometry import shape, Point -import fiona -import pyproj as proj -from os.path import abspath - -@dataclass -class coordinatePairUTM: - """A class that expects two floats""" - x : float - y : float - cadnum_root : str = field(init=False) - sector_name : str = field(init=False) - _orig_lat : float = field(init=False) - _orig_long : float = field(init=False) - - def add_lat_long(self,lat,long) -> None: - """Attributes exploration zone to the cave""" - self._orig_lat,self._orig_long = lat,long - - def add_lat_long_from_xy(self) -> None: - self._orig_lat,self._orig_long = transformer(crs_in='epsg:32718',crs_out='epsg:4326').transform(self.x,self.y) - - def add_sector(self) -> None: - pt = Point(self._orig_long,self._orig_lat) - fp = abspath("../therion/data/gis/secteurs.shp") - multipolygons = read_multipolygons(fp) - intersects = [(pt.within(poly),properties) for poly,properties in multipolygons] - - self.cadnum_root = "undefined" - self.sector_name = "undefined" - for intersect,property in intersects: - if intersect: - self.cadnum_root = property["Cadastre_I"] - self.sector_name = property["Nom"] - -@dataclass -class coordinatePairLatLong: - """A class containing Latitude and Longitude values""" - lat : str - long : str - hemisphere : tuple = field(init=False, default_factory=tuple) - lat_asfloat : float = field(init=False) - long_asfloat : float = field(init=False) - - def __post_init__(self) -> None: - """convert however the latitude and longitude are given to decimal format.""" - - self.parse_hemisphere() - if (self.lat.__contains__('°')) and (self.lat.__contains__("'")) and (self.lat.__contains__("''")): - self.parse_degree_minutes_seconds() - elif(self.lat.__contains__('°')) and (self.lat.__contains__("'")): - self.parse_degree_decimal_minutes() - else: - self.parse_decimal_degrees() - - def parse_hemisphere(self) -> None: - """Parses the lat/long coordinates given and determines in which hemisphere to go""" - if self.lat.__contains__('N'): - NH = 1 - else: - NH = -1 - - if self.long.__contains__('E'): - EH = 1 - else: - EH = -1 - self.hemisphere = (NH,EH) - - def parse_decimal_degrees(self) -> None: - """Parses lat/long coordinates to a decimal float""" - self.lat_asfloat = self.hemisphere[0] * float(self.lat.strip('N').strip('S').split('°')[0]) - self.long_asfloat = self.hemisphere[1] * float(self.long.strip('E').strip('W').split('°')[0]) - - def parse_degree_decimal_minutes(self) -> None: - """Parses lat/long coordinates to a decimal float""" - - lat_split = self.lat.strip('N').strip('S').split('°') - long_split = self.long.strip('E').strip('W').split('°') - lat_degree = float(lat_split[0]) - long_degree = float(long_split[0]) - lat_mins = float(lat_split[1].split("'")[0]) - long_mins = float(long_split[1].split("'")[0]) - self.lat_asfloat = self.hemisphere[0] * (lat_degree + lat_mins/60) - self.long_asfloat = self.hemisphere[1] * (long_degree + long_mins/60) - - def parse_degree_minutes_seconds(self) -> None: - """Parses lat/long coordinates to a decimal float""" - - lat_split = self.lat.strip('N').strip('S').split('°') - long_split = self.long.strip('E').strip('W').split('°') - lat_degree = float(lat_split[0]) - long_degree = float(long_split[0]) - lat_mins = float(lat_split[1].split("'")[0]) - long_mins = float(long_split[1].split("'")[0]) - lat_secs = float(lat_split[1].split("'")[1]) - long_secs = float(long_split[1].split("'")[1]) - - self.lat_asfloat = self.hemisphere[0] * (lat_degree + lat_mins/60 + lat_secs/3600) - self.long_asfloat = self.hemisphere[1] * (long_degree + long_mins/60 + long_secs/3600) - -def read_multipolygons(filepath: str) -> list: - """Reads a shapefile of exploration zones and makes a list of polygons""" - dataset = fiona.open(filepath) - multipolygons = [(shape(poly["geometry"]), poly["properties"]) for poly in dataset] # type: ignore - - return multipolygons - -def transformer(crs_out: str ,crs_in: str) -> proj.Transformer: - """A function returning a transformer instance based on crs codes""" - return proj.Transformer.from_crs(crs_in, crs_out) - -TRANSFORMER_LATLONG = transformer(crs_in="epsg:4326", crs_out="epsg:32718") - -def convert_coords(coord : coordinatePairLatLong) -> coordinatePairUTM: - """Convert from lat-long to UTM18S""" - - X,Y = TRANSFORMER_LATLONG.transform(coord.lat_asfloat,coord.long_asfloat) - return coordinatePairUTM(x=X,y=Y) - - - -import profile -import pstats -profile = profile.Profile() - -#profile.runcall(convert_coords) -ps = pstats.Stats(profile) -ps.print_stats() \ No newline at end of file diff --git a/Scripts/pyCreate_th2/helpers/gpx.py b/Scripts/pyCreate_th2/helpers/gpx.py deleted file mode 100644 index ea47ae2..0000000 --- a/Scripts/pyCreate_th2/helpers/gpx.py +++ /dev/null @@ -1,60 +0,0 @@ -import pandas as pd -import time - - -# 2010-01-04T23:37:42Z -timenow = time.localtime() -timestamp = f"{timenow.tm_year}-{timenow.tm_mon}-{timenow.tm_mday}T{timenow.tm_hour}:{timenow.tm_min}:{timenow.tm_sec}Z" - - -TEMPLATE = """ - - - -{data} -""" - -WPT_TEMPLATE = """ - - {elevation} - {name} - {comment} - {description} - {symbol} -""" - -def pyToGPX(fp): - - # "../../therion/data/SYNTHESE_POINTAGES.csv" - data = pd.read_csv(fp) - - waypoints = "" - - for index,line in data.iterrows(): - - if ("camp" in line.complete_name) or ("Camp" in line.complete_name): - symbol= "Lodging" - else: - symbol = "Waypoint" - - formatted = WPT_TEMPLATE.format( - - latitude= line.latitude, - longitude= line.longitude, - elevation= line.altitude, - comment= line.cadnum, - name= line.complete_name, - description= line.comment, - symbol= symbol - ) - - if "inf" not in formatted: - waypoints+=formatted - - with open(fp.strip("csv") + "gpx", "w+") as f: - f.write(TEMPLATE.format(data=waypoints,time = timestamp)) diff --git a/Scripts/pyCreate_th2/helpers/interest.py b/Scripts/pyCreate_th2/helpers/interest.py deleted file mode 100644 index cce65ce..0000000 --- a/Scripts/pyCreate_th2/helpers/interest.py +++ /dev/null @@ -1,3 +0,0 @@ -import pandas as pd - -data = pd.read_csv("../therion/data/SYNTHESE_POINTAGES.csv") \ No newline at end of file diff --git a/Scripts/pyCreate_th2/helpers/lang.py b/Scripts/pyCreate_th2/helpers/lang.py deleted file mode 100644 index f451547..0000000 --- a/Scripts/pyCreate_th2/helpers/lang.py +++ /dev/null @@ -1,19 +0,0 @@ -LANG = { - "main_menu" : { - "title" : { - "fr" : "Menu Principal", - "en" : "Main Menu", - "es" : "Menu principal" - }, - "savebutton" : { - "fr" : "Sauvegarder", - "en" : "Save", - "es" : "Salvar" - }, - "selectfile" : { - "fr" : "Selectionner un fichier", - "en" : "Select a file", - "es" : "Selectionar una fila" - } - } -} \ No newline at end of file diff --git a/Scripts/pyCreate_th2/helpers/requirements.txt b/Scripts/pyCreate_th2/helpers/requirements.txt deleted file mode 100644 index 14370c8..0000000 --- a/Scripts/pyCreate_th2/helpers/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ - -matplotlib -pandas -Shapely -Fiona -pyproj -scipy -netCDF4 -xarray -joblib -geopandas -motionless -salem -configparser - - diff --git a/Scripts/pyCreate_th2/helpers/requirements_Old.txt b/Scripts/pyCreate_th2/helpers/requirements_Old.txt deleted file mode 100644 index 5e96804..0000000 --- a/Scripts/pyCreate_th2/helpers/requirements_Old.txt +++ /dev/null @@ -1,9 +0,0 @@ -conda create --name ultima2 python==3.9 -y -conda activate ultima2 -conda install matplotlib==3.5.3 pandas==1.5.2 Shapely==1.8.4 -Fiona==1.8.13.post1 pyproj==2.6.1.post1 scipy==1.9.3 netCDF4==1.5.7 -xarray==2022.11.0 joblib==1.1.1 geopandas==0.9.0 -y -pip install motionless==1.3.3 -pip install salem==0.3.8 \ No newline at end of file diff --git a/Scripts/pyCreate_th2/helpers/satmap.py b/Scripts/pyCreate_th2/helpers/satmap.py deleted file mode 100644 index 1129073..0000000 --- a/Scripts/pyCreate_th2/helpers/satmap.py +++ /dev/null @@ -1,63 +0,0 @@ -from dataclasses import dataclass, field -import matplotlib.pyplot as plt -from salem import GoogleVisibleMap, Map, transform_geopandas -import geopandas as gpd -import pandas as pd -from shapely.geometry import Point, MultiPoint - -from helpers.geo import coordinatePairUTM -from helpers.cadaster import CaveCadaster,Cave, Expedition - -@dataclass -class SatelliteMapPlot: - # Configure image aspect - size_x : int - size_y : int - dpi : int - scale : float = 0.013988764 - points : list[coordinatePairUTM] = field(init = False) - point_names : list[str] = field(init=False) - new_x : float = field(init = False) - new_y : float = field(init=False) - - def add_points(self, cadaster : CaveCadaster) -> None: - self.points = [cave.coordinates for cave in cadaster.caves] - self.point_names = [cave.name for cave in cadaster.caves] - - def add_point_to_plot(self, x: float, y: float) -> None: - self.new_x = x - self.new_y = y - - def plot_map(self): - # Get the Google Static image - g = GoogleVisibleMap(y=[self.new_y-0.64*self.scale, self.new_y+0.64*self.scale], x=[self.new_x-1.5*self.scale, self.new_x+1.5*self.scale], - scale=2, # scale is for more details - maptype='satellite', - size_x=self.size_x, size_y=self.size_y - ) - - # the google static image is a standard rgb image - ggl_img = g.get_vardata() - - sm = Map(g.grid, nx=self.size_x, factor=1) - - sm.set_rgb(ggl_img) # add the background rgb image - - # prepare the figure - fig, ax = plt.subplots(figsize=(self.size_x/self.dpi,self.size_y/self.dpi), dpi=self.dpi) - - # plot 1 - x, y = sm.grid.transform([self.new_x],[self.new_y]) - xi, yi = sm.grid.transform([p._orig_long for p in self.points],[p._orig_lat for p in self.points]) - ax.scatter(x, y, zorder= 100, s=5,color="blue", marker = "d") # type:ignore - ax.scatter(xi, yi, zorder= 100, s=3,color="red", marker = "d") # type:ignore - for name,x,y in zip(self.point_names,xi,yi): - ax.text(x+.0001,y+.0001,name,fontsize=5,color = "red") - - sm.plot(ax=ax) - fig.patch.set_facecolor('black') # type:ignore - return fig,ax - - - - diff --git a/Scripts/pyCreate_th2/helpers/scrollbarframe.py b/Scripts/pyCreate_th2/helpers/scrollbarframe.py deleted file mode 100644 index fa3b2d7..0000000 --- a/Scripts/pyCreate_th2/helpers/scrollbarframe.py +++ /dev/null @@ -1,34 +0,0 @@ -import tkinter as tk - -class ScrollbarFrame(tk.Frame): - """ - Extends class tk.Frame to support a scrollable Frame - This class is independent from the widgets to be scrolled and - can be used to replace a standard tk.Frame - """ - def __init__(self, parent, **kwargs): - tk.Frame.__init__(self, parent, **kwargs) - - # The Scrollbar, layout to the right - vsb = tk.Scrollbar(self, orient="vertical") - vsb.pack(side="right", fill="y") - - # The Canvas which supports the Scrollbar Interface, layout to the left - self.canvas = tk.Canvas(self, borderwidth=0, background="#ffffff") - self.canvas.pack(side="left", fill="both", expand=True) - - # Bind the Scrollbar to the self.canvas Scrollbar Interface - self.canvas.configure(yscrollcommand=vsb.set) - vsb.configure(command=self.canvas.yview) - - # The Frame to be scrolled, layout into the canvas - # All widgets to be scrolled have to use this Frame as parent - self.scrolled_frame = tk.Frame(self.canvas, background=self.canvas.cget('bg')) - self.canvas.create_window((4, 4), window=self.scrolled_frame, anchor="nw") - - # Configures the scrollregion of the Canvas dynamically - self.scrolled_frame.bind("", self.on_configure) - - def on_configure(self, event): - """Set the scroll region to encompass the scrolled frame""" - self.canvas.configure(scrollregion=self.canvas.bbox("all")) diff --git a/Scripts/pyCreate_th2/helpers/survey.py b/Scripts/pyCreate_th2/helpers/survey.py deleted file mode 100644 index 7bf7889..0000000 --- a/Scripts/pyCreate_th2/helpers/survey.py +++ /dev/null @@ -1,243 +0,0 @@ -import re -from os.path import dirname, abspath, join, splitext, basename -import argparse - -file_path_reg = r"(?:\n|^)\s*###filepath:(.*)" -input_reg = r"(?:\n|^)\s*(?:input|source)\s+\"?([^\s\"]+)?" -survey_reg = r"(?:\n|^)\s*survey\s+(\S+)" -end_survey_reg = r"(?:\n|^)\s*endsurvey" -scrap_reg = r"(?:\n|^)\s*scrap\s+(\S+)" -end_scrap_reg = r"(?:\n|^)\s*endscrap" -projection_reg = r"(?:\n|^).*-projection\s+(\S+)" -drawnre = re.compile(r".*line wall") -drawnexemptre = re.compile(r".*NODRAW") -drawnexemptplanre = re.compile(r".*NODRAW PLAN") -drawnexemptextendedre = re.compile(r".*NODRAW EE") - - -class NoSurveysFoundException(Exception): - pass - - -class MultipleSurveyFoundException(Exception): - pass - - -class Scrap: - id = None - projection = None - data = None - parent = None - - def __init__(self, id, parent, projection): - self.id = id - self.projection = projection - self.parent = parent - - def is_drawn(self): - if not self.data: - return False - for line in self.data: - match = drawnre.match(line) - if match: - return True - return False - - -class Survey: - parent = None - file_path = None - id = None - children = [] - data = None - scraps = [] - plan_drawn_override = False - extended_drawn_override = False - - def __init__(self, id, parent, file_path): - self.id = id - self.parent = parent - self.file_path = file_path - - @property - def therion_id(self): - if len(self.id) == 1: - return self.id[0] - return "{}@{}".format(self.name, self.namespace) - - @property - def name(self): - return self.id[-1] - - @property - def namespace(self): - return ".".join(list(reversed(self.id[0:-1]))) - - def data(self, data): - self._data = data - self.scraps = Survey.parse(self) - - def parse(self): - scraps = [] - scrap = None - data = [] - for index, line in enumerate(self.data): - match = re.match(scrap_reg, line) - if match: - id = self.id + [match.group(1)] - projection = "plan" - match = re.match(projection_reg, line) - if match: - projection = match.group(1) - scrap = Scrap(id[:], self, projection) - scraps = scraps + [scrap] - - data = [line] - continue - match = re.match(end_scrap_reg, line) - if match: - id = self.id - data = data + [line] - scrap.data = data[:] - data = [] - continue - - # Exempt drawing - match = drawnexemptplanre.match(line) - if match: - self.plan_drawn_override = True - match = drawnexemptextendedre.match(line) - if match: - self.extended_drawn_override = True - match = drawnexemptre.match(line) - if match: - self.plan_drawn_override = True - self.extended_drawn_override = True - - data = data + [line] - self.scraps = scraps - - -class SurveyLoader: - _data = None - survey = None - surveys = {} - - @property - def surveys_list(self): - return list(self.surveys.values()) - - @property - def base_surveys(self): - return [s for s in self.surveys_list if len(s.children) == 0] - - @staticmethod - def load(file_path): - with open(file_path, "r", encoding="utf-8") as f: - data = f.read() - lines = [] - for line in data.splitlines(): - if not line.strip(): - continue - # if line.lstrip().startswith("#"): - # continue - match = re.match(input_reg, line) - if match: - new_file_path = abspath(join(dirname(file_path), match.group(1))) - lines = lines + ["###filepath:{}".format(new_file_path)] - lines = lines + ["\t{}".format(l) for l in SurveyLoader.load(new_file_path)] - lines = lines + ["###filepath:{}".format(file_path)] - else: - lines.append(line.strip()) - return lines - - @staticmethod - def parse(lines, orig_file_path=None): - surveys = {} - id = [] - file_path = orig_file_path - parent = None - survey = None - data = [] - - for index, line in enumerate(lines): - match = re.match(file_path_reg, line) - if match: - file_path = match.group(1) - continue - - match = re.match(survey_reg, line) - if match: - id = id + [match.group(1)] - parent = survey - survey = Survey(id[:], parent, file_path) - surveys[".".join(id[:])] = survey - if parent: - parent.data = data[:] - parent.children = parent.children + [survey] - data = [line] - continue - - match = re.match(end_survey_reg, line) - if match: - popped = id.pop() - data = data + [line] - survey.data = data[:] - if len(survey.children) == 0: - survey.parse() - if not survey.parent: - return survey, surveys - parent.data = parent.data + data - data = parent.data[:] - parent = survey.parent - survey = parent - - continue - - data = data + [line] - return parent, surveys - - def __init__(self, file_path): - # print(f"\033[32mDebug SurveyLoader.load : \033[0m {file_path}") - self._data = SurveyLoader.load(file_path) - survey, surveys = SurveyLoader.parse(self._data, file_path) - self.survey = survey - self.surveys = surveys - - def get_survey_by_id(self, therion_id): - id = [] - if "@" in therion_id: - parts = therion_id.split("@") - id = list(reversed(parts[1].split("."))) + [parts[0]] - else: - id = list(reversed(therion_id.split("."))) - key = ".".join(id) - if key in self.surveys: - return self.surveys[key] - else: - potential_key = [k for k in self.surveys.keys() if k.endswith(".{}".format(key))] - if len(potential_key) == 1: - return self.surveys[potential_key[0]] - potential_keys = [k for k in self.surveys.keys() if key in k] - if len(potential_keys) == 1: - return self.surveys[potential_keys[0]] - elif len(potential_keys) > 1: - raise MultipleSurveyFoundException("Multiple surveys were found with that key:\n\t{}".format("\n\t".join(potential_keys))) - return None - - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Parse a survey") - parser.add_argument( - "survey_file", - help='The survey file (*.th) to work from. e.g. "data/system_migovec.th"', - ) - parser.add_argument( - "survey_selector", - help='The selector for the survey to produce a scrap for. e.g. "roundpond@vrtnarija.vrtnarija_vilinska.system_migovec"', - ) - args = parser.parse_args() - - entrypoint = abspath(args.survey_file) - loader = SurveyLoader(entrypoint) - print(loader.get_survey_by_id(args.survey_selector)) diff --git a/Scripts/pyCreate_th2/helpers/test.py b/Scripts/pyCreate_th2/helpers/test.py deleted file mode 100644 index 35a0379..0000000 --- a/Scripts/pyCreate_th2/helpers/test.py +++ /dev/null @@ -1,5 +0,0 @@ -import numpy as np - -a = np.array([1,2,3,4,5]) - -print(a) \ No newline at end of file diff --git a/Scripts/pyCreate_th2/helpers/therion.py b/Scripts/pyCreate_th2/helpers/therion.py deleted file mode 100644 index 43211cd..0000000 --- a/Scripts/pyCreate_th2/helpers/therion.py +++ /dev/null @@ -1,114 +0,0 @@ -import tempfile -import shutil -import os -from os.path import join -import subprocess -import re - -################################################################################################# -# Codes de couleur ANSI -class Colors: - BLACK = '\033[90m' - RED = '\033[91m' - GREEN = '\033[92m' - YELLOW = '\033[93m' - BLUE = '\033[94m' - MAGENTA = '\033[95m' - CYAN = '\033[96m' - WHITE = '\033[97m' - - ERROR = '\033[91m' - WARNING = '\033[95m' - HEADER = '\033[96m' - - ENDC = '\033[0m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - -################################################################################################# -def compile_template(template, template_args, **kwargs): - try: - log = "" - tmpdir = tempfile.mkdtemp() - config = template.format(**template_args, tmpdir=tmpdir.replace("\\", "/")) - - print(f"{Colors.YELLOW}{config}{Colors.ENDC}\n") - - config_file = join(tmpdir, "config.thconfig") - log_file = join(tmpdir, "log.log") - therion_path = kwargs["therion_path"] if "therion_path" in kwargs else "therion" - with open(config_file, mode="w+", encoding="utf-8") as tmp: - with open(log_file, mode="w+") as tmp2: - tmp.write(config) - tmp.flush() - subprocess.check_output('''"{}" "{}" -l "{}"'''.format(therion_path, config_file, log_file), shell=True, ) - tmp2.flush() - log = tmp2.read() - if kwargs["cleanup"]: - shutil.rmtree(tmpdir) - print("\n" ) - return log, tmpdir - - - except Exception as e: - print(f"{Colors.ERROR}Error: Therion template compilation error: {Colors.ENDC}{e}") - -################################################################################################# -def compile_file(filename, **kwargs): - try: - tmpdir = os.path.dirname(filename) - log_file = join(tmpdir, "log.log").replace("\\", "/") - therion_path = kwargs["therion_path"] if "therion_path" in kwargs else "therion" - - # print(f"{Colors.BLUE}therion_path: {Colors.ENDC}{therion_path}") - # print(f"{Colors.BLUE}filename: {Colors.ENDC}{filename}") - # print(f"{Colors.BLUE}log_file: {Colors.ENDC}{log_file}") - - # subprocess.check_output('''"{}" "{}" -l "{}"'''.format(therion_path, filename, log_file), shell=True, ) - result = subprocess.run( - [therion_path, filename, "-l", log_file], - stdout=subprocess.PIPE, # Capture de la sortie standard - stderr=subprocess.PIPE, # Capture des erreurs - shell=True - ) - - stdout_with_tabs = "\n".join("\t" + line for line in result.stdout.decode().splitlines()) - - # Si la commande échoue, result.returncode sera non nul - if result.returncode != 0: - # Affichage des erreurs et de la sortie standard - print(f"{Colors.ERROR}Error during Therion compilation:{Colors.ENDC}") - print(f"{Colors.WARNING}stdout: {Colors.YELLOW}{stdout_with_tabs}{Colors.ENDC}") - print(f"{Colors.ERROR}stderr: \n{result.stderr.decode()}{Colors.ENDC}") - else: - # Si la commande réussit, affichez la sortie standard - print(f"{Colors.GREEN}Therion compilation succeeded.\n{Colors.YELLOW}{stdout_with_tabs}{Colors.ENDC}") - - except Exception as e: - print(f"{Colors.ERROR}Error: Therion file {Colors.ENDC}{filename}{Colors.ERROR} compilation error: {Colors.ENDC}{e}") - - - - -################################################################################################# -def compile_file_th(filepath, **kwargs): - template = """source {filepath} - layout test - scale 1 500 - endlayout - """ - template_args = {"filepath": filepath} - logs, _ = compile_template(template, template_args, cleanup=True, **kwargs) - return logs - - -lengthre = re.compile(r".*Total length of survey legs =\s*(\S+)m") -depthre = re.compile(r".*Vertical range =\s*(\S+)m") - -################################################################################################# -def get_stats_from_log(log): - lenmatch = lengthre.findall(log) - depmatch = depthre.findall(log) - if len(lenmatch) == 1 and len(depmatch) == 1: - return {"length": lenmatch[0], "depth": depmatch[0]} - return {"length": 0, "depth": 0} diff --git a/Scripts/pyCreate_th2/helpers/therion_classes.py b/Scripts/pyCreate_th2/helpers/therion_classes.py deleted file mode 100644 index 2a812ba..0000000 --- a/Scripts/pyCreate_th2/helpers/therion_classes.py +++ /dev/null @@ -1,460 +0,0 @@ -from dataclasses import dataclass, field -import re - -@dataclass -class Date: - """A class which represents a string formatted date""" - year : int = 2000 - month : int = 1 - day : int = 1 - date_string : str = field(init = False) - - def __post_init__(self) -> None: - self.date_string = f"{self.year}.{self.month:02d}.{self.day:02d}" - -@dataclass -class StationWithComment: - name : str - comment : str - command : str = field(init=False) - - def __post_init__(self) -> None: - self.command = f'station {self.name} "{self.comment}"' - -@dataclass -class LineLRUD: - from_station : str - left : float - right : float - up : float - down : float - -@dataclass -class DataLine: - from_station : str - to_station : str - tape : float - compass : float - - -@dataclass -class NormalDataLine(DataLine): - clino : float - -@dataclass -class DivingDataLine(DataLine): - to_depth : float - from_depth : float - -@dataclass -class Centreline: - - explo_date : Date = Date() - explorers : list[str] = field(init= False, default_factory= list) - type : str = "normal" - data_header : list[str] = field(init= False, default_factory= list) - units_length : dict[str, str] = field(default_factory=lambda: {"units length" : "meters"}) - units_compass_clino : dict[str, str] = field(default_factory=lambda: {"units compass clino": "degrees"}) - lrud_reader : list[str] = field(default_factory=lambda: ["data", "dimensions", "station", "left", "right", "up", "down"]) - data : list[DataLine] = field(init=False, default_factory= list) - lrud_data : list[LineLRUD] = field(init=False, default_factory= list) - commented_stations : list[StationWithComment] = field(init=False, default_factory=list) - _string_repr : str = field(init=False, default_factory= str) - - def __post_init__(self) -> None: - if self.type == 'normal': - self.data_header = ["data", "normal", "from", "to", "tape", "compass", "clino"] - elif self.type == "normal_backclino": - self.data_header = ["data", "normal", "from", "to", "tape", "compass", "backclino"] - elif self.type == "normal_backcompass": - self.data_header = ["data", "normal", "from", "to", "tape", "backcompass", "clino"] - elif self.type == "normal_backcompass_backclino": - self.data_header = ["data", "normal", "from", "to", "tape", "backcompass", "backclino"] - elif self.type == "diving": - self.data_header = ["data", "diving", "from", "fromdepth","to", "todepth", "tape", "compass"] - elif self.type == "diving_backcompass": - self.data_header = ["data", "diving", "from", "fromdepth","to", "todepth", "tape", "backcompass"] - - def add_explorers(self, explorers : list[str]) -> None: - self.explorers += explorers - - def add_dataline(self, line: DataLine) -> None: - self.data+= [line] - - def add_station_line(self, station : StationWithComment) -> None: - self.commented_stations.append(station) - - def add_LRUDdataline(self, line: LineLRUD) -> None: - self.lrud_data+= [line] - - def add_Date(self, date: str) -> None: - DATE = date.split(".") - self.date = Date(year=int(DATE[0]),month=int(DATE[0]),day=int(DATE[2])) - self.explo_date = Date(year=int(DATE[0]),month=int(DATE[1]),day=int(DATE[2])) - - def update_type(self, type: str): - self.type = type - self.__post_init__() - - def add_string_repr(self) -> None: - - explorers = "" - for explorer in self.explorers: - explorers += f"explo-team {explorer}\n\t" - - formatted_data : str = "" - formatted_lrud : str = "" - formatted_comments : str = "" - - - for line,lrud_line in zip(self.data,self.lrud_data): - if "clino" in self.data_header: - formatted_data += f""" - {line.from_station}\t{line.to_station}\t{line.tape}\t{line.compass}\t{line.clino}\t""" # type: ignore - formatted_lrud += f""" - {lrud_line.from_station}\t{lrud_line.left}\t{lrud_line.right}\t{lrud_line.up}\t{lrud_line.down}\t""" - - elif "todepth" in self.data_header: - formatted_data += f""" - {line.from_station}\t{line.from_depth}\t{line.to_station}\t{line.to_depth}\t{line.tape}\t{line.compass}\t""" # type: ignore - formatted_lrud += f""" - {lrud_line.from_station}\t{lrud_line.left}\t{lrud_line.right}\t{lrud_line.up}\t{lrud_line.down}\t""" - - for comment in self.commented_stations: - formatted_comments += f""" - {comment.command}""" - - self._string_repr = f""" - centreline - - explo-date {self.explo_date.date_string} - date {self.explo_date.date_string} - - {explorers} - {join(self.data_header)} - {formatted_data} - - {join(self.lrud_reader)} - {formatted_lrud} - - {formatted_comments} - - endcentreline""" - -@dataclass -class Survey: - name : str - entrance : str = field(init= False, default_factory= str) - centrelines : list[Centreline] = field(init= False, default_factory= list) - _string_repr : str = field(init=False, default_factory= str) - - - def add_centrelines(self, centrelines: list[Centreline]) -> None: - self.centrelines += centrelines - - def add_entrance(self, entrance : str) -> None: - self.entrance = entrance - - def add_string_repr(self) -> None: - - centrelines = "" - for centreline in self.centrelines: - centrelines += f"{centreline._string_repr}\n" - - self._string_repr = f""" -## a survey compiled from Visual Topo Data using the visual_therion.py script - -survey "{self.name}" -entrance {self.entrance} -{centrelines} -endsurvey -""" - -@dataclass -class StrategyParser: - input_str : str - compass : str = "normal" - clino : str = "normal" - strategy_name: str = "normal" - - def __post_init__(self) -> None: - if "Dir,Dir,Inv" in self.input_str: - self.clino = "back" - self.strategy_name = "normal_backclino" - - elif "Inv,Inv,Dir" in self.input_str or "Inv,Dir,Dir" in self.input_str: - self.compass = "back" - if "Prof" in self.input_str: - self.strategy_name = "diving_backcompass" - else: - self.strategy_name = "normal_backcompass" - - elif "Inv,Inv,Inv" in self.input_str: - self.compass = "back" - self.clino = "back" - self.strategy_name = "normal_backcompass_backclino" - - elif ("Dir Dir Dir" in self.input_str) and ("Prof") in self.input_str: - self.strategy_name = "diving" - - -def join(l : list[str])-> str: - newstr = "" - - for elem in l: - newstr += f"{elem} " - - return newstr - -def find_entrance_stn(data: list[str], format : str) -> str: - if format == "tro": - """Search the visual topo file for the entrance station""" - for c,l in enumerate(data): - if 'Entree' in l: - entrance_stations = re.findall(r"(?<=Entree\s).+",l) - else: - for c,l in enumerate(data): - if '' in l: - entrance_stations = re.findall(r"(?<=)[0-9a-z]+",l) - - return entrance_stations[0] # type: ignore - - -def return_centreline_params(data: list[str], fmt: str): - if fmt == "tro": - return return_centreline_params_tro(data) - else: - return return_centreline_params_trox(data) - -def return_centreline_params_trox(data): - start,end = [],[] - survey_dates = [] - surveyor_groups = [] - - for c,l in enumerate(data): - if ('Param' in l) and ('/Param' not in l): - if 'Comment' in data[c+1]: - if len(start) >= 1: - end.append(c-1) - start.append(c+2) - else: - if len(start) >= 1: - end.append(c-1) - start.append(c+1) - - reg_explodate = re.findall(r'(?<=Date\=")\d\d\/\d\d\/\d\d\d\d', l) - reg_explodate = [elem for elem in reg_explodate[0].split("/")] - explodate = "{yyyy}.{mm}.{dd}".format(yyyy =reg_explodate[2], mm =reg_explodate[1], dd = reg_explodate[0]) - if len(explodate) == 0: - survey_dates.append('') - else: - survey_dates.append(re.sub(r"/",".",explodate)) - tp = re.findall(r"(?<=Topo réalisée par )[\w+\s]*",l) - if len(tp) == 0: - surveyor_groups.append('') - else: - surveyor_groups.append(tp[0].split(' ')) - elif 'Configuration' in l: - end.append(c-1) - - return surveyor_groups,survey_dates,start,end - - -def return_centreline_params_tro(data): - # find the parameters of the file. - start,end = [],[] - survey_dates = [] - surveyor_groups = [] - - for c,l in enumerate(data): - if 'Param' in l: - if len(start) >= 1: - end.append(c-1) - start.append(c+1) - - - explodate = re.findall(r"\d\d.\d\d.\d\d", l) - if len(explodate) == 0: - survey_dates.append('') - else: - survey_dates.append(re.sub(r"-",".",explodate[0])) - tp = re.findall(r"(?<=Topo réalisée par )[\w+\s]*",l) - if len(tp) == 0: - surveyor_groups.append('') - else: - surveyor_groups.append(tp[0].split(' ')) - elif 'Configuration' in l: - end.append(c-1) - - return surveyor_groups,survey_dates,start,end - - - -def parseFloat(x: str) -> float: - try: - X = float(x) - return X - except ValueError: - X = 0. - return X - - -def parse_CommentedStations(lines : list[str]) -> list[StationWithComment]: - parsed_lines = [[elem for elem in line.split(";") if elem != ""] for line in lines[1:]] - stations_list = [] - for line in parsed_lines: - if len(line) > 1: - stn_name = [elem for elem in line[0].split(" ") if elem != ""][0] - comment = line[1] - station = StationWithComment(stn_name,comment) - stations_list.append(station) - return stations_list - -def parse_LRUDS(lines: list[str], format : str) -> list[LineLRUD]: - if format == "tro": - LRUDlines = [[elem for elem in line.split(" ") if elem != ""] for line in lines[:]] - elif format == "trox": - print("parsing a trox file") - LRUDlines = [] - LRUDlines.append([elem.split("=")[-1].strip('"') for elem in lines[0].split(" ")[1:] if elem != ""]) - LRUDlines = LRUDlines + [["*"]+[elem.split("=")[-1].strip('"') for elem in line.split(" ")[1:] if elem != ""] for line in lines[:]] - else: - LRUDlines = [[]] - lrud_lines = [] - - - for c,line in enumerate(LRUDlines): - if "*" in line[0] and len(line) >=9: - LRUDline =LineLRUD(LRUDlines[c][1],parseFloat(line[5]),parseFloat(line[6]),parseFloat(line[7]),parseFloat(line[8])) - elif len(line) >=9: - LRUDline =LineLRUD(line[1],parseFloat(line[5]),parseFloat(line[6]),parseFloat(line[7]),parseFloat(line[8])) - else: - print("skipping empty line {}".format(c)) - if len(line) >=9: - if line[0] != line[1]: - #check there is no asterisk - lrud_lines.append(LRUDline) # type:ignore - - return lrud_lines - -def parse_normal_data(lines: list[str], format: str ) -> list[NormalDataLine]: - - if format == "tro": - datalines = [[elem for elem in line.split(" ") if elem != ""] for line in lines[1:]] - elif format == "trox": - print("parsing a trox file") - datalines: list = [] - datalines.append([elem.split("=")[-1].strip('"') for elem in lines[0].split(" ")[1:] if elem != ""]) - - for line in lines[1:]: - if "Dep=" in line: - datalines.append([elem.split("=")[-1].strip('"') for elem in line.split(" ")[1:] if elem != ""]) - else: - datalines.append(["*"]+[elem.split("=")[-1].strip('"') for elem in line.split(" ")[1:] if elem != ""]) - else: - datalines = [[]] - - dataLines = [] - - for c,line in enumerate(datalines): - if "*" in line[0] and len(line) >=9: - dataLine = NormalDataLine(datalines[c-1][1],line[1],float(line[2]),float(line[3]),float(line[4])) - print(line) - elif len(line) >=9: - dataLine = NormalDataLine(line[0],line[1],float(line[2]),float(line[3]),float(line[4])) - else: - print("skipping empty line {}".format(c)) - if dataLine.tape != 0: # type:ignore - dataLines.append(dataLine) # type:ignore - - return dataLines - -def parse_diving_data(lines: list[str], format: str) -> list[DivingDataLine]: - - if format == "tro": - datalines = [[elem for elem in line.split(" ") if elem != ""] for line in lines[1:]] - elif format == "trox": - print("parsing a trox file") - datalines = [] - datalines.append([elem.split("=")[-1].strip('"') for elem in lines[0].split(" ")[1:] if elem != ""]) - datalines = datalines + [["*"]+[elem.split("=")[-1].strip('"') for elem in line.split(" ")[1:] if elem != ""] for line in lines[1:]] - else: - print("oops empty") - datalines = [[]] - - - dataLines = [] - - for c,line in enumerate(datalines[:]): # keep and index and ignore the first one. - if len(line) >=9: - if "*" in line and len(datalines[c-1]) > 9: - dataLine = DivingDataLine(from_depth= float(datalines[c][4]), - from_station= datalines[c-1][1], - to_depth= float(line[4]), - to_station=line[1], - tape= float(line[2]), - compass =float(line[3])) - else: - dataLine = DivingDataLine(from_depth= float(datalines[c][4]), - from_station= line[0], - to_depth= float(line[4]), - to_station=line[1], - tape= float(line[2]), - compass =float(line[3])) - - if dataLine.tape != 0: - dataLines.append(dataLine) - - return dataLines - -def make_centrelines_list(data : list[str], format: str ) -> list[Centreline]: - - surveyor_groups,survey_dates,starts,ends = return_centreline_params(data, fmt= format) # type:ignore - - centrelines : list[Centreline] = [] - - for start,end,date in zip(starts,ends,survey_dates): - newCentreline = Centreline() - newCentreline.add_Date(date) - if format == "tro": - header = data[start-1] - else: - if "Comment" in data[start-1]: - header = "" - for elem in data[start-2].split(" ")[1:]: - header += elem.split("=")[-1].strip('"')+" " - else: - header = "" - for elem in data[start-1].split(" ")[1:]: - header += elem.split("=")[-1].strip('"')+" " - - print("data header: ", newCentreline.data_header) - strategy = StrategyParser(header) - - newCentreline.update_type(strategy.strategy_name) - station_lines = parse_CommentedStations(data[start:end]) - - if "normal" in strategy.strategy_name: - lrudLines = parse_LRUDS(data[start:end], format = format) - dataLines = parse_normal_data(data[start:end], format= format) - - for dataLine,lrudLine in zip(dataLines,lrudLines): - newCentreline.add_dataline(dataLine) - newCentreline.add_LRUDdataline(lrudLine) - - - elif "diving" in strategy.strategy_name: - lrudLines = parse_LRUDS(data[start:end], format = format) - dataLines = parse_diving_data(data[start:end], format = format) - - for dataLine,lrudLine in zip(dataLines,lrudLines): - newCentreline.add_dataline(dataLine) - newCentreline.add_LRUDdataline(lrudLine) - - for line in station_lines: - newCentreline.add_station_line(line) - - newCentreline.add_string_repr() - centrelines.append(newCentreline) - - return centrelines - diff --git a/Scripts/pyCreate_th2/pyCreate_th2.py b/Scripts/pyCreate_th2/pyCreate_th2.py deleted file mode 100644 index a081b9a..0000000 --- a/Scripts/pyCreate_th2/pyCreate_th2.py +++ /dev/null @@ -1,993 +0,0 @@ - -""" -############################################################################################# -# # -# Script pour automatiser la création des dossiers et fichiers pour un fichier .th # -# # -# By Alexandre PONT (alexandre_pont@yahoo.fr) # -# # -# Définir les différentes variables dans fichier config.ini # -# Création des dossiers nécessaires d'après dossier 'template' # -# Création des fichiers nécessaires : th, th2, -tot.th # -# Création des scrap avec stations topo # -# # -# usage : python pyCreate_th2.py # -# # -############################################################################################# - -Création Alex the 2024 12 16 : - Thank's too - - Tanguy Racine for the script https://github.com/tr1813 - - Xavier Robert for the main principes https://github.com/robertxa - - Benoit Urruty https://github.com/BenoitURRUTY - -Version 2025 03 21 : Création mode --update th2 - -""" - -Version ="2025.03.21" - -################################################################################################# -################################################################################################# - - - -import os -from os.path import isfile, join, abspath -import sys -import re -import unicodedata -import argparse -import shutil -from datetime import datetime -import configparser -import tkinter as tk -from tkinter import filedialog - -from helpers.survey import SurveyLoader, NoSurveysFoundException -from helpers.therion import compile_template, Colors, compile_file - -################################################################################################# - -## [Survey_Data] default values -Author = "Created by pyCreate_th2.py" -Copyright = "# Copyright (C) pyCreate_th2.py" -Copyright_Short = "Licence (C) pyCreate_th2.py" -map_comment = "Created by pyCreate_th2.py" -cs = "UTM30" -club = "Therion" -thanksto = "Therion" -datat = "https://therion.speleo.sk/" -wpage = "https://therion.speleo.sk/" - -## [Application_data] default values -template_path = "./template" -station_by_scrap = 20 -final_therion_exe = True -therion_path = "C:/Therion/therion.exe" -LINES = -1 -NAMES = -1 - - - - -################################################################################################# -# # Codes de couleur ANSI -# class Colors: -# BLACK = '\033[90m' -# RED = '\033[91m' -# GREEN = '\033[92m' -# YELLOW = '\033[93m' -# BLUE = '\033[94m' -# MAGENTA = '\033[95m' -# CYAN = '\033[96m' -# WHITE = '\033[97m' - -# ERROR = '\033[91m' -# WARNING = '\033[95m' -# HEADER = '\033[96m' - -# ENDC = '\033[0m' -# BOLD = '\033[1m' -# UNDERLINE = '\033[4m' - - - -################################################################################################# -def sanitize_filename(th_name): - """ - Cleans a string to make it compatible with filenames on Windows, Linux, and macOS. - Replaces special and accented characters with compatible characters. - - Args: - th_name (str): The filename to clean. - - Returns: - str: The cleaned and compatible string. - """ - # Unicode normalization to replace accented characters with their non-accented equivalents - th_name = unicodedata.normalize('NFKD', th_name).encode('ASCII', 'ignore').decode('ASCII') - - # Replace illegal characters with an underscore (_) - th_name = re.sub(r'[<>:"/\\|?*\']', '_', th_name) # Characters not allowed on Windows - th_name = re.sub(r'[\s]', '_', th_name) # Replace spaces with underscores - th_name = re.sub(r'[^a-zA-Z0-9._-]', '_', th_name) # Keep letters, digits, . _ - - - # Ensure the name is not empty or just underscores - return th_name.strip('_') or "default_filename" - - - - -################################################################################################# -def colored_help(parser): - # Captures the help output - help_text = parser.format_help() - - # Coloration des différentes parties - colored_help_text = help_text.replace( - 'usage:', f'{Colors.ERROR}usage:{Colors.ENDC}' - ).replace( - 'options:', f'{Colors.GREEN}options:{Colors.ENDC}' - ).replace('positional arguments:', f'{Colors.BLUE}positional arguments:{Colors.ENDC}') - - # Surligner les arguments - for action in parser._actions: - if action.option_strings: - # Colorer les options (--xyz) - for opt in action.option_strings: - colored_help_text = colored_help_text.replace(opt, f'{Colors.BLUE}{opt}{Colors.ENDC}') - - # Imprimer le texte coloré - print(colored_help_text) - sys.exit(0) - -################################################################################################# -def read_config(config_file): - global Author - global Copyright - global Copyright_Short - global map_comment - global club - global thanksto - global datat - global wpage - global cs - global template_path - global station_by_scrap - global final_therion_exe - global therion_path - global LINES - global NAMES - - - # Initialize the configparser to read .ini files - config = configparser.ConfigParser() - config.read(config_file, encoding="utf-8") - - if 'Survey_Data' in config and 'Author' in config['Survey_Data']: - Author = config['Survey_Data']['Author'] - - if 'Survey_Data' in config and 'Copyright1' in config['Survey_Data']: - Copyright = config['Survey_Data']['Copyright1'] + "\n" + config['Survey_Data']['Copyright2'] + "\n" + config['Survey_Data']['Copyright3'] + "\n" - - if 'Survey_Data' in config and 'Copyright_Short' in config['Survey_Data']: - Copyright_Short = config['Survey_Data']['Copyright_Short'] - - if 'Survey_Data' in config and 'map_comment' in config['Survey_Data']: - map_comment = config['Survey_Data']['map_comment'] - - if 'Survey_Data' in config and 'club' in config['Survey_Data']: - club = config['Survey_Data']['club'] - - if 'Survey_Data' in config and 'thanksto' in config['Survey_Data']: - thanksto = config['Survey_Data']['thanksto'] - - if 'Survey_Data' in config and 'datat' in config['Survey_Data']: - datat = config['Survey_Data']['datat'] - - if 'Survey_Data' in config and 'wpage' in config['Survey_Data']: - wpage = config['Survey_Data']['wpage'] - - if 'Survey_Data' in config and 'cs' in config['Survey_Data']: - cs = config['Survey_Data']['cs'] - - if 'Application_Data' in config and 'template_path' in config['Application_Data']: - template_path = config['Application_Data']['template_path'] - - if 'Application_Data' in config and 'station_by_scrap' in config['Application_Data']: - station_by_scrap = int(config['Application_Data']['station_by_scrap']) - - if 'Application_Data' in config and 'final_therion_exe' in config['Application_Data']: - final_therion_exe = bool(config['Application_Data']['final_therion_exe']) - - if 'Application_Data' in config and 'therion_path' in config['Application_Data']: - therion_path = config['Application_Data']['therion_path'] - - if LINES == -1 : - if 'Application_Data' in config and 'shot_lines_in_th2_files' in config['Application_Data']: - LINES = 0 if config['Application_Data']['shot_lines_in_th2_files'] == "False" else 1 - - if NAMES == -1 : - if 'Application_Data' in config and 'station_name_in_th2_files' in config['Application_Data']: - NAMES = 0 if config['Application_Data']['station_name_in_th2_files'] == "False" else 1 - - - -################################################################################################# -def copy_template_if_not_exists(template_path, destination_path): - # Check if the destination folder exists - try: - if not os.path.exists(destination_path): - # If the destination folder does not exist, copy the template - shutil.copytree(template_path, destination_path) - print(f"{Colors.GREEN}The folder '{Colors.GREEN}{template_path}{Colors.ENDC}' has been copied to '{Colors.ENDC}{destination_path}{Colors.GREEN}'{Colors.ENDC}") - else: - print(f"{Colors.WARNING}Warning: The folder '{Colors.ENDC}{destination_path}{Colors.WARNING}' already exists. No files were copied.{Colors.ENDC}") - except Exception as e: - print(f"{Colors.ERROR}Copy template error: {Colors.ENDC}{e}") - exit(1) - -################################################################################################# -def add_copyright_header(file_path, copyright_text): - # Lire le contenu du fichier - with open(file_path, 'r') as file: - content = file.readlines() - - # Vérifier si le copyright est déjà présent - if not any("copyright" in line.lower() for line in content): - # Ajouter le copyright en en-tête - content.insert(0, f"{copyright_text}\n") - - # Réécrire le fichier avec le copyright ajouté - with open(file_path, 'w') as file: - file.writelines(content) - - -################################################################################################# -def copy_file_with_copyright(th_file, destination_path, copyright_text): - # Vérifier si le fichier existe - if os.path.exists(th_file): - # Créer le dossier de destination s'il n'existe pas - os.makedirs(destination_path, exist_ok=True) - - # Copier le fichier vers le dossier de destination - dest_file = os.path.join(destination_path, os.path.basename(th_file)) - shutil.copy(th_file, dest_file) - - # Ajouter le copyright dans l'en-tête si nécessaire - add_copyright_header(dest_file, copyright_text) - - # print(f"{Colors.GREEN}File '{Colors.ENDC}{th_file}{Colors.GREEN}' has been copied to '{Colors.ENDC}{destination_path}{Colors.GREEN}' with the copyright header added.{Colors.ENDC}") - else: - print(f"{Colors.ERROR}Error: The file .th does not exist {Colors.ENDC}{th_file}") - - - -################################################################################################# -def process_template(template_path, variables, output_path): - """ - Process a Therion template file by replacing variables. - - Args: - template_path (str): Path to the original template file - variables (dict): Dictionary of variables to replace - output_path (str): Path for the new configuration file - """ - try: - # Read the content of the template file - with open(template_path, 'r', encoding='utf-8') as file: - content = file.read() - - # Replace variables - for var, value in variables.items(): - # Use regex to replace {variable} with its value - pattern = r'\{' + re.escape(var) + r'\}' - content = re.sub(pattern, str(value), content) - - # Write the new file - with open(output_path, 'w', encoding='utf-8') as file: - file.write(content) - - print(f"{Colors.GREEN}Update template successfully: {Colors.ENDC}{output_path}") - - # Delete the original template file - os.remove(template_path) - - except FileNotFoundError: - print(f"{Colors.WARNING}Warning: Template file {Colors.ENDC}{template_path}{Colors.WARNING} not found.{Colors.ENDC}") - except PermissionError: - print(f"{Colors.ERROR}Error: Insufficient permissions to write the file.{Colors.ENDC}") - except Exception as e: - print(f"{Colors.ERROR}An error occurred: {Colors.ENDC}{e}") - - -################################################################################################# -def parse_therion_surveys(file_path): - """ - Reads a Therion file and extracts survey names. - - Args: - file_path (str): Path to the Therion file to parse - - Returns: - list: List of survey names - """ - survey_names = [] - - try: - with open(file_path, 'r', encoding='utf-8') as file: - # Read all lines from the file - lines = file.readlines() - - for line in lines: - # Look for lines starting with survey - line = line.strip() - if line.startswith('survey ') and ' -title ' in line: - # Split the line and extract the survey name - start_index = line.find('survey ') + len('survey ') - end_index = line.find(' -title ') - - survey_name = line[start_index:end_index].strip() - survey_names.append(survey_name) - - except FileNotFoundError: - print(f"{Colors.WARNING}Warning: File {Colors.ENDC}{file_path}{Colors.WARNING} not found.{Colors.ENDC}") - except PermissionError: - print(f"{Colors.ERROR}Error: Insufficient permissions to read {Colors.ENDC}{file_path}") - except Exception as e: - print(f"{Colors.ERROR}An error occurred: {Colors.ENDC}{e}") - - return survey_names - -################################################################################################# -def str_to_bool(value): - """ - Function to convert string to boolean - """ - if isinstance(value, bool): - return value - if value.lower() in ('true', '1', 'yes', 'y'): - return True - elif value.lower() in ('false', '0', 'no', 'n'): - return False - else: - raise argparse.ArgumentTypeError(f"{Colors.ERROR}Error: Invalid boolean value: {Colors.ENDC}{value}") - -################################################################################################# -def select_file(): - # Créer une instance de la fenêtre tkinter - root = tk.Tk() - # Cacher la fenêtre principale - root.withdraw() - # Afficher la boîte de dialogue de sélection de fichier - file_path = filedialog.askopenfilename(title="Sélectionnez un fichier") - # Retourner le chemin complet du fichier sélectionné - return file_path - - - -################################################################################################# -# main function # -################################################################################################# -if __name__ == u'__main__': - - ################################################################################################# - # Parse arguments # - ################################################################################################# - parser = argparse.ArgumentParser( - description=f"{Colors.HEADER}Create a skeleton folder and th2 files with scraps from a .th Therion file\nVersion: {Colors.ENDC}{Version}\n", - formatter_class=argparse.RawDescriptionHelpFormatter) - parser.print_help = colored_help.__get__(parser) - parser.add_argument("--survey_file", help="The survey file (*.th) to perform e.g. './Therion_file.th'", default="") - parser.add_argument("--survey_name", help="Scrap name (if different from 'survey_file' name)", default="None") - #parser.add_argument("--proj", choices=['plan', 'elevation', 'extended', 'none'], help="The scrap projection to produce", default="plan") - #parser.add_argument("--format", choices=['th2', 'plt'], help="Output format. Either th2 for producing skeleton for drawing or plt for visualizing in aven/loch", default="th2") - parser.add_argument("--output", default="./", help="Output folder path") - # parser.add_argument("--therion-path", help="Path to therion binary", default="therion") - parser.add_argument("--scale", help="Scale for the exports", default="500") - parser.add_argument("--lines", type=str_to_bool, help="Shot lines in th2 files", default=-1) - parser.add_argument("--names", type=str_to_bool, help="Stations names in th2 files", default=-1) - parser.add_argument("--update", help="Mode update, option th2", default="") - - parser.epilog = ( - f"{Colors.GREEN}Please, complete {Colors.RED}config.ini{Colors.GREEN} file for personal configuration{Colors.ENDC}\n" - f"{Colors.GREEN}If no argument :{Colors.RED} files selection windows\n{Colors.ENDC}\n" - f"{Colors.BLUE}Examples:{Colors.ENDC}\n" - f"\t> python pyCreate_th2.py ./test/Entree.th --survey_name Geophysicaya_01_entree --output ./test/ --scale 1000\n" - f"\t> python pyCreate_th2.py Entree.th\n" - f"\t> python pyCreate_th2.py\n\n") - args = parser.parse_args() - - # print("args.survey_file : " + args.survey_file ) - # print("args.update : " + args.update ) - - if args.survey_file == "": - args.survey_file = select_file() - print(f"Selected file : {args.survey_file}") - - ENTRY_FILE = abspath(args.survey_file) - # PROJECTION = args.proj.capitalize() - PROJECTION = "Plan" - TARGET = args.survey_name - OUTPUT = args.output - #FORMAT = args.format - FORMAT = "th2" - SCALE = args.scale - LINES = args.lines - NAMES = args.names - # TH_NAME = args.survey_file.split("/")[-1].strip(".th") - TH_NAME = sanitize_filename(os.path.splitext(os.path.basename(args.survey_file))[0]) - DEST_PATH = os.path.dirname(args.survey_file) + "/" + TH_NAME - #DEST_PATH = args.output + TH_NAME.split("/")[-1].strip(".th") - #ABS_PATH = ENTRY_FILE.strip(args.survey_file) - ABS_PATH = os.path.dirname(ENTRY_FILE) - - # print("args.survey_file : " + args.survey_file ) - # print("ENTRY_FILE: " + ENTRY_FILE ) - # print("PROJECTION: " + PROJECTION ) - # print("TARGET: " + TARGET ) - # print("OUTPUT: " + OUTPUT ) - # print("FORMAT: " + FORMAT ) - # print("SCALE: " + SCALE ) - # print("TH_NAME: " + TH_NAME ) - # print("DEST_PATH: " + DEST_PATH ) - # print("ABS_PATH: " + ABS_PATH ) - - ################################################################################################# - # Reading config.ini # - ################################################################################################# - try: - # Load the 'database' section from the configuration file - read_config("config.ini") - # print("Auteur: " + Author) - # print(f"Copyright: \n{Copyright}") - - except ValueError as e: - # Handle errors if the section is missing - print(f"{Colors.ERROR}Error: read_config:{Colors.ERROR}", e) - - if PROJECTION.lower() != "plan" : - print(f"{Colors.ERROR}Error: Sorry, projection '{Colors.ENDC}{PROJECTION}{Colors.ERROR}' not yet implemented{Colors.ENDC}") - exit(1) - - if not os.path.isfile(ENTRY_FILE): - print(f"{Colors.ERROR}Error: The Therion file didn't exist: {Colors.ENDC} {ENTRY_FILE}") - exit(1) - - if FORMAT not in ["th2", "plt"]: - print(f"{Colors.ERROR}Error: Please choose a supported format: th2, plt{Colors.ENDC}") - exit(1) - - # Normalise name, namespace, key, file path - print(f"{Colors.GREEN}Parsing survey entry file:\t{Colors.ENDC} {args.survey_file}") - - survey_list = parse_therion_surveys(ENTRY_FILE) - # print(survey_list) - - if TARGET == "None" : - if len(survey_list) > 1 : - print(f"{Colors.ERROR}Error: Multiple surveys were found, not yet implemented{Colors.ENDC}") - exit(1) - - TARGET = sanitize_filename(survey_list[0]) - - print(f"{Colors.GREEN}Parsing survey target: \t{Colors.ENDC} {TARGET}") - - loader = SurveyLoader(ENTRY_FILE) - survey = loader.get_survey_by_id(survey_list[0]) - - # print(survey.name) - - if not survey: - raise NoSurveysFoundException(f"{Colors.ERROR}Error: No survey found with that selector{Colors.ENDC}") - - - if args.update == "th2": - print(f"{Colors.GREEN} Update th2 files {Colors.ENDC}") - print(f"\t{Colors.BLUE}survey_file : {Colors.ENDC} {args.survey_file}") - print(f"\t{Colors.BLUE}ENTRY_FILE: {Colors.ENDC} {ENTRY_FILE}") - print(f"\t{Colors.BLUE}PROJECTION: {Colors.ENDC} {PROJECTION}") - print(f"\t{Colors.BLUE}TARGET: {Colors.ENDC} {TARGET}") - print(f"\t{Colors.BLUE}OUTPUT: {Colors.ENDC} {OUTPUT}") - print(f"\t{Colors.BLUE}FORMAT: {Colors.ENDC} {FORMAT}") - print(f"\t{Colors.BLUE}SCALE: {Colors.ENDC} {SCALE}") - print(f"\t{Colors.BLUE}TH_NAME: {Colors.ENDC} {TH_NAME}") - DEST_PATH = os.path.dirname(args.survey_file) - print(f"\t{Colors.BLUE}DEST_PATH: {Colors.ENDC} {DEST_PATH}") - print(f"\t{Colors.BLUE}ABS_PATH: {Colors.ENDC} {ABS_PATH}") - - - -################################################################################################# -# Copy template folders # -################################################################################################# - - if args.update == "": - # print(f"{Colors.GREEN}Copy template folder and adapte it{Colors.ENDC}") - copy_template_if_not_exists(template_path, DEST_PATH) - copy_file_with_copyright(ENTRY_FILE, DEST_PATH + "/Data", Copyright) - - # Adapte templates - config_vars = { - 'fileName': TH_NAME, - 'cavename': TH_NAME.replace("_", " "), - 'Author': Author, - 'Copyright': Copyright, - 'Scale' : SCALE, - 'Target' : TARGET, - 'map_comment' : map_comment, - 'club' : club, - 'thanksto' : thanksto.replace("_", r"\_"), - 'datat' : datat.replace("_", r"\_"), - 'wpage' : wpage.replace("_", r"\_"), - 'cs' : cs, - 'other_scraps_plan' : "", - 'file_info' : f'# File generated by pyCreate_th2.py (version {Version}) date: {datetime.now().strftime("%Y.%m.%d %H:%M:%S")}', - } - - process_template(DEST_PATH + '/template.thconfig', config_vars, DEST_PATH + '/' + TH_NAME + '.thconfig') - process_template(DEST_PATH + '/template-tot.th', config_vars, DEST_PATH + '/' + TH_NAME + '-tot.th') - process_template(DEST_PATH + '/template-readme.md', config_vars, DEST_PATH + '/readme.md') - - - - ################################################################################################# - # Produce the parsable XVI file # - ################################################################################################# - - print(f"{Colors.GREEN}Compiling 2D XVI file: \t{Colors.ENDC} {TH_NAME}") - - template = """source "{th_file}" - layout minimal - scale 1 {scale} - endlayout - - select {selector} - - export model -o "{th_name}.lox" - export map -projection plan -o "{th_name}-Plan.xvi" -layout minimal -layout-debug station-names - export map -projection extended -o "{th_name}-Extended.xvi" -layout minimal -layout-debug station-names - """ - - if args.update == "th2": - template_args = { - "th_file": DEST_PATH + "/" + TH_NAME + ".th", - "selector": survey.therion_id, - "th_name": DEST_PATH + "/" + TH_NAME, - "scale": SCALE, - } - - else : - template_args = { - "th_file": DEST_PATH + "/Data/" + TH_NAME + ".th", - "selector": survey.therion_id, - "th_name": DEST_PATH + "/Data/" + TH_NAME, - "scale": SCALE, - } - - log, tmpdir = compile_template(template, template_args, cleanup=False, therion_path=therion_path) - -################################################################################################# -# Parse the Plan XVI file # -################################################################################################# - - if args.update == "th2": - th_name_xvi = DEST_PATH + "/" + TH_NAME + "-Plan.xvi" - else : - th_name_xvi = DEST_PATH + "/Data/" + TH_NAME + "-Plan.xvi" - - print(f"{Colors.GREEN}Parsing plan XVI file:\t{Colors.ENDC}{th_name_xvi}") - - stations = {} - lines = [] - - with open(join(th_name_xvi), "r", encoding="utf-8") as f: - xvi_content = f.read() - xvi_stations, xvi_shots = xvi_content.split("XVIshots") - - # Extract all the stations - for line in xvi_stations.split("\n"): - match = re.search(r"{\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s([^@]+)(?:@([^\s}]*))?\s*}", line) - if match: - x = match.groups()[0] - y = match.groups()[1] - station_number = match.groups()[2] - namespace = match.groups()[3] - namespace_array = namespace.split(".") if namespace else [] - station = station_number - if len(namespace_array) > 1: - station = "{}@{}".format(station_number, ".".join(namespace_array[0:-1])) - stations["{}.{}".format(x, y)] = [x, y, station] - - # Extraire les valeurs x et y à partir des listes dans stations - x_values = [float(value[0]) for value in stations.values()] - y_values = [float(value[1]) for value in stations.values()] - - # Trouver les min et max de x - x_min = float(min(x_values)) - x_max = float(max(x_values)) - - # Trouver les min et max de y - y_min = float(min(y_values)) - y_max = float(max(y_values)) - - x_ecart = x_max - x_min - y_ecart = y_max - y_min - - # Afficher les résultats - # print("x_min:", x_min, "x_max:", x_max) - # print("y_min:", y_min, "y_max:", y_max) - # print("Écart max-min pour x:", x_ecart) - # print("Écart max-min pour y:", y_ecart) - - # Extract all the lines - for line in xvi_shots.split("\n"): - match = re.search(r"^\s*{\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s*.*}", line ) - if match: - x1 = match.groups()[0] - y1 = match.groups()[1] - x2 = match.groups()[2] - y2 = match.groups()[3] - key1 = "{}.{}".format(x1, y1) - key2 = "{}.{}".format(x2, y2) - # Splays won't have stations - station1 = stations[key1][2] if key1 in stations else None - station2 = stations[key2][2] if key2 in stations else None - lines.append([x1, y1, x2, y2, station1, station2]) - # shutil.rmtree(tmpdir) - if args.update == "th2": - th2_name = DEST_PATH + "/" + TH_NAME - else : - th2_name = DEST_PATH + "/Data/" + TH_NAME - output_path = f'{th2_name}-{PROJECTION}.{FORMAT}' - - scrap_to_add = int(len(stations)/station_by_scrap)-1 - - # print(stations) - - print(f"{Colors.GREEN}Writing output to:\t{Colors.ENDC}{output_path}") - - # Write TH2 - if FORMAT == "th2": - th2_file_header = """encoding utf-8""" - - th2_file = """ -##XTHERION## xth_me_area_adjust {X_Min} {Y_Min} {X_Max} {Y_Max} -##XTHERION## xth_me_area_zoom_to 100 -##XTHERION## xth_me_image_insert {insert_XVI} - -{Copyright} -# File generated by pyCreate_th2.py version {version} date: {date} - -# x_min: {X_Min}, x_max: {X_Max} ecart : {X_Max_X_Min} -# y_min: {Y_Min}, y_max: {Y_Max} ecart : {Y_Max_Y_Min} - -scrap S{projection_short}-{name}_01 -station-names "" "@{name}" -projection {projection} -author {year} "{author}" -copyright {year} "{Copyright_Short}" - -{points} - -{names} - -{lines} - -endscrap""" - - th2_point = """ point {x} {y} station -name {station}""" - th2_name = """ point {x} {y} station-name -align tr -scale xs -text {station}""" - - th2_line = """ line u:Shot_Survey - {x1} {y1} - {x2} {y2} - - endline""" - - seen = set() - th2_lines = [] - th2_points = [] - th2_names = [] - other_scraps_plan = "" - - for line in lines: - th2_lines.append(th2_line.format(x1=line[0], y1=line[1], x2=line[2], y2=line[3])) - coords1 = "{}.{}".format(line[0], line[1]) - - if coords1 not in seen: - seen.add(coords1) - th2_points.append(th2_point.format(x=line[0], y=line[1], station=line[4])) - th2_names.append(th2_name.format(x=line[0], y=line[1], station=line[4])) - coords2 = "{}.{}".format(line[2], line[3]) - - if "{}.{}".format(line[2], line[3]) not in seen: - seen.add(coords2) - if line[5] != None: - th2_points.append(th2_point.format(x=line[2], y=line[3], station=line[5])) - th2_names.append(th2_name.format(x=line[2], y=line[3], station=line[5])) - - - if isfile(output_path): - print(f"{Colors.WARNING}Warning: {Colors.ENDC}{os.path.basename(output_path)}{Colors.WARNING} file already exists - nothing done{Colors.ENDC}") - - else : - name = TARGET, - # print(f"{Colors.GREEN}Therion output path :\t{Colors.ENDC}{output_path}") - - with open(str(output_path), "w+") as f: - f.write(th2_file_header) - f.write(th2_file.format( - name = name[0], - Copyright = Copyright, - Copyright_Short = Copyright_Short, - points="\n".join(th2_points), - lines="\n".join(th2_lines) if LINES else "", - names="\n".join(th2_names) if NAMES else "", - projection=PROJECTION.lower(), - projection_short=PROJECTION[0].upper(), - author=Author, - year=datetime.now().year, - version = Version, - date=datetime.now().strftime("%Y.%m.%d-%H:%M:%S"), - X_Min=x_min*1.2, - X_Max=x_max*1.2, - Y_Min=y_min*1.2, - Y_Max=y_max*1.2, - X_Max_X_Min =x_ecart, - Y_Max_Y_Min =y_ecart, - insert_XVI = "{" + stations[next(iter(stations))][0] + "1 1.0} {" - + stations[next(iter(stations))][1] + " " - + stations[next(iter(stations))][2] +"} " - + os.path.basename(th_name_xvi) + " 0 {}", - ) - ) - if scrap_to_add >= 1 : - for i in range(scrap_to_add): - other_scraps_plan = other_scraps_plan + f"\tbreak\n\tS{PROJECTION[0].upper()}-{name[0]}_{i+2:02}\n" - th2_scrap = """ - -scrap S{projection_short}-{name}_{num:02} -station-names "" "@{name}" -projection {projection} -author {year} "{author}" -copyright {year} "{Copyright_Short}" - -endscrap - -""" - f.write(th2_scrap.format( - name=name[0], - projection=PROJECTION.lower(), - projection_short=PROJECTION[0].upper(), - author=Author, - year=datetime.now().year, - Copyright_Short = Copyright_Short, - num=f"{i+2:02}", - ) - ) - - -################################################################################################# -# Parse the Extended XVI file # -################################################################################################# - if args.update == "th2": - th_name_xvi = DEST_PATH + "/" + TH_NAME + "-Extended.xvi" - else : - th_name_xvi = DEST_PATH + "/Data/" + TH_NAME + "-Extended.xvi" - - print(f"{Colors.GREEN}Parsing extended XVI file:\t{Colors.ENDC}{th_name_xvi}") - - # Parse the Extended XVI file - stations = {} - lines = [] - - with open(join(th_name_xvi), "r", encoding="utf-8") as f: - xvi_content = f.read() - xvi_stations, xvi_shots = xvi_content.split("XVIshots") - - # Extract all the stations - for line in xvi_stations.split("\n"): - match = re.search(r"{\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s([^@]+)(?:@([^\s}]*))?\s*}", line) - if match: - x = match.groups()[0] - y = match.groups()[1] - station_number = match.groups()[2] - namespace = match.groups()[3] - namespace_array = namespace.split(".") if namespace else [] - station = station_number - if len(namespace_array) > 1: - station = "{}@{}".format(station_number, ".".join(namespace_array[0:-1])) - stations["{}.{}".format(x, y)] = [x, y, station] - - # Extraire les valeurs x et y à partir des listes dans stations - x_values = [float(value[0]) for value in stations.values()] - y_values = [float(value[1]) for value in stations.values()] - - # Trouver les min et max de x - x_min = float(min(x_values)) - x_max = float(max(x_values)) - - # Trouver les min et max de y - y_min = float(min(y_values)) - y_max = float(max(y_values)) - - x_ecart = x_max - x_min - y_ecart = y_max - y_min - - # Afficher les résultats - # print("x_min:", x_min, "x_max:", x_max) - # print("y_min:", y_min, "y_max:", y_max) - # print("Écart max-min pour x:", x_ecart) - # print("Écart max-min pour y:", y_ecart) - - # Extract all the lines - for line in xvi_shots.split("\n"): - match = re.search(r"^\s*{\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s*(-?\d+\.\d+)\s*.*}", line ) - if match: - x1 = match.groups()[0] - y1 = match.groups()[1] - x2 = match.groups()[2] - y2 = match.groups()[3] - key1 = "{}.{}".format(x1, y1) - key2 = "{}.{}".format(x2, y2) - # Splays won't have stations - station1 = stations[key1][2] if key1 in stations else None - station2 = stations[key2][2] if key2 in stations else None - lines.append([x1, y1, x2, y2, station1, station2]) - shutil.rmtree(tmpdir) - - if args.update == "th2": - th2_name = DEST_PATH + "/" + TH_NAME - else : - th2_name = DEST_PATH + "/Data/" + TH_NAME - output_path = f'{th2_name}-Extended.{FORMAT}' - - print(f"{Colors.GREEN}Writing output to:\t\t{Colors.ENDC}{output_path}") - - # Write TH2 - if FORMAT == "th2": - th2_file_header = """encoding utf-8""" - - th2_file = """ -##XTHERION## xth_me_area_adjust {X_Min} {Y_Min} {X_Max} {Y_Max} -##XTHERION## xth_me_area_zoom_to 100 -##XTHERION## xth_me_image_insert {insert_XVI} - -{Copyright} -# File generated by pyCreate_th2.py version {version} date: {date} - -# x_min: {X_Min}, x_max: {X_Max} ecart : {X_Max_X_Min} -# y_min: {Y_Min}, y_max: {Y_Max} ecart : {Y_Max_Y_Min} - -scrap SC-{name}_01 -station-names "" "@{name}" -projection extended -author {year} "{author}" -copyright {year} "{Copyright_Short}" - -{points} - -{names} - -{lines} - -endscrap""" - - th2_point = """ point {x} {y} station -name {station}""" - th2_name = """ point {x} {y} station-name -align tr -scale xs -text {station}""" - - th2_line = """ line u:Shot_Survey - {x1} {y1} - {x2} {y2} - endline - """ - - seen = set() - th2_lines = [] - th2_points = [] - th2_names = [] - other_scraps_extended = "" - - for line in lines: - th2_lines.append(th2_line.format(x1=line[0], y1=line[1], x2=line[2], y2=line[3])) - coords1 = "{}.{}".format(line[0], line[1]) - - if coords1 not in seen: - seen.add(coords1) - th2_points.append(th2_point.format(x=line[0], y=line[1], station=line[4])) - th2_names.append(th2_name.format(x=line[0], y=line[1], station=line[4])) - coords2 = "{}.{}".format(line[2], line[3]) - - if "{}.{}".format(line[2], line[3]) not in seen: - seen.add(coords2) - if line[5] != None: - th2_points.append(th2_point.format(x=line[2], y=line[3], station=line[5])) - th2_names.append(th2_name.format(x=line[2], y=line[3], station=line[5])) - - - if isfile(output_path): - print(f"{Colors.WARNING}Warning: {Colors.ENDC}{os.path.basename(output_path)}{Colors.WARNING} file already exists - nothing done{Colors.ENDC}") - else : - name = TARGET, - # print(f"{Colors.GREEN}Therion output path :\t{Colors.ENDC}{output_path}") - - with open(str(output_path), "w+") as f: - f.write(th2_file_header) - f.write(th2_file.format( - name = name[0], - Copyright = Copyright, - Copyright_Short = Copyright_Short, - points="\n".join(th2_points), - lines="\n".join(th2_lines) if LINES else "", - names="\n".join(th2_names) if NAMES else "", - projection="extended", - projection_short="C", - author=Author, - year=datetime.now().year, - version = Version, - date=datetime.now().strftime("%Y.%m.%d-%H:%M:%S"), - X_Min=x_min*1.2, - X_Max=x_max*1.2, - Y_Min=y_min*1.2, - Y_Max=y_max*1.2, - X_Max_X_Min =x_ecart, - Y_Max_Y_Min =y_ecart, - insert_XVI = "{" + stations[next(iter(stations))][0] + "1 1.0} {" - + stations[next(iter(stations))][1] + " " - + stations[next(iter(stations))][2] +"} " - + os.path.basename(th_name_xvi) + " 0 {}", - ) - ) - if scrap_to_add >= 1 : - for i in range(scrap_to_add): - other_scraps_extended = other_scraps_extended + f"\tbreak\n\tSC-{name[0]}_{i+2:02}\n" - th2_scrap = """ - -scrap SC-{name}_{num:02} -station-names "" "@{name}" -projection extended -author {year} "{author}" -copyright {year} "{Copyright_Short}" - -endscrap - -""" - f.write(th2_scrap.format( - name=name[0], - author=Author, - Copyright_Short = Copyright_Short, - year=datetime.now().year, - num=f"{i+2:02}", - ) - ) - - -################################################################################################# -# Update -maps files # -################################################################################################# - if args.update == "": - config_vars = { - 'fileName': TH_NAME, - 'Author': Author, - 'Copyright': Copyright, - 'Scale' : SCALE, - 'Target' : TARGET, - 'map_comment' : map_comment, - 'club' : club, - 'thanksto' : thanksto, - 'datat' : datat, - 'wpage' : wpage, - 'cs' : cs, - 'other_scraps_plan' : other_scraps_plan, - 'other_scraps_extended' : other_scraps_extended, - 'file_info' : f"# File generated by pyCreate_th2.py version {Version} date: {datetime.now().strftime("%Y.%m.%d-%H:%M:%S")}", - } - - process_template(DEST_PATH + '/template-maps.th', config_vars, DEST_PATH + '/' + TH_NAME + '-maps.th') - - -################################################################################################# -# Final therion compilation # -################################################################################################# - -if args.update == "": - if final_therion_exe == True: - print(f"{Colors.GREEN}Final therion compilation{Colors.ENDC}") - PATH = os.path.dirname(args.survey_file) + "/" + TH_NAME + "/" + TH_NAME + ".thconfig" - - compile_file(PATH, therion_path=therion_path) - - - - - - - - - \ No newline at end of file diff --git a/Scripts/pyCreate_th2/pyCreate_th2_VSCode.code-workspace b/Scripts/pyCreate_th2/pyCreate_th2_VSCode.code-workspace deleted file mode 100644 index d204d8d..0000000 --- a/Scripts/pyCreate_th2/pyCreate_th2_VSCode.code-workspace +++ /dev/null @@ -1,20 +0,0 @@ -{ - "folders": [ - { - "path": "." - } - ], - "settings": { - "cSpell.words": [ - "datat", - "ecart", - "ENDC", - "endlayout", - "endscrap", - "thanksto", - "thconfig", - "therion", - "wpage" - ] - } -} \ No newline at end of file diff --git a/Scripts/pyCreate_th2/requirements.txt b/Scripts/pyCreate_th2/requirements.txt deleted file mode 100644 index 515722d..0000000 --- a/Scripts/pyCreate_th2/requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -numpy -ttkthemes -matplotlib -pandas -Shapely -Fiona -pyproj -scipy -netCDF4 -xarray -joblib -geopandas -motionless -salem -configparser diff --git a/Scripts/pyCreate_th2/template/Outputs/outputs.txt b/Scripts/pyCreate_th2/template/Outputs/outputs.txt deleted file mode 100644 index 4a3b6e4..0000000 --- a/Scripts/pyCreate_th2/template/Outputs/outputs.txt +++ /dev/null @@ -1,2 +0,0 @@ -Folder where Therion outputs are exported - diff --git a/Scripts/pyCreate_th2/template/config.thc b/Scripts/pyCreate_th2/template/config.thc deleted file mode 100644 index 6281e94..0000000 --- a/Scripts/pyCreate_th2/template/config.thc +++ /dev/null @@ -1,3207 +0,0 @@ -encoding utf-8 -###################################################################################################################################### -# Version pyCreate_th2.py By Alex 2025 01 02 -###################################################################################################################################### - - - -###################################################################################################################################### -# Licence -###################################################################################################################################### -# -# Released under a Creative Commons Attribution-ShareAlike-NonCommercial License: -# Publié sous la licence Creative Commons Attribution-ShareAlike-NonCommercial: -# -# -# Written by: / Écrit par : Xavier Robert -# - -# File to set up specific settings for Therion drawing outputs -# In your *.thconfig file, you need to call this file with: -# Fichier pour définir une configuration pour les dessins de issus de Therion -# Dans votre fichier *.thconfig, vous devez appeler ce fichier avec la ligne : -# input config.thc -# and then, in each layout, you need to call the corresponding layout: -# et ensuite, dans chaque layout de votre thconfig, vous devez appeler les layouts qui vous intéressent comme par exemple : -# copy drawingconfig -# -# Lots of definition comes from (or are deeply inspired by) the excellent Therion Wiki -# Beaucoup de définitions proviennent (ou sont fortement inspirées) de l'excellent Wiki Therion -# https://therion.speleo.sk/wiki/doku.php -# https://therion.speleo.sk/wiki/tbe:wiki6 -# https://therion.speleo.sk/wiki/metapost -# https://thomas-holder.de/projects/therion/ - - -# Existing user points / nouvelles définitions de points : -# - nid/nest (u:nest) -# - gradient --> geologic dip -# - danger (u:danger) -# - chauves-souris/bats (u:bats) -# - stalactite boss (u:boss) -# - Shell/coquille fossile (u:shell) -# - Masonry/maçonnerie (u:masonry) -# - Ex voto/Signature (u:ex_voto) -# - Human bones/Ossements humains (u:human_bones) -# - Walking Caver/Spéléo qui marche (u:man_w) -# - Climbing caver/Spéléo qui grimpe (u:man_c) -# - Plan view symbol/symbole de vue en plan (u:symbol_plan) -# - extended view symbol/symbole de vue en coupe développée (u:symbol_extend) -# - entrance -# - block point -# - block user (u:block) - -# Existing user lines: -# - strate/strata (u:strata; option -clip off) -# - coupole (u:coupole; option -clip off) -# - faille/fault (u:fault; option -clip off) -# - doline (u:doline; option -clip off) -# - chauves-souris/bats (u:bats) -# - rail (u:rail) -# - plan walk/ (u:planwalk) -# - handrail/rambarde (u:handrail) -# - Surface (u:surf) -# - Dive line/fil d'Ariane (u:ariane) -# - Deviation (u:deviation) -# - rock border -# - Shot_Survey line (u:Shot_Survey) - -# Existing user areas: -# - boue/mud (u:boue) -# - guano (u:guano) -# - chauves-souris/bats (u:bats) -# - tronc/tree-trunk (u:tronc) -# - feuilles/tree-leaves (u:feuilles) -# - Tunnel initiation/Départ de galerie (u:galerie) - -# layout definition: -# - layout langue-fr -# - layout langue-es -# - layout langue-en -# - layout drawingconfig -# - layout scalebar_horiz -# - layout scalebar_vert-Halama -# - layout scalebar_vert -# - layout headerl -# - layout header_coupe_vert-to-place -# - layout header_coupe_vert-auto -# - layout header_coupe -# - layout header-plan-schema -# - layout header_coupe-schema -# - layout headeratlas -# - layout layoutmapborder -# - layout LayoutAtlasNorthArrow2 -# - layout LayoutAtlasNorthArrow -# - layout AtlasSetUp -# - layout layoutcontinuation -# - layout northarrowMG -# - layout test -# - layout depth -# - layout fonts_2000 -# - layout fonts_1000 -# - layout fonts_500 -# - layout Survey_No_Scrap - -###################################################################################################################################### -# change the names for the legend -# change les descriptions des symboles pour la légende -###################################################################################################################################### -text en "line u:rope" "rope" -text fr "line u:rope" "corde" -text es "line u:rope" "cuerda" - -text en "line u:fault" "fault" -text fr "line u:fault" "faille" -text es "line u:fault" "falla" - -text en "line u:strata" "strata" -text fr "line u:strata" "strate" -text es "line u:strata" "strata" - -text en "line u:doline" "doline" -text fr "line u:doline" "doline" -text es "line u:doline" "dolina" - -text en "point u:bats" "bat(s)" -text fr "point u:bats" "chauve-souris" -text es "point u:bats" "murciélago(s)" - -text en "line u:bats" "bat path" -text fr "line u:bats" "passage de chauve-souris" -text es "line u:bats" "ruta de murciélagos" - -text en "area u:bats" "lot of bats" -text fr "area u:bats" "beaucoup de chauve-souris" -text es "area u:bats" "muchos murciélagos" - -text fr "area u:galerie" "départ de galerie" -text en "area u:galerie" "tunnel departure" -text es "area u:galerie" "salida de galeria" - -text en "point u:guacharos" "guacharos" -text fr "point u:guacharos" "guacharos" -text es "point u:guacharos" "guacharos" - -text fr "point danger" "danger !" -text en "point danger" "danger !" -text es "point danger" "danger !" - -text en "point masonry" "masonry" -text fr "point masonry" "maçonnerie/murs" -text es "point masonry" "albañilería/muros" - -text en "point ex-voto" "ex voto" -text fr "point ex-voto" "ex voto/signature" -text es "point ex-voto" "ex voto/firma" - -text en "point human-bones" "human bones" -text fr "point human-bones" "ossements humains" -text es "point human-bones" "huesos humanos" - -text en "point u:boss" "stalagmite boss" -text fr "point u:boss" "stalagmite boss" -text es "point u:boss" "stalagmite boss" - -text fr "area u:guano" "guano" -text en "area u:guano" "guano" -text es "area u:guano" "guano" - -text fr "area u:boue" "lac de boue" -text en "area u:boue" "mud lake" -text es "area u:boue" "lago de barro" - -text fr "area u:tronc" "tronc d'arbre" -text en "area u:tronc" "Tree trunk" -text es "area u:tronc" "tronca de árbol" - -text fr "area u:feuilles" "feuilles/feuillage" -text en "area u:feuilles" "tree leaves" -text es "area u:feuilles" "Hojas de árbol" - -text en "line u:sentier" "trail" -text fr "line u:sentier" "sentier" -text es "line u:sentier" "sendero" - -text en "point u:shell" "shell" -text fr "point u:shell" "fossile" -text es "point u:shell" "fosíl" - -# Correction texte espagnol -text es "point air-draught" "corriente de aire" -text es "line rock-border" "contorno de bloque" -#text es "point water-flow" "curso de agua" -#text es "line water-flow" "curso de agua" -#text es "group water-flow" "curso de agua" -text es "point water-flow:permanent" "riachuelo" -text es "line water-flow:permanent" "riachuelo" -text es "point water-flow:intermittent" "riachuelo intermitente" -text es "line water-flow:intermittent" "riachuelo intermitente" -text es "line water-flow:conjectural" "riachuelo supuesto" - -text es "line rock-edge" "arista de bloque" -text es "point cave-pearl" "perlas de cavernas" - -text es "point rimstone-dam" "travertino" -text es "point rimstone-pool" "travertino" -text es "point stalactite" "estalactita" -text es "point stalactites" "estalactitas" -text es "point stalagmite" "estalagmita" -text es "point stalagmites" "estalagmitas" -text es "point pillars" "pilares" -text es "point pillar" "pilare" - -text fr "point traverse" "vire" -text fr "point ice-stalagmite" "stalagmite de glace" - -text fr "point u:anchor_artificial" "Ancrage artificiel" -text fr "point u:anchor_natural" "Ancrage naturel" - -text en "point u:man_w" "caver (walking)" -text fr "point u:man_w" "spéléo (marchant)" -text es "point u:man_w" "espeleológo (caminando)" - -text en "point u:man_c" "caver (climbing)" -text fr "point u:man_c" "spéléo (grimpant)" -text es "point u:man_c" "espeleológo (escalando)" - -text en "point u:symbol_plan" "" -text fr "point u:symbol_plan" "" -text es "point u:symbol_plan" "" - -text en "point u:symbol_extend" "" -text fr "point u:symbol_extend" "" -text es "point u:symbol_extend" "" - -text en "point wall-altitude" "altitude (m)" -text fr "point wall-altitude" "altitude (m)" -text es "point wall-altitude" "altura (m)" - - - -###################################################################################################################################### -### Layouts Languages/langues -###################################################################################################################################### -# Different layouts to manage languages (en, fr, es) -# In your thconfig, call the layout langue-XX where XX is en, fr or es -# You need to add one of these layout if you use the layout headerl or header_coupe -# If you want to add one of the field club, syntesys, web page, expedition, guide, -# add the following line in the code tex-map/endcode block of your layout in the thconfig -# \newtoks\YYYY \YYYY={the value of your variable} -# where YYYY = club, synth, wpage, expe or guide -# Différents layouts pour définir les langues (pour l'instant : en, fr, es) -# Dans votre thconfig, appelez le layout langue-XX où XX est en, fr ou es -# Vous devez ajouter l'un de ces layouts si vous voulez utiliser les layouts headerl ou header_coupe -# qui redéfinissent la présentation et les informations du cartouche (header). -# Si vous voulez ajouter un de ces champs club, syntesys, web page, expedition, guide, -# rajouter la ligne suivante dans le bloc code tex-map/endcode de votre layout dans votre thconfig -# (voir les exemples) -# \newtoks\YYYY \YYYY={Valeur de votre varialbe} -# où YYYY = club, synth, wpage, expe or guide -# -# You may add new fields, following the examples in the layouts. -# If you add a new field, you need to edit the layout(s) headerl and/or header_coupe -# Vous pouvez ajouter de nouveaux champs, en suivant les exemples dans les layouts suivant. -# Si vous rajouter un nouveau champ, vous devrez éditer le(s) layout(s) headerl et/ou header_coupe - -###################################################################################################################################### -layout langue-fr - # Définit la langue française - language fr - - code tex-map - % Definition of variables for the tuned headers : - \newtoks\thversiontitleB \thversiontitleB={Therion } - - \newtoks\thversiontitleA \thversiontitleA={Compilation } - \newtoks\datetitle \datetitle={le } - \newtoks\thproj \thproj={Projection } - \newtoks\thclub \thclub={Club(s) } - \newtoks\thsynth \thsynth={Synthèse } - \newtoks\thwpage \thwpage={Page internet } - \newtoks\thexpe \thexpe={Expedition } - \newtoks\thguide \thguide={Guide(s) } - \newtoks\thdatat \thdatat={Données topographiques } - \newtoks\depthrangetitle \depthrangetitle={Depth range from } - \newtoks\ththanksto \ththanksto{Remerciements } - \newtoks\thcoords \thcoords{Coordonnées} - \newtoks\explolengthtitle \explolengthtitle{Longueur explorée } - \newtoks\explodepthtitle \explodepthtitle{\thinspace{}---\thinspace{}\thinspace{}\thinspace{}\thinspace{}Profondeur explorée } - - # Initiate variables - \newtoks\club \club={} - \newtoks\synth \synth={} - \newtoks\wpage \wpage={} - \newtoks\expe \expe={} - \newtoks\guide \guide={} - \newtoks\datat \datat={} - \newtoks\thanksto \thanksto={} - \newtoks\ECoordinates \ECoordinates={} - - endcode -endlayout - -###################################################################################################################################### -layout langue-es - # Definición del idioma español - language es - - code tex-map - % Definition of variables for the tuned headers : - \newtoks\thversiontitleB \thversiontitleB={Therion } - - \newtoks\thversiontitleA \thversiontitleA={Compilación} - \newtoks\datetitle \datetitle={el } - \newtoks\thproj \thproj={Proyección} - \newtoks\thclub \thclub={Club(es)} - \newtoks\thsynth \thsynth={Síntesis} - \newtoks\thwpage \thwpage={Página web} - \newtoks\thexpe \thexpe={Expedición} - \newtoks\depthrangetitle \depthrangetitle={Depth range from } - \newtoks\thguide \thguide={Guia(s)} - \newtoks\thdatat \thdatat={Datos topograficas} - \newtoks\ththanksto \ththanksto{Nuestros agradecimientos } - \newtoks\thcoords \thcoords{Coordinadas GPS (WGS84) } - \newtoks\explolengthtitle \explolengthtitle{Longitud explorada} - \newtoks\explodepthtitle \explodepthtitle{\thinspace{}---\thinspace{}\thinspace{}\thinspace{}\thinspace{}Profondidad explorada} - - \cartotitle={Dibujo} - - # Initiate variables - \newtoks\club \club={} - \newtoks\synth \synth={} - \newtoks\wpage \wpage={} - \newtoks\expe \expe={} - \newtoks\guide \guide={} - \newtoks\datat \datat={} - \newtoks\thanksto \thanksto={} - \newtoks\ECoordinates \ECoordinates={} - - endcode - -endlayout - -###################################################################################################################################### -layout langue-en - # Set the language english - language en - - code tex-map - % Definition of variables for the tuned headers : - \newtoks\thversiontitleB \thversiontitleB={Therion } - - \newtoks\thversiontitleA \thversiontitleA={Compiled} - \newtoks\datetitle \datetitle={on } - \newtoks\thproj \thproj={Projection} - \newtoks\thclub \thclub={Club(s)} - \newtoks\thsynth \thsynth={Synthesys} - \newtoks\thwpage \thwpage={Web page} - \newtoks\thexpe \thexpe={Expedition} - \newtoks\depthrangetitle \depthrangetitle={Depth range from } - \newtoks\thguide \thguide={Guide(s)} - \newtoks\thdatat \thdatat={Survey's data} - \newtoks\ththanksto \ththanksto{Acknowledgments } - \newtoks\thcoords \thcoords{GPS coordinates (WGS84) } - \newtoks\explolengthtitle \explolengthtitle{Explored length} - \newtoks\explodepthtitle \explodepthtitle{\thinspace{}---\thinspace{}\thinspace{}\thinspace{}\thinspace{}Explored depth} - - # Initiate variables - \newtoks\club \club={} - \newtoks\synth \synth={} - \newtoks\wpage \wpage={} - \newtoks\expe \expe={} - \newtoks\guide \guide={} - \newtoks\datat \datat={} - \newtoks\thanksto \thanksto={} - \newtoks\ECoordinates \ECoordinates={} - - endcode - -endlayout - -### End of the layouts languages -### Fin des layouts languages -#______________________________ - -###################################################################################################################################### -###################################################################################################################################### -layout drawingconfig - # Layout to draw the map and extended view. - # Layout pour dessiner les plans et les coupes développées. - - # pdf-Author - # Auteur du pdf - doc-author "Xavier Robert" - - # Set the symology you want to use: UIS, ASF (Australie) CCNP (Etats Units), SKB (tchecoslovakia) - # Définit la banque de symboles que nous voulons utiliser : - # UIS, ASF (Australie) CCNP (Etats Units) ou SKB (tchecoslovakia) - #symbol-set UIS - # Change the type or colors of specific symbols: - # Changer le type ou la couleur de symboles spécifiques: - - - symbol-assign area sand AUT - symbol-assign point pillar AUT - symbol-assign point station:temporary SKBB - symbol-assign point entrance MY - #symbol-assign point entrance UIS - - - symbol-color area clay [52 33 6] # Color to verify - symbol-color area flowstone [100 60 20] - symbol-color area ice [0 0 100] - symbol-color area moonmilk [100 60 20] # Change the color ? - symbol-color area mudcrack [52 33 6] # Color to verify ; Maybe to darken - symbol-color area pillar [100 60 20] - symbol-color area pillar-with-curtains [100 60 20] - symbol-color area sand [67 49 1] # Color to verify - symbol-color area snow [0 0 100] - symbol-color area stalactite [100 60 20] - symbol-color area stalactite-stalagmite [100 60 20] - symbol-color area stalagmite [100 60 20] - - symbol-color line contour [34 21 3] # Marron : (87, 56, 8) - symbol-color line ceiling-meander [34 21 3] # Marron : (87, 56, 8) - symbol-color line flowstone [100 60 20] - symbol-color line floor-meander [34 21 3] # Marron : (87, 56, 8) - symbol-color line floor-step [34 21 3] # Marron : (87, 56, 8) - symbol-color line map-connection [69 69 69] # Gris acier (175, 175, 175) - symbol-color line rimstone-dam [100 60 20] - symbol-color line rimstone-pool [100 60 20] - symbol-color line rock-border [34 21 3] # Marron : (87, 56, 8) - symbol-color line rock-edge [34 21 3] # Marron : (87, 56, 8) - symbol-color line slope [34 21 3] # Marron : (87, 56, 8) - symbol-color line rope [58 44 25] - symbol-color line survey [46 46 46] # Gris foncé (117, 117, 117) / acier (175, 175, 175) - symbol-color line wall:clay [52 33 6] # Color to verify - symbol-color line wall:flowstone [100 60 20] - symbol-color line wall:ice [0 0 100] - symbol-color line wall:moonmilk [100 60 20] # Change the color ? - symbol-color line water-flow [17 46 100] - symbol-color line water-flow:conjectural [17 46 100] - symbol-color line water-flow:intermittent [17 46 100] - - symbol-color point altitude [100 50 0] - symbol-color point aragonite [100 60 20] - symbol-color point blocks [34 21 3] # Marron : (87, 56, 8) - symbol-color point breakdown-choke [34 21 3] # Marron : (87, 56, 8) - symbol-color point cave-pearl [100 60 20] - symbol-color point clay [52 33 6] # Color to verify - symbol-color point clay-choke [52 33 6] # Color to verify - symbol-color point curtain [100 60 20] - symbol-color point curtains [100 60 20] - symbol-color point disc-pillar [100 60 20] - symbol-color point disc-pillars [100 60 20] - symbol-color point disc-stalactite [100 60 20] - symbol-color point disc-stalactites [100 60 20] - symbol-color point disc-stalagmite [100 60 20] - symbol-color point disc-stalagmites [100 60 20] - symbol-color point disk [100 60 20] - symbol-color point flowstone [100 60 20] - symbol-color point flowstone-choke [100 60 20] - symbol-color point helictite [100 60 20] - symbol-color point helictites [100 60 20] - symbol-color point ice [0 0 100] - symbol-color point ice-pillar [0 0 100] - symbol-color point ice-stalactite [0 0 100] - symbol-color point ice-stalagmite [0 0 100] - symbol-color point moonmilk [100 60 20] # Change the color ? - symbol-color point mud [52 33 6] # Color to verify - symbol-color point mudcrack [52 33 6] # Color to verify - symbol-color point pillar [100 60 20] - symbol-color point pillar-with-curtains [100 60 20] - symbol-color point pillars [100 60 20] - symbol-color point pillars-with-curtains [100 60 20] - symbol-color point popcorn [100 60 20] - symbol-color point rimstone-dam [100 60 20] - symbol-color point root [52 33 6] - - symbol-color point seed-germination [13 47 6] - symbol-color point snow [0 0 100] - symbol-color point soda-straw [100 60 20] - symbol-color point spring [17 46 100] - symbol-color point stalactite [100 60 20] - symbol-color point stalactite-stalagmite [100 60 20] - symbol-color point stalactite-stalagmite [100 60 20] - symbol-color point stalactites [100 60 20] - symbol-color point stalactites-stalagmites [100 60 20] - symbol-color point stalactites-stalagmites [100 60 20] - symbol-color point stalagmite [100 60 20] - symbol-color point stalagmites [100 60 20] - symbol-color point station [54 7 60] - symbol-color point station-name [80 80 80] # light grey - symbol-color point vegetable-debris [13 47 6] - symbol-color point volcano [52 33 6] # Color to verify - symbol-color point wall-altitude [100 50 0] - symbol-color point wall-calcite [100 60 20] - symbol-color point water [17 46 100] - symbol-color point water-drip [17 46 100] - symbol-color point water-flow [17 46 100] - symbol-color point water-flow:intermittent [17 46 100] - symbol-color point water-flow:paleo [17 46 100] - - ####### Metapost-changes ############ - code metapost - - #fonts_setup( 12, 16, 32, 64, 96 ); - - # Modify length/depth statistics to print - # Modifier l'aspect et les données des statistiques de longueur affichées si besoin - #code tex-map - # \cavelength{1330\thinspace{}m} - # + 150\thinspace{}m estimes} - # \cavedepth{243\thinspace{}m} - #endcode - - # Change the entrance symbole - # Changer le symbole d'entrée - def p_entrance_MY (expr pos,theta,sc,al)= - U:=(0.0u,0.0u); - T:=identity aligned al rotated 0.0 scaled sc shifted pos; - path p; - p = (-.3u,-.25u) -- (-.2u,-.25u){dir 135} .. (0u, .25u) .. {dir 225}(.2u,-.25u) -- (.3u,-.25u); - thdraw p withpen PenA; - thdraw unitsquare scaled 1.2u shifted (-0.6u,-0.6u) rotated 0.0 withpen PenD; - enddef; - - initsymbol("p_entrance_MY"); - - # Define Shot_Survey (u:Shot_Survey) in thin red - # Définition de la ligne file d'Shot_Survey en rouge fin - def l_u_Shot_Survey (expr Path) = - T:=identity; - pickup PenA; - draw Path withcolor black; - enddef; - - - # Change the block symbole - # Changer le symbole de block - def p_blocks (expr pos,theta,sc,al)= - base_symbolsize :=0.30u; %Factor*u; Factor=size of the blocks - size_factor := 0.5 + uniformdeviate 0.5; % Pour le polygone principal - symbolsize := base_symbolsize * size_factor; - U:=(.5u,.5u); - random_theta := uniformdeviate 360; - T:=identity aligned al rotated random_theta scaled sc shifted pos; - pickup PenC; - thfill (.0symbolsize,.0symbolsize)--(1.0symbolsize,-.5symbolsize)--(0.0symbolsize,-1.5symbolsize)--(-1.0symbolsize,-1.0symbolsize)--cycle withcolor (0.341117, 0.219607, 0.031372) withalpha 0.6; - thdraw (.0symbolsize,.0symbolsize)--(1.0symbolsize,-.5symbolsize)--(0.0symbolsize,-1.5symbolsize)--(-1.0symbolsize,-1.0symbolsize)--cycle withcolor (0.341117, 0.219607, 0.031372); - thfill (.5symbolsize,-.25symbolsize)--(1.0symbolsize,.5symbolsize)--(0.0symbolsize,1.5symbolsize)--(-0.5symbolsize,.5symbolsize)--cycle withcolor (0.341117, 0.219607, 0.031372) withalpha 0.4; - thdraw (.5symbolsize,-.25symbolsize)--(1.0symbolsize,.5symbolsize)--(0.0symbolsize,1.5symbolsize)--(-0.5symbolsize,.5symbolsize)--cycle withcolor (0.341117, 0.219607, 0.031372); - thfill (.0symbolsize,.0symbolsize)--(.0symbolsize,.5symbolsize)--(-1.5symbolsize,.5symbolsize)--(-1.5symbolsize,-0.5symbolsize)--(-0.5symbolsize,-0.5symbolsize)--cycle withcolor (0.341117, 0.219607, 0.031372) withalpha 0.5; - thdraw (.0symbolsize,.0symbolsize)--(.0symbolsize,.5symbolsize)--(-1.5symbolsize,.5symbolsize)--(-1.5symbolsize,-0.5symbolsize)--(-0.5symbolsize,-0.5symbolsize)--cycle withcolor (0.341117, 0.219607, 0.031372); - enddef; - - # Change the rock bordersymbole - # Changer le symbole des ligne rock border - def l_rockborder (expr p) = - % Vérifie si le chemin est fermé - %if p[0] = point infinity of p: - % Remplit la zone avec une couleur si le chemin est fermé - %fill p withcolor (0.34, 0.21, 0.3); - - %draw p withcolor 0.5green; - %fi; - thfill p --cycle withcolor (0.341117, 0.219607, 0.031372) withalpha 0.5; - thdraw p --cycle withcolor (0.341117, 0.219607, 0.031372); - % Dessine la bordure de la ligne (même si elle n'est pas fermée) - %draw p withcolor (0.34, 0.21, 0.3); - enddef; - - - def p_u_block(expr pos,theta,sc,al) = - T:=identity aligned al rotated theta scaled sc shifted pos; - path p q; - p := (2.3u,0.9u)--(0.65u,1u)--(-0.9u,0.6u)--(-2.15u,-0.1u)--(-2.35u,-0.25u)--(-2.5u,-0.5u)--(-2u,-0.65u)--(-0.75u,-0.65u)--(0.6u,-0.7u)--(1.1u,-0.5u)--(2.1u,-0.15u)--cycle; - pickup PenB; - thdraw p; - % The following line uses the code from Colour Dependant Visualization of Symbols by Bruce Mutton - if known colour_block_bg: thfill p withcolor colour_block_bg; else: thfill p withcolor (0.75,0.75,0.75); fi; - q := (-2.5u,-0.5u)--(-2u,-0.65u)--(-0.75u,-0.65u)--(0.6u,-0.7u)--(1.1u,-0.5u)--(2.1u,-0.15u)--(2.3u,0.9u)--(2.5u,0.7u)--(2.5u,0.5u)--(2.25u,-0.9u)--(1.1u,-1.3u)--(0.5u,-1.5u)--(-0.75u,-1.4u)--(-2u,-1.15u)--(-2.35u,-0.65u)--cycle; - thdraw q; - thfill q withcolor(0.6,0.6,0.6); - pickup PenD; - path p; - p := (-2u,-0.65u)--(-1.9u,-1u); - thdraw p; - path p; - p := (0.6u,-0.7u)--(0.5u,-1.3u); - thdraw p; - path p; - p := (2.1u,-0.15u)--(2.3u,-0.4u); - thdraw p; - enddef; - - initsymbol("p_u_block"); - - - - # Change the dashed line for the line wall:presumed - # Changer la ligne pointillée du symbole line wall:presumed - def l_wall_presumed (expr P) = - T:=identity; - pickup PenA; - # Old definition - #thdraw P dashed evenly scaled (2*optical_zoom); - # New definition - thdraw P dashed evenly scaled (.1u); - enddef; - - # Change the dashed line for the line chimney - # Changer la ligne pointillée du symbole line chemney (cheminée) - def l_chimney (expr P) = - T:=identity; - pickup PenC; - %thdraw P dashed evenly scaled optical_zoom; - thdraw P dashed evenly scaled (.05u); - enddef; - - # To change blocs size in the area blocks - # Pour modifier la taille des blocs dans l'aire blocks - def a_blocks (expr p) = - T:=identity; - pickup PenC; - path q, qq; q = bbox p; - picture tmp_pic; - uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart llcorner q)/100); - tmp_pic := image( - for i = xpart llcorner q step 1.0uu until xpart urcorner q: - for j = ypart llcorner q step 1.0uu until ypart urcorner q: - qq := punked (((-.3uu,-.3uu)--(.3uu,-.3uu)--(.3uu,.3uu)--(-.3uu,.3uu)--cycle) - randomized (uu/2)) - rotated uniformdeviate(360) - shifted ((i,j) randomized 1.0uu); - if xpart (p intersectiontimes qq) < 0: - thclean qq; - thdraw qq; - fi; - endfor; - endfor; - ); - clip tmp_pic to p; - draw tmp_pic; - enddef; - - # To change sand aspects - # Pour modifier les aspects du sable dans l'aire associée - def a_sands (expr p) = - T:=identity; - pickup PenC; - path q; q = bbox p; - picture tmp_pic; - tmp_pic := image( - for i = xpart llcorner q step 0.1u until xpart urcorner q: - for j = ypart llcorner q step 0.1u until ypart urcorner q: - draw origin shifted ((i,j) randomized 0.1u) withpen PenC; - endfor; - endfor; - ); - #clip tmp_pic to p; - draw tmp_pic; - enddef; - - # To change pebbles aspects - # Pour modifier l'aspects de l'aire pebbles (galets) - def a_pebbles_SKBB (expr p) = - T:=identity; - pickup PenC; - path q, qq; q = bbox p; - picture tmp_pic; - tmp_pic := image( - for i = xpart llcorner q step .1u until xpart urcorner q: - for j = ypart llcorner q step .5u until ypart urcorner q: - qq := (superellipse((.07u,0),(0,.03u), (-.07u,0),(0,.-.03u),.75)) - %randomized (u/25) - rotated uniformdeviate(360) - shifted ((i,j) randomized 0.27u); - if xpart (p intersectiontimes qq) < 0: - thdraw qq; - fi; - endfor; - endfor; - ); - clip tmp_pic to p; - draw tmp_pic; - enddef; - - # To change slopes aspects - # Pour modifier la ligne aspects - def l_slope (expr P,S)(text Q) = - %show Q; - T:=identity; - numeric dirs[]; - numeric lengths[]; - for i=Q: - dirs[redpart i]:=greenpart i; - lengths[redpart i]:=bluepart i; - endfor; - li:=length(P); % last - alw_perpendicular:=true; - for i=0 upto li: - if unknown dirs[i]: dirs[i]:=-1; - else: - if dirs[i]>-1: - dirs[i]:=((90-dirs[i]) - angle(thdir(P,i))) mod 360; - alw_perpendicular:=false; - fi; - fi; - if unknown lengths[i]: lengths[i]:=-1; fi; - endfor; - %for i=0 upto li: show dirs[i]; endfor; - ni:=0; % next - pi:=0; % previous - for i=0 upto li: - d:=dirs[i]; - if d=-1: - if (i=0) or (i=li): - dirs[i] := angle(thdir(P,i) rotated 90) mod 360; - pi:=i; - else: - if ni<=i: - for j=i upto li: - ni:=j; - exitif dirs[j]>-1; - endfor; - fi; - w:=arclength(subpath(pi,i) of P) / - arclength(subpath(pi,ni) of P); - dirs[i]:=w[dirs[pi],dirs[ni]]; - %if (dirs[i]-angle(thdir(P,i))) mod 360>180: - %dirs[i]:=w[dirs[ni],dirs[pi]]; - %message("*******"); - %fi; - fi; - else: - pi:=i; - fi; - endfor; - %for i=0 upto li: show dirs[i]; endfor; - ni:=0; % next - pi:=0; % previous - for i=0 upto li: - l:=lengths[i]; - if l=-1: - if (i=0) or (i=li): - lengths[i] := 1cm; % should never happen! - thwarning("slope width at the end point not specified"); - pi:=i; - else: - if ni<=i: - for j=i+1 upto li: - ni:=j; - exitif lengths[j]>-1; - endfor; - fi; - w:=arclength(subpath(pi,i) of P) / - arclength(subpath(pi,ni) of P); - lengths[i]:=w[lengths[pi],lengths[ni]]; - pi:=i; - fi; - else: - pi:=i; - fi; - endfor; - %for i=0 upto li: show lengths[i]; endfor; - T:=identity; - boolean par; - cas := 0.3u; - krok := 0.7u; - dlzka := (arclength P); - if dlzka>3u: dlzka:=dlzka-0.6u fi; - mojkrok:=adjust_step(dlzka,1.4u) / 5; - pickup PenD; - par := false; - forever: - t := arctime cas of P; - if t mod 1>0: % not a key point - w := (arclength(subpath(floor t,t) of P) / - arclength(subpath(floor t,ceiling t) of P)); - if alw_perpendicular: - a := 90; - else: - a := w[dirs[floor t],dirs[ceiling t]]; - fi; - l := w[lengths[floor t],lengths[ceiling t]]; - else: - if alw_perpendicular: - a := 90; - else: - a:= dirs[t]; - fi; - l:=lengths[t]; - fi; - a := a + angle(thdir(P,t)); - thdraw (point t of P) -- ((point t of P) + if par: 0.333 * fi l * unitvector(dir(a))); - cas := cas + mojkrok; - par := not par; - exitif cas > dlzka + .3u + (krok / 3); % for rounding errors - endfor; - if S = 1: pickup PenC; draw P fi; - %pickup pencircle scaled 3pt; - %for i=0 upto li: draw point i of P; endfor; - enddef; - - # To change color of Mud area - # Pour modifier la couleur de l'aire Boue - def a_u_boue (expr p) = - T:=identity; - #thfill p withcolor (0.22, 0.22, 0.95); - #126, 51, 0 - thfill p withcolor (0.49, 0.20, 0.00); - enddef; - - # To change color of Sump - # Pour modifier la couleur de l'aire siphon - def a_sump (expr p) = - T:=identity; - #thfill p withcolor (0.22, 0.22, 0.95); - thfill p withcolor (0.06, 0.20, 0.65); - enddef; - - # To change color of guano - # Pour modifier la couleur de l'aire guano - def a_u_guano (expr p) = - T:=identity; - thfill p withcolor (0.53, 0.26, 0.11); - enddef; - - # To change color of a tree-trunk - # I advise to use a line "border" to delimit the area - # If used with tree-leaves, add the option -place top - # Pour modifier la couleur de l'aire tronc - # Je suggère d'utiliser une ligne "border/bord" pour délimiter l'aire - # Si utilisé conjointement avec l'aire feuilles d'arbres, utiliser l'option -place top - def a_u_tronc (expr p) = - T:=identity; - thfill p withcolor (0.62, 0.24, 0.05); - enddef; - - # To change color of a tree-leaves - # Pour modifier la couleur de l'aire feuilles d'arbre/feuillage - def a_u_feuilles (expr p) = - T:=identity; - thfill p withcolor (0.0, 1.0, 0.0); - enddef; - - # To change color of Water area - # Pour modifier la couleur de l'aire eau - def a_water (expr p) = - T:=identity; - #thfill p withcolor (0.60, 0.8, 1); - thfill p withcolor (0.17, 0.46, 1); - enddef; - - # Northarrow more funnier ! - # Pour définir une nouvelle flèche du nord - # def s_northarrow (expr rot) = - # begingroup - # interim defaultscale:=0.7; % scale your north arrow here - # #interim defaultscale:=0.5; % scale your north arrow here; 0.5 is the best value for atlas - # T:=identity scaled defaultscale rotated -rot; - # interim linecap:=squared; - # interim linejoin:=rounded; - # thfill (-.5cm,-.1cm)--(0,2.5cm)--(.5cm,-.1cm)--cycle; - # pickup pencircle scaled (0.08cm * defaultscale); - # thdraw (0,0)--(0,-2.5cm); - # pickup pencircle scaled (0.16cm * defaultscale); - # p:=(0.4cm,0.6cm); - # thdraw ((p--(p yscaled -1)--(p xscaled -1)--(p scaled -1)) shifted (0,-1.0cm)); - # label.rt(thTEX("mg") scaled 1.6, (.6cm,-1.6cm)) transformed T; - # endgroup; - # enddef; - - def s_northarrow (expr rot) = - begingroup - interim defaultscale:=0.8; % scale your north arrow here - T:=identity scaled defaultscale rotated -rot; - %noRotT:=identity scaled defaultscale 0; - pickup pencircle scaled (0.08cm * defaultscale); - - % Cercle du nord - p:=fullcircle scaled 1.6cm; - thclean p; - thdraw p withcolor black; - p:=(0.95cm,0)--(0.65cm,0); - thdraw p withcolor black; thdraw p xscaled -1 withcolor black; - - % Flèche - thdraw (-.6cm,-1.4cm)--(0,2.8cm)--(0cm, -1cm)--cycle withcolor black; - thfill (-.6cm,-1.4cm)--(0,2.8cm)--(0cm, -1cm)--cycle withcolor black withalpha 0.8; - thdraw (.6cm,-1.4cm)--(0,2.8cm)--(0cm, -1cm)--cycle withcolor black; - - % N du Nord - %pickup pencircle scaled (0.12cm * defaultscale); - %p:=(0.28cm,0.42cm); - %thdraw p--(p yscaled -1)--(p xscaled -1)--(p scaled -1) transformed T withcolor red; - label.rt(thTEX("N") scaled 1.6, (-0.2cm,0cm)) withcolor red; % transformed T; - endgroup; - enddef; - - # # Change Scale bar type - # # Pour modifier la barre d'échelle - # def s_scalebar (expr l, units, txt) = - # begingroup - # interim warningcheck:=0; - # tmpl:=l / Scale * cm * units / 2; - # tmpx:=l / Scale * cm * units / 5; - # tmph:=5bp; % bar height - # endgroup; - # pickup PenC; - # draw (-tmpl,0)--(tmpl,0)--(tmpl,-tmph)--(-tmpl,-tmph)--cycle; - # p:=(0,0)--(tmpx,0)--(tmpx,-tmph)--(0,-tmph)--cycle; - # for i:=-2.5 step 2 until 2: - # fill p shifted (i * tmpx,0); - # endfor; - # begingroup - # interim labeloffset:=3.5bp; - # for i:=0 step (l/5) until (l-1): - # tmpx:=tmpl * (i * 2 / l - 1); - # label.bot(thTEX(decimal (i)),(tmpx,-tmph)); - # endfor; - # label.bot(thTEX(decimal (l) & "\thinspace" & txt),(tmpl,-tmph)); - # % To write the scale "1:scale" uncomment it the next line: - # % Pour écrire l'échelle "1:scale" au dessus de la barre décommenter la ligne suivante : - # %label.top(thTEX("Echelle 1 : " & decimal (Scale*100)),(0,0)); - # endgroup; - # enddef; - - - # # Write the point depth (not functionning...) - # # Définir un point qui écrit la côte/profondeur (Ne fonctionne pas actuellement...) - # def p_u_prof (expr pos) = - # T:=identity shifted pos; - # pickup PenD; - # p:=(-.3u,0)--(.3u,0); - # thdraw p; thdraw p rotated 90; - # p:=fullcircle scaled .2u; - # thclean p; thdraw p; - # enddef; - # vardef p_label@#(expr txt,pos,rot,mode) = - # if mode=1: - # thdrawoptions(withcolor .8red + .4blue); - # p_u_prof(pos); - # % append "m" to label - # picture txtm; - # % calcul profondeur - # %numeric profondeur; - # profondeur:=(\thaltitude-\cavemaxz); - # picture txtprofondeur; - # txtm:=image( - # draw txt; - # interim labeloffset:=0; - # label.urt(btex \thaltitude m etex, lrcorner txt); - # %label.urt(btex \thdepth m etex, lrcorner txt); - # ); - # % give extra offset in case of l/r/t/b alignment - # pair ctmp; - # ctmp:=center thelabel@#("x", (0,0)); - # if (xpart ctmp * ypart ctmp)=0: - # interim labeloffset:=(.4u); - # else: % diagonal alignment - # interim labeloffset:=(.2u); - # fi; - # % draw label - # lab:=thelabel@#(txtm, pos); - # draw lab _thop_; % use color - # thdrawoptions(); - # bboxmargin:=0.8bp; - # write_circ_bbox((bbox lab) smoothed 2); - # else: - # if mode=7: interim labeloffset:=(u/8) fi; - # lab:=thelabel@#(txt, pos); - # if mode>1: pickup PenD fi; - # if mode=2: process_uplabel; - # elseif mode=3: process_downlabel; - # elseif mode=4: process_updownlabel; - # elseif mode=5: process_circledlabel; - # elseif mode=6: process_boxedlabel; - # elseif mode=7: process_label(pos,rot); % station name - # elseif mode=8: process_filledlabel(pos, rot); - # else: process_label(pos,rot); fi; - # fi; - # enddef; - - - - # Change the altitude definition - # This label requires to specify the position of text relative to point with - # help of -align in the options box. - # Changer la définition du point altitude - # Ce label nécessite la position spécifique de l'étiquette de texte de façon relative - # au point avec l'aide de l'option -align. - #ex: -align bottom-right/top-left/top-right/bottom-left/top/bottom/left/right... - - def p_altitude (expr pos) = - T:=identity shifted pos; - pickup PenD; - p:=(-.3u,0)--(.3u,0); - thdraw p; thdraw p rotated 90; - p:=fullcircle scaled .2u; - thclean p; thdraw p; - enddef; - - vardef p_label@#(expr txt,pos,rot,mode) = - if mode=1: - thdrawoptions(withcolor .8red + .4blue); - p_altitude(pos); - % append "m" to label - picture txtm; - txtm:=image( - draw txt; - interim labeloffset:=0; - label.urt(btex \thaltitude { m} etex, lrcorner txt); - #label.urt(btex \thheight m etex, lrcorner txt); - ); - % give extra offset in case of l/r/t/b alignment - pair ctmp; - ctmp:=center thelabel@#("x", (0,0)); - if (xpart ctmp * ypart ctmp)=0: - interim labeloffset:=(.4u); - else: % diagonal alignment - interim labeloffset:=(.2u); - fi; - % draw label - lab:=thelabel@#(txtm, pos); - draw lab _thop_; % use color - thdrawoptions(); - bboxmargin:=0.8bp; - write_circ_bbox((bbox lab) smoothed 2); - else: - if mode=7: interim labeloffset:=(u/8) fi; - lab:=thelabel@#(txt, pos); - if mode>1: pickup PenD fi; - if mode=2: process_uplabel; - elseif mode=3: process_downlabel; - elseif mode=4: process_updownlabel; - elseif mode=5: process_circledlabel; - elseif mode=6: process_boxedlabel; - elseif mode=7: process_label(pos,rot); % station name - elseif mode=8: process_filledlabel(pos, rot); - else: process_label(pos,rot); fi; - fi; - enddef; - - # For point height with P or C prefixe - # use “point 0 0 height -value [+10 m]” - # or “point 0 0 height -value [-85 m]” - # in your data to get E10 or P85 - # Pour obtenir un point de hauteur de passage avec P ou C comme préfixe - # utiliser “point 0 0 height -value [+10 m]” - # ou “point 0 0 height -value [-85 m]” - # dans les données vous donner E10 ou P85 respectivement - verbatimtex \def\thheightpos{E}\def\thheightneg{P} etex - - - # Change the altitude definition for the wall-line label (add units) - # To modify the color, you need to modify the triplets after the 3 withcolor command. - # BE CAREFUL ! Sometimes, it generates mpost errors when using point wall:altitude. - # If you get this kind of error, comment the whole p_wallaltitude definition. - # Changer la définition de l'altitude pour le label de la ligne mur (ajout de l'unité) - # Pour modifier la couleur, modifier le triplet (RGB) après les 3 commandes withcolor. - # ATTENTION ! Parfois, cette redéfinition génère des erreurs métapost. - # Si c'est le cas, commenter toute la redéfinition du point p_wallaltitude. - - #def p_wallaltitude (expr pprev,pos,pnext,txt) = - # rot:=angle(unitvector(pnext-pos)+unitvector(pos-pprev)) - 90; - # pickup PenD; - # pair zz; - # %zz:=(pos + 3*unitvector(dir rot)); - # zz:=(pos + (u/4)*unitvector(dir rot)); - # %draw (pos)--zz withcolor (0.78, 0.08, 0.52); % tic in black - # draw (pos)--zz withcolor (0.78, 0.08, 0.52); % tic in color - # % add the unit (here, meters as m) - # txtm:=image( - # %draw txt; % altitude in black - # draw txt withcolor (0.78, 0.08, 0.52); % altitude in color - # %interim labeloffset:=0; - # %label.urt(btex \thaltitude { m} etex, lrcorner txt); % unit in black - # label.urt(btex \thaltitude { m} etex, lrcorner txt) withcolor (0.78, 0.08, 0.52); % unit in color - # ); - # begingroup - # % interim labeloffset:=2pt; - # interim labeloffset:=(u/12); - # if horiz_labels: - # rot:=rot mod 360; - # if rot<=22.5: lab:=thelabel.rt(txtm, zz); - # elseif rot<=67.5: lab:=thelabel.urt(txtm, zz); - # elseif rot<=112.5: lab:=thelabel.top(txtm, zz); - # elseif rot<=157.5: lab:=thelabel.ulft(txtm, zz); - # elseif rot<=202.5: lab:=thelabel.lft(txtm, zz); - # elseif rot<=247.5: lab:=thelabel.llft(txtm, zz); - # elseif rot<=292.5: lab:=thelabel.bot(txtm, zz); - # elseif rot<=337.5: lab:=thelabel.lrt(txtm, zz); - # else: lab:=thelabel.rt(txtm, zz); - # fi; - # else: - # if (abs rot>90) and (abs rot <=270): - # rot:=rot-180; - # lab:=thelabel.lft(txtm, pos); - # else: - # lab:=thelabel.rt(txtm, pos); - # fi; - # fi; - # process_label(pos, if horiz_labels: 0 else: rot fi); - # endgroup; - #enddef; - - - - # Definition of new lines symbols - # Définition de nouveau symboles de lignes - - - # Line symbol for strata for cross sections (u:strata). It works exactly as line section - # symbol but you should use -clip off option: - # Symbole de ligne pour dessiner des strates (u:strata). - # Cela fonctionne exactement comme les autres sections de ligne - # mais vous devrez rajouter l'option -clip off: - def l_u_strata (expr P) = - T:=identity; - path Q; Q = punked P; - for t = 0 upto length P - 1: - pair zz[]; - zz1 := point t of P; - zz2 := point t+1 of P; - zz3 := postcontrol t of P; - zz4 := precontrol t+1 of P; - linecap:=0; - if (length(zz3-1/3[zz1,zz2]) > 0.1pt) or (length(zz4-2/3[zz1,zz2]) > 0.1pt): - zz5 = whatever[zz1,zz2]; - (zz3-zz5) = whatever * (zz1-zz2) rotated 90; - pickup pencircle scaled 1 mm; - draw zz1--zz5 dashed evenly; - pickup PenA; - draw zz1--zz5 withcolor background; - zz6 = whatever[zz1,zz2]; - (zz4-zz6) = whatever * (zz1-zz2) rotated 90; - pickup pencircle scaled 1 mm; - draw zz2--zz6 dashed evenly; - pickup PenA; - draw zz2--zz6 withcolor background; - else: - pickup pencircle scaled 1 mm; - draw zz1--zz2 dashed evenly; - pickup PenA; - draw zz1--zz2 withcolor background; - fi; - endfor; - enddef; - - - # Line symbol for Coupoles (u:coupole). It works exactly as line section - # Symbole de ligne pour dessiner des coupoles de plafond. - # Fonctionne comme les autres lignes - def l_u_coupole (expr P) = - T:=identity; - cas := 0; % cursor to step along path - dlzka := arclength P; - mojkrok:=adjust_step(dlzka, 0.25u); % symbol length nudged to be multiple of path length - q:= (0.10u,0.16u) -- (0.13u,0.17u); % dot - - pickup PenC; %2nd thinnest pen - forever: - t := arctime cas of P; - thdraw q rotated angle(thdir(P,t)) shifted (point t of P ); % draw dots - cas := cas + mojkrok; - exitif cas > dlzka + (mojkrok / 3); % for rounding errors - endfor; - pickup PenC; %2nd thickest pen - thdraw P; %continuous line - enddef; - - - # Line symbol for fault. - # It works exactly as line section symbol but you should use -clip off option: - # Symbole de ligne pour dessiner des failles (u:fault). - # Cela fonctionne exactement comme les autres sections de ligne - # mais vous devrez rajouter l'option -clip off: - def l_u_fault (expr P) = - T:=identity; - path Q; Q = punked P; - pickup PenA; - for t = 0 upto length P - 1: - pair zz[]; - zz1 := point t of P; - zz2 := point t+1 of P; - zz3 := postcontrol t of P; - zz4 := precontrol t+1 of P; - if (length(zz3-1/3[zz1,zz2]) > 0.1pt) or (length(zz4-2/3[zz1,zz2]) > 0.1pt): - zz5 = whatever[zz1,zz2]; - (zz3-zz5) = whatever * (zz1-zz2) rotated 90; - draw zz1--zz5 dashed evenly; - zz6 = whatever[zz1,zz2]; - (zz4-zz6) = whatever * (zz1-zz2) rotated 90; - draw zz2--zz6 dashed evenly; - else: - draw zz1--zz2 dashed evenly; - fi; - endfor; - enddef; - - - # Line symbol for the surface. - # It works exactly as line section symbol but you should use -clip off option: - # Symbole de ligne pour dessiner la surface (u:surf). - # Cela fonctionne exactement comme les autres sections de ligne - # mais vous devrez rajouter l'option -clip off: - def l_u_surf (expr P) = - T:=identity; - path Q; Q = punked P; - pickup PenC; - draw Q dashed evenly withcolor (0.5, 0, 0); - enddef; - - - # To add a doline line (u:doline); Do not forget the option -clip off ! - # Symbole de ligne pour dessiner une ligne doline (u:doline). - # Cela fonctionne exactement comme les autres sections de ligne - # mais vous devrez rajouter l'option -clip off: - def l_u_doline (expr P) = - T:=identity; - laenge:= arclength P; - symsize:=adjust_step(laenge,2u); - triangle_width:=symsize/10; - cur:=(symsize-triangle_width)/2; - pickup PenC; - forever: - t1 := arctime (cur) of P; - t := arctime (cur + triangle_width/2) of P; - t2 := arctime (cur + triangle_width) of P; - thfill (subpath (t1,t2) of P) -- - ((point t of P) + symsize/2 * unitvector(thdir(P,t) rotated 90)) -- - cycle; - thdraw (point t2 of P) --((point t of P) + symsize/2 * unitvector(thdir(P,t) rotated 90)) -- - (point t1 of P) withcolor (0.5, 0, 0); - cur := cur + symsize; - exitif cur > laenge - (1*symsize/3); % for rounding errors - t1:=arctime (cur) of P; - endfor; - enddef; - - - # Modify length/depth statistics to print - # Modifier l'aspect et les données des statistiques de longueur affichées si besoin - #code tex-map - # \cavelength{1330\thinspace{}m} - # + 150\thinspace{}m estimes} - # \cavedepth{243\thinspace{}m} - - - # Defines the gradient as geologic dip - # Définit le gradient comme pendage géologique - def p_gradient_XA (expr P,R,S,A) = - U:=(.15u, .4u); - T:=identity aligned A rotated R scaled S shifted P; - pickup PenC; - thdraw (0u, 0u) -- (0u, .4u); - thdraw (-.4u, 0u) -- (.4u, 0u); - enddef; - initsymbol ("p_gradient_XA"); - symbol-assign point gradient XA - - - # Section to define the bat symbol (point, line, area) - # Section pour définir le symbole Chauve souris utilisé en point, ligne ou aire - path bat_path_x; - bat_path_x := (160.43589,619.76148) - .. controls (200.83034,598.56215) and (225.01974,599.82632) .. (242.33709,601.15842) - .. controls (250.91988,585.02142) and (280.12279,545.7622) .. (328.92385,566.52372) - .. controls (343.18917,529.89929) and (387.77695,513.04018) .. (453.54702,518.36185) - .. controls (456.6654,525.97557) and (466.09064,533.43257) .. (471.27843,523.05007) - .. controls (463.85291,520.67657) and (466.71891,517.42483) .. (471.63814,522.23522) - .. controls (472.87859,519.83044) and (472.11254,517.25674) .. (467.00984,516.24193) - .. controls (498.08181,494.38071) and (518.37927,488.7935) .. (554.08261,484.34703) - .. controls (536.23968,468.87122) and (526.7451,451.32142) .. (536.0878,433.78585) - .. controls (539.04313,428.23891) and (549.65293,437.81051) .. (550.08905,431.99134) - .. controls (543.35122,428.68782) and (547.16851,429.31755) .. (550.93619,430.90592) - .. controls (555.01514,419.20795) and (542.29889,420.82043) .. (539.21019,422.32967) - .. controls (526.80565,412.03922) and (538.14174,362.22955) .. (562.04206,325.41289) - .. controls (560.70416,305.4475) and (552.94665,275.48765) .. (596.42383,240.15823) - .. controls (586.13796,214.86512) and (584.21841,176.344) .. (618.88684,158.99293) - .. controls (600.38363,161.42082) and (571.90452,163.00167) .. (555.87287,173.29962) - .. controls (533.80922,180.31406) and (511.7587,189.77279) .. (494.76462,217.75852) - .. controls (469.02274,260.15007) and (465.60841,280.08537) .. (466.27659,287.73284) - .. controls (467.27295,299.13663) and (456.20597,295.4343) .. (455.42733,284.84646) - .. controls (447.034,297.47822) and (465.71846,292.96944) .. (457.40227,311.17742) - .. controls (451.51715,333.88534) and (454.55183,344.68208) .. (455.22274,365.27634) - .. controls (445.59186,380.66207) and (438.52169,394.98144) .. (432.56329,406.97544) - .. controls (421.27321,411.75599) and (411.86904,413.85884) .. (403.92838,423.33244) - .. controls (391.19793,418.79449) and (380.875,414.46152) .. (373.6673,409.41976) - .. controls (365.11095,413.84661) and (372.76761,437.1554) .. (372.88328,437.30963) - -- (360.72573,447.88215) - .. controls (360.72573,447.88215) and (348.36583,439.38367) .. (342.32921,440.26049) - .. controls (340.52016,451.25937) and (343.58923,463.9528) .. (354.67087,475.2679) - .. controls (341.63825,482.57642) and (339.10347,494.24676) .. (313.80723,490.57484) - .. controls (304.61922,489.24114) and (282.31298,490.61764) .. (258.32359,496.84657) - .. controls (246.18809,499.99759) and (248.48311,482.8706) .. (236.36849,493.22467) - .. controls (239.32461,491.85429) and (242.55704,492.01948) .. (245.59044,495.64662) - .. controls (248.83726,499.52895) and (249.4495,502.08244) .. (244.59097,503.87878) - .. controls (221.93401,514.80409) and (190.83965,541.85436) .. (178.69512,574.11392) - .. controls (176.80431,577.00681) and (162.4873,600.33708) .. cycle; - path bat_path_bb; - bat_path_bb = bbox bat_path_x; - path bat_path; - bat_path = bat_path_x shifted (-(llcorner bat_path_bb) - (urcorner bat_path_bb - llcorner bat_path_bb) / 2.0) scaled (1u / ((xpart urcorner bat_path_bb) - (xpart llcorner bat_path_bb))) rotated 210; - - # Section of your layout define point u:bats symbol like this - # Pour définir le point chauve souris : u:bats - def p_u_bats(expr pos, theta, sc, al) = - T := identity shifted pos; - thfill (bat_path scaled 1.5) withcolor black; - enddef; - - # similarly the line u:bat symbol - # Idem pour la ligne - def l_u_bats(expr P) = - T:=identity; - cas := 0; - dlzka := arclength P; - mojkrok:=adjust_step(dlzka, 1.0u); - pickup PenD; - forever: - t := arctime cas of P; - thfill bat_path scaled 0.5 shifted (point t of P) withcolor black; - cas := cas + mojkrok; - exitif cas > dlzka + (mojkrok / 3); % for rounding errors - endfor; - enddef; - - # and finally the area u:bat symbol (pattern in this case) - # Et pour l'aire - % bat pattern - beginpattern(pattern_bat); - fill bat_path withcolor black; - endpattern; - - % bat area symbol - def a_u_bats (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. - # Ces symbols seront inclus dans la légende. Pour modifier la façon dont ils - # sont dessinés, juste, définissez la macro appropriée. - # Son nom doit être le nom de la macro symbol approprié avec le suffixe - # _legend. - def l_u_bats_legend = - l_u_bats(((.2,.2) -- (.8,.8)) inscale) - enddef; - - - # Definition of a stalagmite boss symbol - # Définition du point stalagmite boss - def p_u_boss (expr pos,theta,sc,al)= - T:=identity aligned al rotated theta scaled sc shifted pos; - pickup PenD; - p := (0.08u,0.25u)..(0,0.29u)..(-0.08u,0.25u); - q := (0.16u,0.5u)..(0u,0.58u)..(-0.16u,0.5u); - for i=0 upto 9: - # braun color - thdraw p rotated 36i withcolor (100, 0.6, 0.2); - thdraw q rotated 36i withcolor (100, 0.6, 0.2); - % black color - %thdraw p rotated 36i; - %thdraw q rotated 36i; - endfor - p := fullcircle scaled 0.15u; - thdraw p withcolor (100, 0.6, 0.2); - % black color - %thdraw p withcolor; - enddef; - - - # Definition of a shell limestone symbol - # Définition du point coquille fossile - def p_u_shell (expr pos,theta,sc,al)= - T:=identity shifted pos; - pickup PenB; - numeric turns, radius; - path ss, cesta; - pair za, zb; - turns = 1.55; - radius = .3u; - za = ( xpart(origin)+0, ypart(origin)+.1u ) rotated 370 turns; - zb = ( xpart(origin)+.3u, ypart(origin)+0 ) rotated 360 turns; - cesta := za--zb; - ss := (origin for t=1 upto 360 turns: -- dir t scaled t endfor) scaled (radius/turns/360); - thdraw ss withcolor (0.3); - thdraw (cesta cutbefore ss) withcolor (0.6); - enddef; - initsymbol ("p_u_shell"); - - - # Define Danger symbol - # Définition du point Danger - def p_u_danger (expr P,R,S,A)= - T:=identity aligned A rotated R scaled S shifted P; - thfill (0,-u)--(u,0)--(0,u)--(0,.9u)--(.9u,0)--(0,-.9u)--cycle; - thfill (0,-u)--(-u,0)--(0,u)--(0,.9u)--(-.9u,0)--(0,-.9u)--cycle; - thfill (.1u,-.45u)..(0,-.35u)..(-.1u,-.45u)..(0,-.55u)..cycle; - thfill (0,-.2u)..(.1u,-.1u)--(.2u,.4u)..(0,.6u)..(-.2u,.4u)--(-.1u,-.1u)..cycle; - enddef; - #initsymbol("p_entrance_MY"); - #let p_entrance = p_entrance_MY; - - - # Define dive line (u:ariane) in thin red - # Définition de la ligne file d'Ariane en rouge fin - def l_u_ariane (expr Path) = - T:=identity; - pickup PenD; - draw Path withcolor (100, 0, 0); - enddef; - - - # Definition of plankwalk - # Définition d'une ligne de main courante - def l_u_plankwalk (expr P) = T:=identity; - # by Dave Clucas - cas := 0; - dlzka := arclength P; - mojrok := adjust_step(dlzka, 0.5u); - pickup PenD; - forever: - t := arctime cas of P; - thdraw ((point t of P) + 0.5 * u * unitvector(thdir(P,t) rotated 90)) -- - ((point t of P) - 0.5 * u * unitvector(thdir(P,t) rotated 90) ); - cas := cas + mojrok; - exitif cas > dlzka + (mojrok/3); % for rounding errors - endfor; - pickup PenC; - %thdraw P; - %draw path withcolor (0.5, 0 ,0) - enddef; - - - # Definition of a line rail - # Définition d'une ligne rail - def l_u_rail (expr P) = - # by Andrew Aktinson - T:=identity; - cas := 0; - dlzka := arclength P; - mojkrok:=adjust_step(dlzka, 0.8u); - pickup PenC; - forever: - t0 := arctime (cas) of P; - t1 := arctime (cas + mojkrok*2/5) of P; - t := arctime (cas + mojkrok/2) of P; - t4 := arctime (cas + mojkrok*3/5) of P; - t5 := arctime (cas + mojkrok) of P; - thdraw (subpath (t0,t1) of P); - thdraw (subpath (t4,t5) of P); - drawdot (point t of P); - #mark_ (P,t,0.02u); - #mark_ (P,t,-0.02u); - #f := (P,t,0.2u); - #draw f; - cas := cas + mojkrok; - exitif cas > dlzka - (2*mojkrok/3); % for rounding errors - endfor; - enddef; - - - # Change fig Flowstone, increase the number of arcs - # Modifier le symbole flowstone en augmentant le nombr d'arc - def l_flowstone (expr p) = - #draw p withpen PenC withcolor (0.0, 0.5, 1.0); - T:=identity; - cas := 0; - dlzka := arclength p; - mojkrok:=adjust_step(dlzka, .3u); - # povodne .7u - pickup PenC; - t1:=0; - forever: - t2 := arctime (cas + mojkrok) of p; - thdraw (point t1 of p){dir (angle(thdir(p,t1)) + 60)} .. - {dir (angle(thdir(p,t2)) - 60)}(point t2 of p); - cas := cas + mojkrok; - exitif cas > dlzka + (mojkrok / 3); % for rounding errors - t1:=t2; - endfor; - enddef; - - - # Point that represent a bird nest - # Point pour représenter un nid d'oiseau - def p_u_nid (expr pos,theta,sc,al)= - U:=(.4u,.2u); - T:=identity aligned al rotated theta scaled sc shifted pos; - pickup PenC; - #thdraw (-.4u,.2u){dir -70}..{dir 70}(.4u,.2u) withcolor (0.53, 0.26, 0.11); - thdraw (-.2u,.1u){dir -70}..{dir 70}(.2u,.1u) withcolor (0.53, 0.26, 0.11); - enddef; - - - # Artificial anchor point (From a post by Evaristo Quiroga) - # Point ancrage artificiel (From a post by Evaristo Quiroga) - def p_u_anchor_artificial(expr pos,theta,sc,al) = - T:=identity shifted pos; - thdraw origin withpen pencircle scaled 0.25u withcolor (0.58, 0.44, 0.25); - enddef; - initsymbol ("p_u_anchor_artificial"); - - - # Natural anchor point (From a post by Evaristo Quiroga) - # Point ancrage naturel (From a post by Evaristo Quiroga) - def p_u_anchor_natural(expr pos,theta,sc,al) = - U:=(.2u,.2u); - T:=identity aligned al rotated theta scaled sc shifted pos; - thfill (-.2u,-.2u)--(0,.2u)--(.2u,-.2u)--cycle withcolor (0.58, 0.44, 0.25); - enddef; - initsymbol ("p_u_anchor_natural"); - - - # Deviation line (by Tarquin 2019) - # Ligne pour dessiner une déviation (D'après Tarquin 2019) - def l_u_deviation (expr P) = - begingroup; - save ellipse; - T:=identity; - pickup PenC; - path ellipse; - ellipse:=fullcircle xscaled (.5u) yscaled (.25u) shifted (point (length P) of P); - thdraw P cutafter ellipse; - draw ellipse; - endgroup; - enddef; - initsymbol("l_u_deviation"); - - def l_u_deviation_legend = - l_u_deviation(((.1,.5)--(.8,.5)) inscale); - enddef; - - - # Climbing caver point (by Juraj Halama, 2020) - # Climbing one has center where the rope should go on the harness... - # Point pour dessiner un spéléo qui grimpe ou escalade (D'après Juraj Halama, 2020) - # Le point correspond au centre du spéléo au niveau du harnais, qui doit donc être sur la corde - picture u_man_c_pic; - u_man_c_pic := image ( - draw (0cm, -0cm) -- (-8cm, 27cm) -- (-36cm, 55cm) -- (-50cm, 99cm) withpen pencircle scaled 16cm; - draw (27cm, 48cm) -- (0, 64cm) -- (-29cm, 61cm) -- (-38cm, 102cm) withpen pencircle scaled 16cm; - draw (-65cm, 48cm) -- (-75cm, 75cm) -- (-53cm, 106cm) -- (0, 106cm) withpen pencircle scaled 14cm; - draw (-44cm, 130cm) withpen pencircle scaled 27cm withcolor black; - ) shifted (20cm, -67cm); - - def p_u_man_c (expr P, R, S, A) = - U := (60cm, 85cm) scaled (0.01 / Scale); - T:=identity aligned A rotated R scaled S shifted P; - thdraw u_man_c_pic scaled (0.01 / Scale); - enddef; - initsymbol ("p_u_man_c"); - - # The scale on the map and in the legend is matching just for 1:500... - # L'échelle sur la carte et sur la légende correspond au 1:500... - def p_u_man_c_legend = - draw u_man_c_pic scaled (u / 175cm) shifted ((.5, .5) inscale); - enddef; - - - # Walking caver point (by Juraj Halama, 2020) - # Use "-align top" for proper alignment of the walking man when his point is on the groung. - # Point pour dessiner un spéléo marchant (D'après Juraj Halama, 2020) - # Utiliser l'option "-align top" pour un alignement correct quand le point est au sol - picture u_man_w_pic; - u_man_w_pic := image ( - draw (0, 0) -- (7.5cm, 36cm) -- (0cm, 69cm) -- (9cm, 99cm) withpen pencircle scaled 16cm; - draw (42cm, 9cm) -- (37.5cm, 42cm) -- (13.5cm, 69cm) -- (30cm, 102cm) withpen pencircle scaled 16cm; - draw (21.5cm, 100.5cm) -- (6.6cm, 69cm) withpen pencircle scaled 16cm; - draw (-24cm, 75cm) -- (-13.5cm, 102cm) -- (9cm, 112.5cm) -- (30cm, 108cm) -- (51cm, 87cm) -- (75cm, 93cm) withpen pencircle scaled 14cm; - draw (30cm, 132cm) withpen pencircle scaled 27cm withcolor black; - ) shifted (-20cm, -70cm); - - def p_u_man_w (expr P, R, S, A) = - U := (60cm, 80cm) scaled (0.01 / Scale); - T:=identity aligned A rotated R scaled S shifted P; - thdraw u_man_w_pic scaled (0.01 / Scale); - enddef; - initsymbol ("p_u_man_w"); - - # The scale on the map and in the legend is matching just for 1:500... - # L'échelle sur la carte et sur la légende correspond au 1:500... - def p_u_man_w_legend = - draw u_man_w_pic scaled (u / 175cm) shifted ((.5, .5) inscale); - enddef; - - - # Plan view symbol point (by Juraj Halama, 2020) - # Point dessinant un symbole de "vue en plan" (D'après Juraj Halama, 2020) - def p_u_symbol_plan (expr pos,theta,sc,al) = - U := (-3.25u, 3.25u); - T := identity aligned al rotated theta scaled sc shifted pos; - pickup PenB; - q := ((-3.26u, -.95u) -- (1.74u, -.95u) -- (2.8u, .82u) -- (-1.49u, .82u) -- cycle); - thfill q withcolor .85; - thdraw q; - q := ((-.175u, .5u) -- (0u, 0u) -- (.175u, .5u) .. (0u, .45u) .. cycle); - thfill q withcolor .5green; - thdraw q withcolor .5green; - thdraw (0u, 0u) -- (0u, 2.31u) withcolor .5green; - enddef; - - - # Extended view symbol point (by Juraj Halama, 2020) - # Point dessinant un symbole de "vue en coupe développée" (D'après Juraj Halama, 2020) - def p_u_symbol_extend (expr pos,theta,sc,al) = - U := (-2.5u, 2.5u); - T := identity aligned al rotated theta scaled sc shifted pos; - pickup PenB; - q := ((-2.346u, -2.480u) -- (-.48u, -2.116u) -- (-.48u, 1.573u) -- (-2.346u, 1.354u) -- cycle); - thfill q withcolor .85; - q := ((-1.551u, -2.878u) -- (1.438u, -.766u) -- (1.438u, 2.388u) -- (-1.551u, 1.118u) -- cycle); - thfill q withcolor .75; - thdraw q; - thdraw (-.48u, -2.116u) -- (-.48u, 1.573u) dashed evenly; - q := ((.446u, -1.461u) -- (2.120u, -1.094u) -- (2.120u, 2.184u) -- (.446u, 1.965u) -- cycle); - thfill q withcolor .85; - thdraw (.446u, -1.461u) -- (.446u, 1.965u) dashed evenly; - q := ((-.175u, .5u) -- (0u, 0u) -- (.175u, .5u) .. (0u, .45u) .. cycle) rotated -90; - thfill q withcolor .5green; - thdraw q withcolor .5green; - thdraw (0u, 0u) -- (2.31u, 0u) withcolor .5green; - enddef; - - - # Change rope line color - # Changer la couleur de la ligne rope (corde) - #symbol-colour line rope [58 44 25] - - - # Area for galerie initiation - # You will probably need to adapt the color to match the color of your galeries - # Aire pour matérialiser le départ d'une galerie - # A adapter en fonction de la couleur de vos galeries - def a_u_galerie(expr P) = - T:=identity; - ## jaune chamois (208, 192, 122) - ##thfill P withcolor (0.82,0.75,0.48) withtransparency 0.5; - thfill P withcolor (0.82,0.75,0.48) withalpha 0.5; - - ## Grey - ##thfill P withcolor (0.73,0.72,0.75) withtransparency 0.5; - #thfill P withcolor (0.73,0.72,0.75) withalpha 0.5; - - ## Jaune queue de vache (168, 152, 116) - ##thfill P withcolor (0.66,0.60,0.45) withtransparency 0.5; - #thfill P withcolor (0.66,0.60,0.45) withalpha 0.5; - - ## gris argile (239, 239, 239) - ##thfill P withcolor (0.937,0.937,0.937) withtransparency 0.5; - #thfill P withcolor (0.937,0;937,0.937) withalpha 0.5; - enddef; - - - # Make unsurveyed wall lines more light-weight and dashed - # Rendre les parois non topographiées plus légères et en pointillés - #Bruce Mutton 2010.06.20 for Therion 5.3.9 - def l_wall_unsurveyed (expr P) = - T:=identity; - pickup PenC; - thdraw P dashed evenly scaled (0.5*optical_zoom); - enddef; - - - # thin grey cave splays, yellow duplicates and dashed approximate legs - # Pour modifier la couleur du squelette en fonction du type de visées - # (splays, normal, duplicates, approximate...) - def l_survey_cave (expr P) = - % always draws full centreline, rather than short stubs like default cave centrelines - T:=identity; - pickup PenC; - if ATTR__shotflag_splay: - drawoptions(withcolor(0.5,0.5,0.5) withpen PenD); - thdraw P; % grey & thin - drawoptions(); - else: % not splay but may have either or both duplicate and approx flags set - if ATTR__shotflag_duplicate: - drawoptions(withcolor (1,1,0)); % differentiate duplicate with colour yellow - fi; - if ATTR__shotflag_approx: - thdraw P dashed evenly scaled optical_zoom; % differentiate approx with dashed - else: - thdraw P; - fi; - thdrawoptions(); - fi; - enddef; - - endcode - # Endcode for all the definition - - - code tex-map - \newtoks\thversiontitleB \thversiontitleB={Therion } - endcode - -endlayout - -###################################################################################################################################### - # Layout to define a horizontal Scale bar - # Layout pour définir une barre d'échelle horizontale -###################################################################################################################################### -layout scalebar_horiz - - - code metapost - # Change Scale bar type - # Pour modifier la barre d'échelle - # def s_scalebar (expr l, units, txt) = - # begingroup - # interim warningcheck:=0; - # tmpl:=l / Scale * cm * units / 2; - # tmpx:=l / Scale * cm * units / 5; - # tmph:=5bp; % bar height - # endgroup; - # pickup PenC; - # draw (-tmpl,0)--(tmpl,0)--(tmpl,-tmph)--(-tmpl,-tmph)--cycle; - # p:=(0,0)--(tmpx,0)--(tmpx,-tmph)--(0,-tmph)--cycle; - # for i:=-2.5 step 2 until 2: - # fill p shifted (i * tmpx,0); - # endfor; - - # begingroup - # interim labeloffset:=3.5bp; - # for i:=0 step (l/5) until (l-1): - # tmpx:=tmpl * (i * 2 / l - 1); - # label.bot(thTEX(decimal (i)),(tmpx,-tmph)); - # endfor; - # label.bot(thTEX(decimal (l) & "\thinspace" & txt),(tmpl,-tmph)); - # % To write the scale "1:scale" uncomment it the next line: - # % Pour écrire l'échelle "1:scale" au dessus de la barre décommenter la ligne suivante : - # %label.top(thTEX("Echelle 1 : " & decimal (Scale*100)),(0,0)); - # endgroup; - # enddef; - - def s_scalebar (expr l, units, txt) = - % l = value of scale-bar length - % units = ?? - % txt = string representing units - begingroup - interim warningcheck:=0; - tmpl:=l / Scale * cm * units / 2; - % tmpl = half plotted length of scale bar from central top insertion point - tmpx:=l / Scale * cm * units / 5; - tmph:=5bp; % bar height - endgroup; - pickup PenC; - draw (-tmpl,0)--(tmpl,0)--(tmpl,-tmph)--(-tmpl,-tmph)--cycle; - p:=(0,0)--(tmpx,0)--(tmpx,-tmph)--(0,-tmph)--cycle; - for i:=-0.5 step 2 until 2: % start drawing at the third block (leave space for smaller divisions) - fill p shifted (i * tmpx,0); - endfor; - - % Draw first part with subdivided blocks - p:=(0,0)--(tmpx/5,0)--(tmpx/5,-tmph)--(0,-tmph)--cycle; % define width of segment (tmpx is length of a normal bar segment) - for i:=-2.5 step 2/5 until -0.75: % Startpos, segments, count-index - fill p shifted (i * tmpx,0) withcolor black; - endfor; - - % Label of scale: Scalebar top, values below - begingroup - interim labeloffset:=3.5bp; - for i:=0 step (l/5) until (l-1): - tmpx:=tmpl * (i * 2 / l - 1); - label.bot(thTEX(decimal (i)),(tmpx,-tmph)); - endfor; - label.bot(thTEX(decimal (l) & "\thinspace" & txt),(tmpl,-tmph)); - # label.top(thTEX("Echelle 1 : " & decimal round(Scale*100)),(0,0)); - endgroup; - - enddef; - - endcode - -endlayout - -###################################################################################################################################### -###################################################################################################################################### -layout scalebar_vert-Halama - - # Layout to define a vertical Scale bar (see Therion Wiki - Juraj Halama) - # distributed under the GNU General Public Licence - # You need to place it with in your thconfig file: - # code tex-map - # \def\maplayout{ - # \legendbox{102.5}{100.4}{NW} - # {\scalebar}} - # endcode - # Layout pour définir une barre d'échelle verticale (voir le wiki Therion - Jural Halama) - # distribué sous la licence GNU General Public Licence - # Il faut l'appeler dans le fichier de configuration thconfig avec le bloc: - # code tex-map - # \def\maplayout{ - # \legendbox{102.5}{100.4}{NW} - # {\scalebar}} - # endcode - - code metapost - def s_scalebar (expr l, units, txt) = - begingroup - tmpw = 3.0 bp; - tmp5m = 5 / Scale * units * cm; - tmpl = l / Scale * units * cm; - endgroup; - p := (0, 0) -- (tmpw, 0) -- (tmpw, - tmp5m) -- (0, - tmp5m) -- cycle; - pickup PenD; - for i := 0 step 1 until (l - 1) / 5: - if (i mod 2) <> 0: - unfill p shifted - (0, i * tmp5m); - else: - fill p shifted - (0, i * tmp5m); - fi; - draw p shifted - (0, i * tmp5m); - endfor; - pickup PenA - %draw (-tmpw, 0) -- (tmpw, 0); - %draw (-tmpw, -tmpl) -- (0, -tmpl); - fill (-2tmpw, tmpw) -- (-2tmpw, -tmpw) -- (0, 0) -- cycle; - fill (-2tmpw, -tmpl + tmpw) -- (-2tmpw, -tmpl + -tmpw) -- (0, -tmpl) -- cycle; - if ((l mod 10) > 5) or ((l mod 10) = 0): - draw (0, - tmpl) -- (tmpw, - tmpl) withcolor black; - else: - draw (0, - tmpl) -- (tmpw, - tmpl) withcolor white; - fi; - begingroup - interim labeloffset:=3.5bp + tmpw; - %interim defaultscale:=0.5; - label.rt(thTEX("\size[12]" & "0{\thinspace}m"),(0, 0)); - for i := 1 step 1 until l / 5: - if (i mod 10) = 0: - label.rt(thTEX("\size[12]" & "-\thinspace" & decimal (i * 5)),(0, - i * tmp5m)); - else: - if i * 5 = l: - label.rt(thTEX("\size[12]" & "-\thinspace" & decimal (i * 5)),(0, - i * tmp5m)); - else: - label.rt(thTEX("\size[8]" & "-\thinspace" & decimal (i * 5)),(0, - i * tmp5m)); - fi - fi; - endfor; - if (l mod 5) <> 0: - label.rt(thTEX("\size[12]" & "-\thinspace" & decimal (l)),(0, - tmpl)); - fi; - endgroup - enddef; - endcode - -endlayout - -###################################################################################################################################### -layout scalebar_vert - - # Layout to define a vertical Scale bar - # Layout pour définir une barre d'échelle verticale - - code metapost - # Change Scale bar type - # Pour modifier la barre d'échelle - def s_scalebar (expr l, units, txt) = - begingroup - interim warningcheck:=0; - tmpl:=l / Scale * cm * units / 2; - tmpx:=l / Scale * cm * units / 5; - tmph:=5bp; % bar height - % To compute the right size of the text - if (l/1000) <1 : - if (l/100) <1 : - if (l/10) <1 : tmphz:=6bp; - else: tmphz:=8bp; fi; - else: tmphz:=10bp; fi; - else tmphz:=12bp; fi; - endgroup; - pickup PenC; - draw (0,-tmpl)--(0,tmpl)--(-tmph,tmpl)--(-tmph,-tmpl)--cycle; - p:=(0,0)--(0,tmpx)--(-tmph,tmpx)--(-tmph,0)--cycle; - for i:=-2.5 step 2 until 2: - fill p shifted (0,i * tmpx); - endfor; - begingroup - interim labeloffset:=0bp; - for i:=0 step (l/5) until (l-1): - tmpx:=tmpl * (i * 2 / l - 1); - label.bot(thTEX(decimal (l-i)),(tmph+tmphz,tmpx)); - %label.bot(thTEX(decimal (i)),(tmpx,-tmph)) rotated 90; - % Inverser l'ordre des nombres - endfor; - label.bot(thTEX(decimal (l-l) & "\thinspace" & txt),(tmph+tmphz,tmpl)); - %label.bot(thTEX(decimal (l) & "\thinspace" & txt),(tmpl,-tmph)) rotated 90; - endgroup; - enddef; - - endcode - -endlayout - - -###################################################################################################################################### -layout headerl - # Layout to change the header (plan projection) - # This code is experimental redefinition of map header and based on the work of - # Bruce Mutton Therion 5.3.15 make use of new variables - # Layout pour modifier le cartouche (header) de la projection en plan - # Ce code de redéfinition est expérimental experimental et basé sur le travail de - # Bruce Mutton Therion 5.3.15 fait appel à de nouvelles variables - - copy scalebar_horiz - - # This one affects maps only - # Ceci ne touche que les maps (plans) - code tex-map - - \def\loadpicture#1{\pdfximage{#1}\pdfrefximage\pdflastximage} - - \legendcontent={% - \hsize=\legendwidth - \color[0 0 0]\the\legendtextcolor - \ifnortharrow\vbox to 0pt{\line{\hfil\northarrow}\vss}\fi - %print cave map name - \edef\tmp{\the\cavename} \ifx\tmp\empty \else - {\the\legendtextheadersize\the\cavename}\vskip0.5cm - \fi - %print comment - {\rightskip=0pt plus 3em\parskip=3bp - \edef\tmp{\the\comment} \ifx\tmp\empty \else - {\the\legendtextsize\the\comment} \par\medskip\vskip1cm - \fi} - %print scalebar - \ifscalebar\scalebar\vskip1cm\fi - %print entrances coordinates (Lat-Long/WGS84) if defined - \edef\tmp{\the\ECoordinates} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thcoords \the\ECoordinates\par} - \vskip0.5cm - \fi - - % start bruces addition - # % CS - \edef\tmp{\the\outcsname} \ifx\tmp\empty \else - %{\the\legendtextsize\si\the\thproj: \ss\the\outcsname\par} - %\fi - %\edef\tmp{\the\northdir} \ifx\tmp\empty \else - %{\the\legendtextsize\ss\the\northdir north } - %\fi - %\edef\tmp{\the\magdecl} \ifx\tmp\empty \else - %{\the\legendtextsize\ss\the\magdecl { deg.} \par} - %\fi - \vskip0.5cm - % end bruces addition - #%print comment - { - #\rightskip=0pt plus 3em\parskip=3bp - #\edef\tmp{\the\comment} \ifx\tmp\empty \else - # {\the\legendtextsize\the\comment} \par\medskip - #\fi - %print cavelength and depth - \everypar{\hangindent=2em\hangafter=1} - \edef\tmp{\the\cavelength} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavelengthtitle: \ss\the\cavelength\par} - \fi - \edef\tmp{\the\cavedepth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavedepthtitle: \ss\the\cavedepth\par} - \fi - # % start bruces addition - ## % altitude - #\edef\tmp{\the\cavemaxz} \ifx\tmp\empty \else - # {\the\legendtextsize\si\the\depthrangetitle \ss\the\cavemaxz m to} - #\fi - #\edef\tmp{\the\caveminz} \ifx\tmp\empty \else - # {\the\legendtextsize\ss\the\caveminz m \par} %above mean sea level - #\fi - # % end bruces addition - - %print explorers names - \edef\tmp{\the\exploteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explotitle: \ss\the\exploteam\quad\si\the\explodate\par} - \fi - %print surveyors names - \edef\tmp{\the\topoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par} - \fi - %%print the guides - \edef\tmp{\the\guide} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thguide: \ss\the\guide\par} - \fi - %print cartographers names - \edef\tmp{\the\cartoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cartotitle: \ss\the\cartoteam\quad\si\the\cartodate\par} - \fi - %print synthesys name !!! !!! with newtoks\synth \synth={Synth Name} in the thconfig - \edef\tmp{\the\synth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thsynth: \ss\the\synth\par} - \fi - %print the club - \edef\tmp{\the\club} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thclub: \ss\the\club\par} - \fi - %%print the expedition - \edef\tmp{\the\expe} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thexpe: \ss\the\expe\par} - \fi - %%print the web page - \edef\tmp{\the\wpage} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thwpage: \ss\the\wpage\par} - \fi - %%print the survey's data web page - \edef\tmp{\the\datat} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thdatat: \ss\the\datat\par} - \fi - # % start bruces addition (compilation version and date modified to use built-in 5.3.15 variables) - \edef\tmp{\the\thversion} \ifx\tmp\empty \else %only write version and date if version is not emplty - {\the\legendtextsize\si\the\thversiontitleA: \ss\the\thversiontitleB \ss\the\thversion} - % \fi - % \edef\tmp{\the\currentdate} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\datetitle \ss\the\currentdate\par} - \fi - - # % end bruces addition - %print copyrights - \edef\tmp{\the\copyrights} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\copyrights\par} - \fi - - \edef\tmp{\the\thanksto} \ifx\tmp\empty \else - \bigskip - {\the\legendtextsize\si\the\ththanksto: \ss\the\thanksto\par} - %\def\ththankstotitle{Nos remerciements : } - %{\everypar{\hangindent=7.2em\hangafter=1} - %\size[\thsizem]\si\ththankstotitle \ss\ththanksto\par} - \fi - } - \formattedlegend - \color[0 0 0] - } - % Add Logos - # \def\loadpicture#1{\pdfximage{#1}\pdfrefximage\pdflastximage} - # \def\maplayout{ - # \legendbox{0}{100}{NE}{\the\legendcontent} - # \legendbox{100}{100}{NW}{\loadpicture{D:/Logo-ARSIP-Synthese-Topo.jpg}} %%% pdf, png, jpg supported - # } - endcode -endlayout - - -###################################################################################################################################### -layout header_coupe_vert-to-place - # Layout to change the header (extended elevation) - # This code is experimental redefinition of map header - # Bruce Mutton Therion 5.3.15 make use of new variables - # Xavier Robert (2020/04/27) - # Header specifically for extended elevation maps with a vertical scale bar - # that needs to be manually located inside your layout (in the thconfig file) - # with the code : - # code tex-map - # \def\maplayout{ - # \legendbox{0}{-1}{NW}{\the\legendcontent} % add legend content - # \legendbox{0}{87.5}{NW}{\hsize=1.5 cm\centerline\scalebar} % add scalebar where you want it - # } - # endcode - # Layout pour modifier le cartouche (header) de la projection en coupe développée - # Ce code de redéfinition est expérimental experimental et basé sur le travail de - # Bruce Mutton Therion 5.3.15 fait appel à de nouvelles variables - # Xavier Robert (2020/04/27) - # Header développé spécialement pour les coupes étendues et projetées, avec l'échelle - # verticale qu'il faut localiser grâce au code : - # code tex-map - # \def\maplayout{ - # \legendbox{0}{-1}{NW}{\the\legendcontent} % Ajout du contenu de la légende - # \legendbox{0}{87.5}{NW}{\hsize=1.5 cm\centerline\scalebar} % Ajout de l'échelle où nous la voulons - # } - # endcode - - - copy scalebar_vert # Xavier robert - #copy scalebar_vert-Halama # Juraj Halama - - # This one affects maps only (extended view) - # Ceci ne touche que les maps (coupes développées) - code tex-map - \legendcontent={% - \hsize=\legendwidth - \color[0 0 0]\the\legendtextcolor - %\ifnortharrow\vbox to 0pt{\line{\hfil\northarrow}\vss}\fi - %print cave map name - \edef\tmp{\the\cavename} \ifx\tmp\empty \else - {\the\legendtextheadersize\the\cavename}\vskip0.5cm - \fi - %print comment - {\rightskip=0pt plus 3em\parskip=3bp - \edef\tmp{\the\comment} \ifx\tmp\empty \else - {\the\legendtextsize\the\comment} \par\medskip\vskip0.5cm - \fi} - { - %print the coordinates of the entrance. It is associated with the entrances_coordinates.th file - \edef\tmp{\the\ECoordinates} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thcoords: \ss\the\ECoordinates\par} - \vskip0.5cm - \fi - %print cavelength and depth - \everypar{\hangindent=2em\hangafter=1} - \edef\tmp{\the\cavelength} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavelengthtitle: \ss\the\cavelength\par} - \fi - \edef\tmp{\the\cavedepth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavedepthtitle: \ss\the\cavedepth\par} - \fi - # % end bruces addition - - %print explorers names - \edef\tmp{\the\exploteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explotitle: \ss\the\exploteam\quad\si\the\explodate\par} - \fi - %print surveyors names - \edef\tmp{\the\topoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par} - \fi - %%print the guides - \edef\tmp{\the\guide} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thguide: \ss\the\guide\par} - \fi - %print cartographers names - \edef\tmp{\the\cartoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cartotitle: \ss\the\cartoteam\quad\si\the\cartodate\par} - \fi - %print synthesys name !!! !!! with newtoks\synth \synth={Synth Name} in the thconfig - \edef\tmp{\the\synth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thsynth: \ss\the\synth\par} - \fi - %print the club - \edef\tmp{\the\club} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thclub: \ss\the\club\par} - \fi - %%print the expedition - \edef\tmp{\the\expe} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thexpe: \ss\the\expe\par} - \fi - %%print the web page - \edef\tmp{\the\wpage} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thwpage: \ss\the\wpage\par} - \fi - %%print the survey's data web page - \edef\tmp{\the\datat} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thdatat: \ss\the\datat\par} - \fi - # % start bruces addition (compilation version and date modified to use built-in 5.3.15 variables) - \edef\tmp{\the\thversion} \ifx\tmp\empty \else %only write version and date if version is not emplty - {\the\legendtextsize\si\the\thversiontitleA: \ss\the\thversiontitleB \ss\the\thversion} - % \fi - % \edef\tmp{\the\currentdate} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\datetitle \ss\the\currentdate\par} - \fi - - # % end bruces addition - %print copyrights - \edef\tmp{\the\copyrights} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\copyrights\par} - \fi - - \edef\tmp{\the\thanksto} \ifx\tmp\empty \else - \bigskip - {\the\legendtextsize\si\the\ththanksto: \ss\the\thanksto\par} - %\def\ththankstotitle{Nos remerciements : } - %{\everypar{\hangindent=7.2em\hangafter=1} - %\size[\thsizem]\si\ththankstotitle \ss\ththanksto\par} - \fi - } - \formattedlegend - \color[0 0 0] - } - endcode - -endlayout - - -###################################################################################################################################### -layout header_coupe_vert-auto - # Layout to change the header (extended elevation) - # This code is experimental redefinition of map header - # Bruce Mutton Therion 5.3.15 make use of new variables - # Xavier Robert (2020/04/27) - # Header specifically for extended elevation maps with a vertical scale bar - # located at the right of the header. - # Layout pour modifier le cartouche (header) de la projection en coupe développée - # Ce code de redéfinition est expérimental experimental et basé sur le travail de - # Bruce Mutton Therion 5.3.15 fait appel à de nouvelles variables - # Xavier Robert (2020/04/27) - # Header développé spécialement pour les coupes étendues et projetées, avec l'échelle - # verticale et localisée à la droite du header. - - copy scalebar_vert - - # This one affects maps only (extended view) - # Ceci ne touche que les maps (coupes développées) - code tex-map - \legendcontent={% - \hsize=\legendwidth - \color[0 0 0]\the\legendtextcolor - % print scalebar - \ifscalebar\hskip1.3cm\vbox to 0pt{\line{\hfil\scalebar}\vss}\fi - % print cave map name - \edef\tmp{\the\cavename} \ifx\tmp\empty \else - {\the\legendtextheadersize\the\cavename}\vskip0.5cm - \fi - % print comment - {\rightskip=0pt plus 3em\parskip=3bp - \edef\tmp{\the\comment} \ifx\tmp\empty \else - {\the\legendtextsize\the\comment} \par\medskip\vskip0.3cm - \fi} - { - %print the coordinates of the entrance. It is associated with the entrances_coordinates.th file - \edef\tmp{\the\ECoordinates} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thcoords: \ss\the\ECoordinates\par} - \vskip0.5cm - \fi - %print cavelength and depth - \everypar{\hangindent=2em\hangafter=1} - \edef\tmp{\the\cavelength} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavelengthtitle: \ss\the\cavelength\par} - \fi - \edef\tmp{\the\cavedepth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavedepthtitle: \ss\the\cavedepth\par} - \fi - # % end bruces addition - - %print explorers names - \edef\tmp{\the\exploteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explotitle: \ss\the\exploteam\quad\si\the\explodate\par} - \fi - %print surveyors names - \edef\tmp{\the\topoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par} - \fi - %%print the guides - \edef\tmp{\the\guide} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thguide: \ss\the\guide\par} - \fi - %print cartographers names - \edef\tmp{\the\cartoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cartotitle: \ss\the\cartoteam\quad\si\the\cartodate\par} - \fi - %print synthesys name !!! !!! with newtoks\synth \synth={Synth Name} in the thconfig - \edef\tmp{\the\synth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thsynth: \ss\the\synth\par} - \fi - %print the club - \edef\tmp{\the\club} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thclub: \ss\the\club\par} - \fi - %%print the expedition - \edef\tmp{\the\expe} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thexpe: \ss\the\expe\par} - \fi - %%print the web page - \edef\tmp{\the\wpage} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thwpage: \ss\the\wpage\par} - \fi - %%print the survey's data web page - \edef\tmp{\the\datat} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thdatat: \ss\the\datat\par} - \fi - # % start bruces addition (compilation version and date modified to use built-in 5.3.15 variables) - \edef\tmp{\the\thversion} \ifx\tmp\empty \else %only write version and date if version is not emplty - {\the\legendtextsize\si\the\thversiontitleA: \ss\the\thversiontitleB \ss\the\thversion} - % \fi - % \edef\tmp{\the\currentdate} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\datetitle \ss\the\currentdate\par} - \fi - - # % end bruces addition - %print copyrights - \edef\tmp{\the\copyrights} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\copyrights\par} - \fi - - \bigskip - \edef\tmp{\the\thanksto} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\ththanksto: \ss\the\thanksto\par} - %\def\ththankstotitle{Nos remerciements : } - %{\everypar{\hangindent=7.2em\hangafter=1} - %\size[\thsizem]\si\ththankstotitle \ss\ththanksto\par} - \fi - } - \formattedlegend - \color[0 0 0] - } - endcode -endlayout - -###################################################################################################################################### -layout header_coupe - # Layout to change the header (extended elevation) - # This code is experimental redefinition of map header - # Bruce Mutton Therion 5.3.15 make use of new variables - # Layout pour modifier le cartouche (header) de la projection en coupe développée - # Ce code de redéfinition est expérimental experimental et basé sur le travail de - # Bruce Mutton Therion 5.3.15 fait appel à de nouvelles variables - - copy scalebar_horiz - - # This one affects maps only (extended view) - # Ceci ne touche que les maps (coupes développées) - code tex-map - \legendcontent={% - \hsize=\legendwidth - \color[0 0 0]\the\legendtextcolor - %\ifnortharrow\vbox to 0pt{\line{\hfil\northarrow}\vss}\fi - %print cave map name - \edef\tmp{\the\cavename} \ifx\tmp\empty \else - {\the\legendtextheadersize\the\cavename}\vskip0.5cm - \fi - %print comment - {\rightskip=0pt plus 3em\parskip=3bp - \edef\tmp{\the\comment} \ifx\tmp\empty \else - {\the\legendtextsize\the\comment} \par\medskip\vskip1cm - \fi} - %print scalebar - \ifscalebar\scalebar\vskip1cm\fi - { - %print the coordinates of the entrance. It is associated with the entrances_coordinates.th file - \edef\tmp{\the\ECoordinates} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thcoords: \ss\the\ECoordinates\par} - \vskip0.5cm - \fi - %print cavelength and depth - \everypar{\hangindent=2em\hangafter=1} - \edef\tmp{\the\cavelength} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavelengthtitle: \ss\the\cavelength\par} - \fi - \edef\tmp{\the\cavedepth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavedepthtitle: \ss\the\cavedepth\par} - \fi - # % end bruces addition - - %print explorers names - \edef\tmp{\the\exploteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explotitle: \ss\the\exploteam\quad\si\the\explodate\par} - \fi - %print surveyors names - \edef\tmp{\the\topoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par} - \fi - %%print the guides - \edef\tmp{\the\guide} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thguide: \ss\the\guide\par} - \fi - %print cartographers names - \edef\tmp{\the\cartoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cartotitle: \ss\the\cartoteam\quad\si\the\cartodate\par} - \fi - %print synthesys name !!! !!! with newtoks\synth \synth={Synth Name} in the thconfig - \edef\tmp{\the\synth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thsynth: \ss\the\synth\par} - \fi - %print the club - \edef\tmp{\the\club} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thclub: \ss\the\club\par} - \fi - %%print the expedition - \edef\tmp{\the\expe} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thexpe: \ss\the\expe\par} - \fi - %%print the web page - \edef\tmp{\the\wpage} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thwpage: \ss\the\wpage\par} - \fi - %%print the survey's data web page - \edef\tmp{\the\datat} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thdatat: \ss\the\datat\par} - \fi - # % start bruces addition (compilation version and date modified to use built-in 5.3.15 variables) - \edef\tmp{\the\thversion} \ifx\tmp\empty \else %only write version and date if version is not emplty - {\the\legendtextsize\si\the\thversiontitleA: \ss\the\thversiontitleB \ss\the\thversion} - % \fi - % \edef\tmp{\the\currentdate} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\datetitle \ss\the\currentdate\par} - \fi - - # % end bruces addition - %print copyrights - \edef\tmp{\the\copyrights} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\copyrights\par} - \fi - - \edef\tmp{\the\thanksto} \ifx\tmp\empty \else - \bigskip - {\the\legendtextsize\si\the\ththanksto: \ss\the\thanksto\par} - %\def\ththankstotitle{Nos remerciements : } - %{\everypar{\hangindent=7.2em\hangafter=1} - %\size[\thsizem]\si\ththankstotitle \ss\ththanksto\par} - \fi - } - \formattedlegend - \color[0 0 0] - } - endcode -endlayout - - -###################################################################################################################################### -layout header-plan-schema - # Layout to change the header for sketch (plan projection) - # This code is experimental redefinition of map header and based on the work of - # Bruce Mutton Therion 5.3.15 make use of new variables - # Layout pour modifier le cartouche (header) de la projection en plan - # Ce code de redéfinition est expérimental experimental et basé sur le travail de - # Bruce Mutton Therion 5.3.15 fait appel à de nouvelles variables - - copy scalebar_horiz - - # This one affects maps only - # Ceci ne touche que les maps (plans) - code tex-map - \legendcontent={% - \hsize=\legendwidth - \color[0 0 0]\the\legendtextcolor - \ifnortharrow\vbox to 0pt{\line{\hfil\northarrow}\vss}\fi - %%print cave map name - \edef\tmp{\the\cavename} \ifx\tmp\empty \else - {\the\legendtextheadersize\the\cavename}\vskip0.5cm - \fi - %%print comment - {\rightskip=0pt plus 3em\parskip=3bp - \edef\tmp{\the\comment} \ifx\tmp\empty \else - {\the\legendtextsize\the\comment} \par\medskip\vskip1cm - \fi} - %%print scalebar - \ifscalebar\scalebar\vskip1cm\fi - %%print entrances coordinates (Lat-Long/WGS84) if defined - \edef\tmp{\the\ECoordinates} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thcoords: \ss\the\ECoordinates\par} - \vskip0.5cm - \fi - - %%print cavelength and depth ; they need to be defined in the layout in the thconfig - \everypar{\hangindent=2em\hangafter=1} - \edef\tmp{\the\cavelength} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explolengthtitle: \ss\the\cavelength} %\par} - \fi - \edef\tmp{\the\cavedepth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explodepthtitle: \ss\the\cavedepth\par} - \fi - - %%print explorers names - \edef\tmp{\the\exploteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explotitle: \ss\the\exploteam\quad\si\the\explodate\par} - \fi - %%print surveyors names - \edef\tmp{\the\topoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par} - \fi - %%print the guides - \edef\tmp{\the\guide} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thguide: \ss\the\guide\par} - \fi - %%print cartographers names - \edef\tmp{\the\cartoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cartotitle: \ss\the\cartoteam\quad\si\the\cartodate\par} - \fi - %%print synthesys name !!! !!! with newtoks\synth \synth={Synth Name} in the thconfig - \edef\tmp{\the\synth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thsynth: \ss\the\synth\par} - \fi - %%print the club - \edef\tmp{\the\club} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thclub: \ss\the\club\par} - \fi - %%print the expedition - \edef\tmp{\the\expe} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thexpe: \ss\the\expe\par} - \fi - %%print the web page - \edef\tmp{\the\wpage} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thwpage: \ss\the\wpage\par} - \fi - %%print the survey's data web page - \edef\tmp{\the\datat} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thdatat: \ss\the\datat\par} - \fi - - %%print copyrights - \edef\tmp{\the\copyrights} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\copyrights\par} - \fi - - \edef\tmp{\the\thanksto} \ifx\tmp\empty \else - \bigskip - {\the\legendtextsize\si\the\ththanksto: \ss\the\thanksto\par} - \fi - \formattedlegend - \color[0 0 0] - } - - endcode - -endlayout - - -###################################################################################################################################### -layout header_coupe-schema - # Layout to change the header for sketch (extended elevation) - # This code is experimental redefinition of map header - # Bruce Mutton Therion 5.3.15 make use of new variables - # Layout pour modifier le cartouche (header) de la projection en coupe développée - # Ce code de redéfinition est expérimental experimental et basé sur le travail de - # Bruce Mutton Therion 5.3.15 fait appel à de nouvelles variables - - copy scalebar_horiz - - # This one affects maps only (extended view) - # Ceci ne touche que les maps (coupes développées) - code tex-map - \legendcontent={% - \hsize=\legendwidth - \color[0 0 0]\the\legendtextcolor - %print cave map name - \edef\tmp{\the\cavename} \ifx\tmp\empty \else - {\the\legendtextheadersize\the\cavename}\vskip0.5cm - \fi - %print comment - {\rightskip=0pt plus 3em\parskip=3bp - \edef\tmp{\the\comment} \ifx\tmp\empty \else - {\the\legendtextsize\the\comment} \par\medskip\vskip1cm - \fi} - %print scalebar - \ifscalebar\scalebar\vskip1cm\fi - { - %print the coordinates of the entrance. It is associated with the entrances_coordinates.th file - \edef\tmp{\the\ECoordinates} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thcoords: \ss\the\ECoordinates\par} - \vskip0.5cm - \fi - %%print cavelength and depth ; they need to be defined in the layout in the thconfig - \everypar{\hangindent=2em\hangafter=1} - \edef\tmp{\the\cavelength} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explolengthtitle: \ss\the\cavelength} %\par} - \fi - \edef\tmp{\the\cavedepth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explodepthtitle: \ss\the\cavedepth\par} - \fi - - %print explorers names - \edef\tmp{\the\exploteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explotitle: \ss\the\exploteam\quad\si\the\explodate\par} - \fi - %print surveyors names - \edef\tmp{\the\topoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par} - \fi - %%print the guides - \edef\tmp{\the\guide} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thguide: \ss\the\guide\par} - \fi - %print cartographers names - \edef\tmp{\the\cartoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cartotitle: \ss\the\cartoteam\quad\si\the\cartodate\par} - \fi - %print synthesys name !!! !!! with newtoks\synth \synth={Synth Name} in the thconfig - \edef\tmp{\the\synth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thsynth: \ss\the\synth\par} - \fi - %print the club - \edef\tmp{\the\club} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thclub: \ss\the\club\par} - \fi - %%print the expedition - \edef\tmp{\the\expe} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thexpe: \ss\the\expe\par} - \fi - %%print the web page - \edef\tmp{\the\wpage} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thwpage: \ss\the\wpage\par} - \fi - %%print the survey's data web page - \edef\tmp{\the\datat} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thdatat: \ss\the\datat\par} - \fi - - %print copyrights - \edef\tmp{\the\copyrights} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\copyrights\par} - \fi - - \edef\tmp{\the\thanksto} \ifx\tmp\empty \else - \bigskip - {\the\legendtextsize\si\the\ththanksto: \ss\the\thanksto\par} - %\def\ththankstotitle{Nos remerciements : } - %{\everypar{\hangindent=7.2em\hangafter=1} - %\size[\thsizem]\si\ththankstotitle \ss\ththanksto\par} - \fi - } - \formattedlegend - \color[0 0 0] - } - endcode - -endlayout - - -###################################################################################################################################### -layout headeratlas - # Layout to change the header (plan projection) - # This code is experimental redefinition of map header and based on the work of - # Bruce Mutton Therion 5.3.15 make use of new variables - # Layout pour modifier le cartouche (header) de la projection en plan - # Ce code de redéfinition est expérimental experimental et basé sur le travail de - # Bruce Mutton Therion 5.3.15 fait appel à de nouvelles variables - - copy scalebar_horiz - - # This one affects maps only - # Ceci ne touche que les maps (plans) - code tex-map - \legendcontent={% - \hsize=\legendwidth - \color[0 0 0]\the\legendtextcolor - \ifnortharrow\vbox to 0pt{\line{\hfil\northarrow}\vss}\fi - %print cave map name - \edef\tmp{\the\cavename} \ifx\tmp\empty \else - {\the\legendtextheadersize\the\cavename}\vskip0.5cm - \fi - %print comment - {\rightskip=0pt plus 3em\parskip=3bp - \edef\tmp{\the\comment} \ifx\tmp\empty \else - {\the\legendtextsize\the\comment} \par\medskip\vskip1cm - \fi} - %print scalebar - \ifscalebar\scalebar\vskip1cm\fi - %print entrances coordinates (Lat-Long/WGS84) if defined - \edef\tmp{\the\ECoordinates} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thcoords: \ss\the\ECoordinates\par} - \vskip0.5cm - \fi - - % start bruces addition - # % CS - \edef\tmp{\the\outcsname} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thproj: \ss\the\outcsname\par} - \fi - \edef\tmp{\the\northdir} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\northdir north } - \fi - \edef\tmp{\the\magdecl} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\magdecl deg \par} - \fi - \vskip0.5cm - % end bruces addition - #%print comment - { - #\rightskip=0pt plus 3em\parskip=3bp - #\edef\tmp{\the\comment} \ifx\tmp\empty \else - # {\the\legendtextsize\the\comment} \par\medskip - #\fi - %print cavelength and depth - \everypar{\hangindent=2em\hangafter=1} - \edef\tmp{\the\cavelength} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavelengthtitle: \ss\the\cavelength\par} - \fi - \edef\tmp{\the\cavedepth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cavedepthtitle: \ss\the\cavedepth\par} - \fi - # % start bruces addition - ## % altitude - #\edef\tmp{\the\cavemaxz} \ifx\tmp\empty \else - # {\the\legendtextsize\si\the\depthrangetitle \ss\the\cavemaxz m to} - #\fi - #\edef\tmp{\the\caveminz} \ifx\tmp\empty \else - # {\the\legendtextsize\ss\the\caveminz m \par} %above mean sea level - #\fi - # % end bruces addition - - %print explorers names - \edef\tmp{\the\exploteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\explotitle: \ss\the\exploteam\quad\si\the\explodate\par} - \fi - %print surveyors names - \edef\tmp{\the\topoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par} - \fi - %%print the guides - \edef\tmp{\the\guide} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thguide: \ss\the\guide\par} - \fi - %print cartographers names - \edef\tmp{\the\cartoteam} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\cartotitle: \ss\the\cartoteam\quad\si\the\cartodate\par} - \fi - %print synthesys name !!! !!! with newtoks\synth \synth={Synth Name} in the thconfig - \edef\tmp{\the\synth} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thsynth: \ss\the\synth\par} - \fi - %print the club - \edef\tmp{\the\club} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thclub: \ss\the\club\par} - \fi - %%print the expedition - \edef\tmp{\the\expe} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thexpe: \ss\the\expe\par} - \fi - %%print the web page - \edef\tmp{\the\wpage} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thwpage: \ss\the\wpage\par} - \fi - %%print the survey's data web page - \edef\tmp{\the\datat} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\thdatat: \ss\the\datat\par} - \fi - # % start bruces addition (compilation version and date modified to use built-in 5.3.15 variables) - \edef\tmp{\the\thversion} \ifx\tmp\empty \else %only write version and date if version is not emplty - {\the\legendtextsize\si\the\thversiontitleA: \ss\the\thversiontitleB \ss\the\thversion} - % \fi - % \edef\tmp{\the\currentdate} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\datetitle \ss\the\currentdate\par} - \fi - - # % end bruces addition - %print copyrights - \edef\tmp{\the\copyrights} \ifx\tmp\empty \else - {\the\legendtextsize\ss\the\copyrights\par} - \fi - - \bigskip - \edef\tmp{\the\thanksto} \ifx\tmp\empty \else - {\the\legendtextsize\si\the\ththanksto: \ss\the\thanksto\par} - %\def\ththankstotitle{Nos remerciements : } - %{\everypar{\hangindent=7.2em\hangafter=1} - %\size[\thsizem]\si\ththankstotitle \ss\ththanksto\par} - \fi - } - \formattedlegend - \color[0 0 0] - } - - endcode - -endlayout - - -###################################################################################################################################### -layout layoutmapborder - # If you want to draw a frame around the map - # Si vous voulez un cadre autour de votre topographie - code tex-map - \framethickness=0.5mm - endcode - -endlayout - -###################################################################################################################################### -# CODE TO CUSTOMISE ATLAS OUTPUT -# CODE POUR CUSTOMISER L'ATLAS -###################################################################################################################################### -layout LayoutAtlasNorthArrow2 -# This code is a redefinition of the default atlas definition -# that includes both north arrow & scale bar beside the navigation pane -# from Bruce Mutton (2019/08) -# Ce code est une redéfinition de la définition par défaut de l'Altlas -# Cela inclus à la fois la flèche du nord et la barre d'échelle du panneau de navigation. -# from Bruce Mutton (2019/08) - - code tex-atlas - \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 0pt{\hss\showpointer\pointerN\hss} - \hbox to 0pt{\llap{\showpointer\pointerW\hskip0.7em}% - \raise1pt\hbox to 0pt{\hss$\updownarrow$\hss}% - \raise1pt\hbox to 0pt{\hss$\leftrightarrow$\hss}% - \rlap{\hskip0.7em\showpointer\pointerE}} - \hbox to 0pt{\hss\showpointer\pointerS\hss} - }\qquad\qquad - \vtop{ - \def\arr{$\uparrow$} - \showpointerlist\pointerU - \def\arr{$\downarrow$} - \showpointerlist\pointerD - } - } - \fi - \vss - } - \hss - \vbox to \ht\navbox{ - \ifnortharrow\hbox to 0pt{\hss\northarrow\qquad}\fi - \vss - \ifscalebar\hbox to 0pt{\hss\scalebar\qquad}\fi - } - \box\navbox - } - } - } - endcode - -endlayout - -###################################################################################################################################### -layout LayoutAtlasNorthArrow - # Layout for the set of the Atlas North Arrow to override - # the north arrow definition of the layout drawingconfig - # and use a smaller North arrow to avoid overlaps with the scale bar - # For that, it should be call first in the layout Altas of the .thconfig file. - # Layout pour définir le set up de l'Atlas North Arrow. - # pour effacer la définition de la flèche du nord du layout drawingconfig - # et éviter la superposition de la flèche avec la barre d'échelle. - # Pour cela, il convient de placer l'appel à ce Layout avant tous les autres layouts - # dans le layout Atlas du .thconfig - code metapost - def s_northarrow (expr rot) = - begingroup - #interim defaultscale:=0.7; % scale your north arrow here - interim defaultscale:=0.5; % scale your north arrow here; 0.5 is the best value for atlas - T:=identity scaled defaultscale rotated -rot; - interim linecap:=squared; - interim linejoin:=rounded; - thfill (-.5cm,-.1cm)--(0,2.5cm)--(.5cm,-.1cm)--cycle; - pickup pencircle scaled (0.08cm * defaultscale); - thdraw (0,0)--(0,-2.5cm); - pickup pencircle scaled (0.16cm * defaultscale); - p:=(0.4cm,0.6cm); - thdraw ((p--(p yscaled -1)--(p xscaled -1)--(p scaled -1)) shifted (0,-1.0cm)); - label.rt(thTEX("mg") scaled 1.6, (.6cm,-1.6cm)) transformed T; - endgroup; - enddef; - endcode - -endlayout - -###################################################################################################################################### -layout AtlasSetUp - # Layout for the set of the Atlas - # Layout pour définir le set up de l'Atlas - - # "size" are the dimensions of the square/rectangle which will be - # occupied by part of the survey corresponding to each smal inset. - # 15 x 20, is good to print with an A4-paper. - # "size", c'est pour l'atlas. Ce sont les dimensions du carré dont - # l'interieur sera occupé par la partie de la topo correspondante à - # chaque une des pagines. 15 x 20, ça va bien pour imprimer A4. - size 15 20 cm - - # In the atlas, we choose an overlap of 1 cm with the neibourghood pages - # Dans l'atlas, on va superposer 1 cm de chaque page voisine - overlap 1 cm - - # "page-setup". - # We specify 1) the dimensions of the paper: 21 X 29.7 (A4) - # 2) the surface usable to print, here 17 X 28.2 - # and then 3, we can add a 3 cm left margin (21 - 17 -1 = 3) - # and a 1.5 cm top margin (29.7 - 27.2 - 1 = 1,5) - # "page-setup", ça sert pour le map et pour l'atlas aussi. - # on spécifie les dimensions de la feuille de papier : 21 X 29,7 (A4) - # la surface imprimible du papier, ce sont 17 X 28,2 - # Alors, on peut indiquer une marge à gauche de 3 (21-17-1=3) - # et une marge en haut de 1,5 (29,7-27,2-1=1,5) - # en centimetres - page-setup 21 29.7 17 27.2 3 1.5 cm - - # Print (or not) the title of the pages before each capter of the Atlas - # Affiche (ou non) le titre des pages avant chaque chapitre de l’atlas - title-pages on - - # Zoom factor of the navigation pannel; by default, 30 - # Facteur de zoom du panneau de navigation ; Par défault, 30 - nav-factor 30 - - # Define the number of pages in the 2 directions of the navigation pannel - # Définir le nombre de pages de l'atlas dans les 2 directions du panneau de navigation - nav-size 2 2 - - - code tex-atlas - \atlastitlepages - \insertmaps - \formattedlegend - endcode - -endlayout - - -###################################################################################################################################### -layout layoutcontinuation - # If you want to write all the texts that go with continuations marks - # Si vous voulez écrire sur la carte le texte qui est donnée dans chaque définition - # de point d'interrogation de continuation - - 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 - -endlayout - - -###################################################################################################################################### -layout northarrowMG - # New Northarrow definition - # Nouvelle définition de la flèche du nord - - code metapost - # If you want to get both, magnetic and geographic north, - # with \cartodate ? - def s_northarrow (expr rot) = - %valscal=1.2; % scale your north arrow here - valscal=0.7; % scale your north arrow here - decl:=MagDecl; % set the magnetic declination - T:=identity; - picture tmp_pic; - tmp_pic = image ( - pickup pencircle scaled .3; - thfill fullcircle scaled 4cm withcolor 1white; - thdraw fullcircle scaled 3.1cm; - thdraw fullcircle scaled 4.05cm; - pickup pencircle scaled .1; - thdraw fullcircle scaled 3cm; - thdraw fullcircle scaled 4cm; - pickup pencircle scaled .2; - thdraw (dir(45)*2.025cm)--(dir(45)*3.7cm); - thdraw (dir(135)*2.025cm)--(dir(135)*3.7cm); - thdraw (dir(225)*2.025cm)--(dir(225)*3.7cm); - thdraw (dir(315)*2.025cm)--(dir(315)*3.7cm); - pickup pencircle scaled .1; - for whereto=0 step 15 until 345: - thdraw dir(whereto)*.65cm--dir(whereto)*.9cm; - thdraw dir(whereto)*1.4cm--dir(whereto)*1.5cm; - endfor; - for whereto=0 step 5 until 355: - thdraw dir(whereto)*.65cm--dir(whereto)*.8cm; - thdraw dir(whereto)*1.45cm--dir(whereto)*1.5cm; - endfor; - for whereto=0 step 1 until 359: - thdraw dir(whereto)*1.94cm--dir(whereto)*2cm; - endfor; - pickup pencircle scaled 1; - thdraw fullcircle scaled 1cm; - thdraw fullcircle scaled 1.1cm; - thdraw fullcircle scaled 1.3cm withpen pencircle scaled .3; - vald=90-decl; - texrot=0-decl; - drawarrow(dir(vald)*-2cm--dir(vald)*2cm) withpen pencircle scaled .2; - % Add the date of the last drawing - thdraw image(label.top(btex $mg$ etex, (0,0)) scaled .5 rotated texrot;) shifted (dir(vald)*2.04cm); - thfill (1.06cm,1.06cm)--(0,.2cm)--(-1.06cm,1.06cm)--(-.2cm,0)--(-1.06cm,-1.06cm)--(0,-.2cm)--(1.06cm,-1.06cm)--(.2cm,0)--cycle; - thfill (-.2cm,.2cm)--(0,2cm)--(0,0)--cycle; - thfill (.2cm,-.2cm)--(0,-2cm)--(0,0)--cycle; - thfill (.2cm,.2cm)--(2cm,0)--(0,0)--cycle; - thfill (-.2cm,-.2cm)--(-2cm,0)--(0,0)--cycle; - thfill (.2cm,.2cm)--(-0,2cm)--(0,0)--cycle withcolor 1white; - thfill (.2cm,-.2cm)--(2cm,0)--(0,0)--cycle withcolor 1white; - thfill (-.2cm,-.2cm)--(0,-2cm)--(0,0)--cycle withcolor 1white; - thfill (-.2cm,.2cm)--(-2cm,0)--(0,0)--cycle withcolor 1white; - pickup pencircle scaled .2; - thdraw (-.2cm,.2cm)--(0,2cm)--(.2cm,.2cm)--(2cm,0cm)--(.2cm,-.2cm)--(0,-2cm)--(-.2cm,-.2cm)--(-2cm,0)--cycle; - thfill fullcircle scaled .56cm withcolor 1white; - pickup pencircle scaled .1; - thdraw (.28cm,0)..(0,.28cm)..(-.28cm,0)..(0,-.28cm)..cycle; - pickup pencircle scaled .4; - thdraw (.2cm,0)..(0,.2cm)..(-.2cm,0)..(0,-.2cm)..cycle; - label.bot(btex $N$ etex, (0,2.6cm)); - label.lft(btex $E$ etex, (2.6cm,0)); - label.rt(btex $W$ etex, (-2.6cm,0)); - label.top(btex $S$ etex, (0,-2.6cm)); - ); - thdraw tmp_pic scaled valscal rotatedaround(origin, -rot); - enddef; - - endcode - -endlayout - - - ####################################################################################################################################### - layout test - # A test layout to test you new symbols, configurations,... ;-) - # Un layout de test pour tester vos nouveaux symboles, configurations,... ;-) - - code metapost - - def p_u_prof (expr P,R,S,A)= - T:=identity aligned A rotated R scaled S shifted P; - pickup PenD; - p:=(-.3u,0)--(.3u,0); - thdraw p; - #thdraw p rotated 90; - p:=fullcircle scaled .2u; - #thclean p; - thdraw p; - enddef; - - vardef p_label@#(expr txt,P,R,mode) = - if mode=1: - thdrawoptions(withcolor .8red + .4blue); - # thdrawoptions(withcolor .8red + .6blue); - p_u_prof(P); - % append "m" to label - picture txtm; - % calcul profondeur - %numeric profondeur; - profondeur:=(\thaltitude-\cavemaxz); - picture txtprofondeur; - txtm:=image( - draw txt; - interim labeloffset:=0; - #label.urt(btex \thaltitude m etex, lrcorner txt); - label.urt(btex profondeur m etex, lrcorner txt); - %label.urt(btex \thdepth m etex, lrcorner txt); - ); - % give extra offset in case of l/r/t/b alignment - pair ctmp; - ctmp:=center thelabel@#("x", (0,0)); - if (xpart ctmp * ypart ctmp)=0: - interim labeloffset:=(.4u); - else: % diagonal alignment - interim labeloffset:=(.2u); - fi; - % draw label - lab:=thelabel@#(txtm, P); - draw lab _thop_; % use color - thdrawoptions(); - bboxmargin:=0.8bp; - write_circ_bbox((bbox lab) smoothed 2); - else: - if mode=7: interim labeloffset:=(u/8) fi; - lab:=thelabel@#(txt, P); - if mode>1: pickup PenD fi; - if mode=2: process_uplabel; - elseif mode=3: process_downlabel; - elseif mode=4: process_updownlabel; - elseif mode=5: process_circledlabel; - elseif mode=6: process_boxedlabel; - elseif mode=7: process_label(P,R); % station name - elseif mode=8: process_filledlabel(P, R); - else: process_label(P,R); fi; - fi; - enddef; - - endcode - - endlayout - - -###################################################################################################################################### -layout depth - - code metapost - # Change the altitude definition - # This label requires to specify the position of text relative to point with - # help of -align in the options box. - # Changer la définition du point altitude - # Ce label nécessite la position spécifique de l'étiquette de texte de façon relative - # au point avec l'aide de l'option -align. - #ex: -align bottom-right/top-left/top-right/bottom-left/top/bottom/left/right... - - #def p_altitude_depth (expr pos) = - def p_u_prof (expr pos) = - T:=identity shifted pos; - pickup PenD; - p:=(-.3u,0)--(.3u,0); - thdraw p; thdraw p rotated 90; - p:=fullcircle scaled .2u; - thclean p; thdraw p; - enddef; - # vardef p_label@#(expr txt,pos,rot,mode) = - # if mode=1: - # thdrawoptions(withcolor .8red + .4blue); - # p_u_prof(pos); - # #%% append "m" to label - # picture txtm; - # txtm:=image( - # draw txt; - # interim labeloffset:=0; - # label.urt(btex \thaltitude { m} etex, lrcorner txt); - # #label.urt(btex \thheight m etex, lrcorner txt); - # ); - # #%% give extra offset in case of l/r/t/b alignment - # pair ctmp; - # ctmp:=center thelabel@#("x", (0,0)); - # if (xpart ctmp * ypart ctmp)=0: - # interim labeloffset:=(.4u); - # else: % diagonal alignment - # interim labeloffset:=(.2u); - # fi; - # #% draw label - # lab:=thelabel@#(txtm, pos); - # draw lab _thop_; % use color - # thdrawoptions(); - # bboxmargin:=0.8bp; - # write_circ_bbox((bbox lab) smoothed 2); - # else: - # if mode=7: interim labeloffset:=(u/8) fi; - # lab:=thelabel@#(txt, pos); - # if mode>1: pickup PenD fi; - # if mode=2: process_uplabel; - # elseif mode=3: process_downlabel; - # elseif mode=4: process_updownlabel; - # elseif mode=5: process_circledlabel; - # elseif mode=6: process_boxedlabel; - # elseif mode=7: process_label(pos,rot); % station name - # elseif mode=8: process_filledlabel(pos, rot); - # else: process_label(pos,rot); fi; - # fi; - # enddef; - endcode - - #symbol-color point altitude_depth [100 100 100] - -endlayout - -###################################################################################################################################### -layout fonts_2000 - # If you want to change font size - # Si vous voulez changer la police - - code metapost - #fonts_setup(,,,,); - fonts_setup(1,1,1,28,32); - endcode - -endlayout - - -###################################################################################################################################### -layout fonts_1000 - # If you want to change font size - # Si vous voulez changer la police - - code metapost - #fonts_setup(,,,,); - fonts_setup(8,14,18,20,25); - endcode - -endlayout - -###################################################################################################################################### -layout fonts_500 - # If you want to change font size - # Si vous voulez changer la police - - code metapost - #fonts_setup(,,,,); - fonts_setup(6,10,12,14,18); - endcode - -endlayout - -###################################################################################################################################### -layout Survey_No_Scrap - - code metapost - def l_survey_cave_MY(expr P) = - if ATTR__scrap_centerline: - l_survey_cave_SKBB(P); - else: - draw P withcolor black; - fi; - enddef; - initsymbol("l_survey_cave_MY"); - endcode - - symbol-assign line survey:cave MY - #symbol-color line cave_MY [100 60 20] - #symbol-color line rock-edge [34 21 3] # Marron : (87, 56, 8) - -endlayout - -###################################################################################################################################### -# NOK for test -layout logo_ARSIP - # If you want to change font size - # Si vous voulez changer la police - - code metapost - beginfig(1); - % Charger le logo - drawimage "Logo-ARSIP-Synthese-Topo.jpg" scaled 1 shifted (10, 10); - - % Exemple de dessin (ajouter vos éléments topographiques ici) - draw (0,0)--(100,0)--(100,100)--(0,100)--cycle withcolor .7white; - - % Ajouter une légende ou d'autres détails - label("Topographie avec logo", (50, 110)) withcolor black; - endfig; - endcode - -endlayout \ No newline at end of file diff --git a/Scripts/pyCreate_th2/template/template-maps.th b/Scripts/pyCreate_th2/template/template-maps.th deleted file mode 100644 index 836ad85..0000000 --- a/Scripts/pyCreate_th2/template/template-maps.th +++ /dev/null @@ -1,18 +0,0 @@ -#Template for pyCreate_th2.py -encoding utf-8 - -{Copyright} - -{file_info} - -map MP-{fileName}-Plan-tot -title "{fileName}" - SP-{Target}_01 -{other_scraps_plan} break -endmap - -map MC-{fileName}-Extended-tot -title "{fileName}" - SC-{Target}_01 -{other_scraps_extended} break -endmap - - diff --git a/Scripts/pyCreate_th2/template/template-readme.md b/Scripts/pyCreate_th2/template/template-readme.md deleted file mode 100644 index 844db91..0000000 --- a/Scripts/pyCreate_th2/template/template-readme.md +++ /dev/null @@ -1,11 +0,0 @@ -#Template for pyCreate_th2.py -encoding utf-8 - -{Copyright} - -{file_info} - -to add this survey in a main survey add in your -tot.th file: - -input Data/{fileName}/{fileName}-tot.th -equate diff --git a/Scripts/pyCreate_th2/template/template-tot.th b/Scripts/pyCreate_th2/template/template-tot.th deleted file mode 100644 index 2e36167..0000000 --- a/Scripts/pyCreate_th2/template/template-tot.th +++ /dev/null @@ -1,20 +0,0 @@ -#Template for pyCreate_th2.py -encoding utf-8 - -{Copyright} - -{file_info} - -survey {fileName} -title "{fileName}" - input Data/{fileName}.th - - ## Pour le plan - input Data/{fileName}-Plan.th2 - - ## Pour la coupe développée - input Data/{fileName}-Extended.th2 - - ## Appel des maps - input {fileName}-maps.th - -endsurvey diff --git a/Scripts/pyCreate_th2/template/template.thconfig b/Scripts/pyCreate_th2/template/template.thconfig deleted file mode 100644 index 77ad426..0000000 --- a/Scripts/pyCreate_th2/template/template.thconfig +++ /dev/null @@ -1,389 +0,0 @@ -#Template for pyCreate_th2.py -encoding utf-8 - -############################################################################################### - -{Copyright} -{file_info} -############################################################################################### - -## INTRO - -## Le signe "#" en début de ligne signifie que la ligne est commentée. Elle ne -## sera donc pas lue lors de la compilation. - -## Dans ce fichier on met les specifications generales, à savoir -## dans quel fichier sont les donnees topo, l'aspect que l'on veut -## donner aux topos imprimées (layout) et ce que l'on -## veut comme résultat : map, ou atlas ou 3D ou donnees en format SQL - -## Alors, on peut fractionner ce fichier en trois parts: -## - source, pour specifier les fichiers ou sont les données topo/dessin -## - layout, pour specifier la composition du document à imprimer -## - export: map, atlas, etc - -############################################################################################### -## 1-SOURCES -############################################################################################### -## La ligne source spécifie le fichier ou sont les donnees topo -## jb.th". (Au fichier "jb.th" il faudra avoir une ligne -## "input "nomducavite.th2" pour specifier le fichier ou se trouvent -## les donnees du dessin, comme ça, ce fichier thconfig appellera -## "jb.th" et a leur tour, "jb.th" appellera -## "jb-dessin.th2") - -source {fileName}-tot.th - -## Add config file -input config.thc - -############################################################################################### -## 2-LAYOUT -############################################################################################### -## Ici, on peut specifier des choses comme les symboles à utiliser (UIS, etc) -## ou imprimer des explications des symboles - -## Début de la définition du Layout "xviexport" -layout xviexport - #cs UTM32 - ## echelle à laquelle on veut dessiner la topo - scale 1 {Scale} - #scale 1 1000 - ## taille de la grille - grid-size 2 2 2 m - ## mettre la grille en arrière plan - grid bottom -endlayout -## fin de la définition du layout "xviexport" - -## Début de la définition du layout "Layout-Plan" -layout layout-Plan - ## Call the config settings (Layout config inside the config.thc file) - copy fonts_1000 - copy drawingconfig - #copy layoutcontinuation # Pour afficher le label des continuations - copy headerl - copy langue-fr - - ## Définition du système de projection du plan - cs {cs} - - ## La ligne base-scale spécifie l'échelle auquel nous avons dessiné nos croquis. - ## Par défaut, Therion pense que c'est une échelle 1:200. Si on a utilisé une autre échelle, - ## il faut enlever le "#" et spécifier l'échelle vraiment employée, comme c'est le cas - ## après avoir dessiné la topo sur un cheminement exporté avec le layout "xviexport". - ## Jouer avec le ration base-scale/scale permet de jouer globalement sur les tailles - ## des caractères et des traits. - base-scale 1 {Scale} - - ## Maintenant on va mettre une ligne "scale" pour specifier l'échelle pour imprimer la topo. - ## La combination entre scale et base-scale contrôle l'épaisseur des lignes, rotation, etc, convenable - ## pour faire l'ampliation-réduction entre dessin et le résultat de l'imprimante - ## C'est tres important s'assurer que la configuration de l'imprimante ne spécifie pas l'option "Fit in page" - ## ou similaire, sinon, l'échelle sera changée pendant l'impression! - scale 1 {Scale} - - ## Echelle graphique 100 m ampleur (Généralement, le choix scale/10 est plutôt pas mal) - scale-bar 100 m - - ## Voici une ligne pour specifier qu'il faut imprimer une grille au dessous de la topo - grid bottom - - ## Défini la rotation de la topographie - #rotate -65 - - ## Une ligne pour specifier que la grille est 1000x1000x1000 m - ## (Trois dimensions, oui, ça sert pour la coupe aussi) - grid-size 50 50 50 m - - ## la topo est transparente (on peut voir les galeries en dessous) - ## C'est on par défaut, donc, pas vraiment besoin de specifier - transparency on - - ## Couleurs de la topographie - #colour map-bg [70 90 70] - #colour map-fg [100 100 80] - #colour map-fg altitude - #colour map-fg explo-date - #colour map-fg topo-date - #colour map-fg map - #colour map-fg scrap - #colour-legend off - colour map-fg 90 - - ## ça marche seulement si transparency est "on" 90% blanc= 10% noir - opacity 75 - #surface bottom - #surface-opacity 100 - - ## Auteur - doc-author "{Author}" - ## Titre - doc-title "{cavename} Plan - 1:{Scale}" - doc-subject "{cavename}, topographie en plan" - doc-keywords "Cave, Survey, {cavename}, Pierre saint Martin - Larra, {map_comment}" - - ## Maintenant on spécifie la position de la manchette, dont l'intérieur est occupé par le titre, auteurs, etc. - ## Nous pouvons indiquer les cordonnées du point de la topo ou l'on veut la manchette : - ## 0 0, c'est en bas, à gauche, 100 100, c'est en haut, à droite - ## La manchette a des "points cardinaux" autour : n, s, ne, sw, etc. - ## Il faut specifier un de ces points comme ce que sera placé sur les cordonnées. - ## Alors nous pouvons specifier que le sud-ouest de la manchette soit placé en bas, a gauche, - ## ou une autre combination... - map-header 2 98 nw - - ## arrière plan de la manchette - map-header-bg on - ## Légende pour expliciter les symboles. "on" imprimera seulement la légende des symboles dessinés - ## sur la topo. Si l'on veut pour tous les symboles, utilisés ou pas, il faut indiquer "all". - ## "legend off" = pas de légende - legend on - ## Par défaut, la légende est de 14 cm de largeur - legend-width 15 cm - legend-columns 2 - ## Un commentaire à ajouter au titre, on pourrait indiquer ici la mairie où est placée la cavité - ## dont le nom est probablement le titre de la topo. - map-comment "{map_comment}" - #map-comment "{map_comment}
Coordonnées : ({cs}/WGS84) xxx.xxx xxxx.xxx, Alt.: xxxx m" - - ## Afficher les statistiques d'explo/topo par équipe/nom. C'est lourd - ## si la cavité est importante et qu'il y a beaucoup d'explorateurs/topographes. - statistics explo-length off - statistics topo-length off - - ## Afficher un copyright - statistics copyright 2 - - ## Dessin ou pas du cheminement topo - #symbol-hide point station - #symbol-hide line survey - #symbol-hide group - #symbol-show line wall - #symbol-hide point station-name - #symbol-hide point u:symbol_plan - #symbol-hide point u:symbol_extend - #debug scrap-names - #debug station-names - - layers on - - overlap 2 cm - - code tex-map - \legendwidth=15cm - \legendtextsize={\size[12]} - \legendtextheadersize={\size[28]} %%% Taille du titre - \legendtextsectionsize={\size[14]} %%% Taille du titre - %\legendtextcolor={\color[0 0 110]} %# RGB values 0--100 - % Output map title as determined by Therion is stored in cavename, défini par la une Map. - % It will be empty if there are multiple maps selected for any one projection - % AND there are multiple source surveys identified in the thconfig file - % ie Therion can not infer a unique title from the input data given. - % This code allows you to define an output map title {cavename} if it happens to be empty - \edef\temp{\the\cavename} % cavename from Therion - \edef\nostring{} % empty string - \ifx\temp\nostring % test if cavename is empty - % if empty - reassign cavename to describe selected maps as a group - \else % if not empty keep the value set by therion, or assign an override cavename here - \fi - \cavename={{cavename}, Plan 1:{Scale}} % Note Alex : Bug avec certains fichiers ? - \newtoks\club \club={{club}} - %\newtoks\thanksto \thanksto={{thanksto}} - \newtoks\wpage \wpage={{wpage}} - \newtoks\datat \datat={{datat}} - \newtoks\synth \synth={{Author}} - \framethickness=0.5mm - endcode - -endlayout - -##debut de la definition du layout "layout-Extended" -layout layout-Extended - ## Call the config settings (Layout config inside the config.thc file) - copy drawingconfig - #copy layoutcontinuation # Pour afficher le label des continuations - copy header_coupe - #copy headerl - #copy header_coupe_vert-auto - #copy header_coupe_vert-to-place - copy langue-fr - - ## Définition du système de projection du plan - cs {cs} - - ## La ligne base-scale spécifie l'échelle auquel nous avons dessiné nos croquis. - ## Par défaut, Therion pense que c'est une échelle 1:200. Si on a utilisé une autre échelle, - ## il faut enlever le "#" et spécifier l'échelle vraiment employée, comme c'est le cas - ## après avoir dessiné la topo sur un cheminement exporté avec le layout "xviexport". - ## Jouer avec le ration base-scale/scale permet de jouer globalement sur les tailles - ## des caractères et des traits. - base-scale 1 {Scale} - - ## Maintenant on va mettre une ligne "scale" pour specifier l'échelle pour imprimer la topo. - ## La combination entre scale et base-scale contrôle l'épaisseur des lignes, rotation, etc, convenable - ## pour faire l'ampliation-réduction entre dessin et le résultat de l'imprimante - ## C'est tres important s'assurer que la configuration de l'imprimante ne spécifie pas l'option "Fit in page" - ## ou similaire, sinon, l'échelle sera changée pendant l'impression! - scale 1 {Scale} - - ## Echelle graphique 100 m ampleur (Généralement, le choix scale/10 est plutôt pas mal) - scale-bar 40 m - - ## Voici une ligne pour specifier qu'il faut imprimer une grille au dessous de la topo - #grid bottom - grid off - ## Une ligne pour specifier que la grille est 1000x1000x1000 m - ## (Trois dimensions, oui, ça sert pour la coupe aussi) - #grid-size 250 250 250 m - - ## la topo est transparente (on peut voir les galeries inférieurs) - ## C'est on par défaut, donc, pas vraiment besoin de specifier - transparency on - - ## Couleurs de la topographie - #colour map-bg [70 90 70] - #colour map-fg [100 100 80] - #colour map-fg altitude - #colour map-fg explo-date - #colour map-fg topo-date - #colour map-fg map - #colour map-fg scrap - #colour-legend off - colour map-fg 90 - - ## ça marche seulement si transparency est "on" 90% blanc= 10% noir - opacity 75 - #surface bottom - #surface-opacity 100 - - ## Auteur - doc-author "{Author}" - ## Titre - doc-title "{cavename} Coupe développée - 1:{Scale}" - - doc-subject "{cavename}, topographie en coupe développée" - doc-keywords "Cave, Survey, {cavename}, Pierre saint Martin - Larra, Coupe développée, {map_comment}" - - ## Maintenant on spécifie la position de la manchette, dont l'intérieur est occupé par le titre, auteurs, etc. - ## Nous pouvons indiquer les cordonnées du point de la topo ou l'on veut la manchette : - ## 0 0, c'est en bas, à gauche, 100 100, c'est en haut, à droite - ## La manchette a des "points cardinaux" autour : n, s, ne, sw, etc. - ## Il faut specifier un de ces points comme ce que sera placé sur les cordonnées. - ## Alors nous pouvons specifier que le sud-ouest de la manchette soit placé en bas, a gauche, - ## ou une autre combination... - map-header 98 98 ne - ## arrière plan de la manchette - map-header-bg on - ## Légende pour expliciter les symboles. "on" imprimera seulement la légende des symboles dessinés - ## sur la topo. Si l'on veut pour tous les symboles, utilisés ou pas, il faut indiquer "all". - ## "legend off" = pas de légende - legend on - ## Par défaut, la légende est de 14 cm de largeur - legend-width 15 cm - legend-columns 2 - ## Un commentaire à ajouter au titre, on pourrait indiquer ici la mairie où est placée la cavité - ## dont le nom est probablement le titre de la topo. - map-comment "{map_comment}" - #map-comment "{map_comment}
Coordonnées : ({cs}/WGS84) xxx.xxx xxxx.xxx, Alt.: xxxx m" - - ## Afficher les statistiques d'explo/topo par équipe/nom. C'est lourd - ## si la cavité est importante et qu'il y a beaucoup d'explorateurs/topographes. - statistics explo-length off - statistics topo-length off - - ## Afficher un copyright - statistics copyright 2 - - ## Dessin ou pas du cheminement topo - #symbol-hide point station - #symbol-hide line survey - #symbol-hide group - #symbol-show line wall - #symbol-hide point u:symbol_plan - #symbol-hide point u:symbol_extend - #debug scrap-names - #debug station-names - - layers on - - overlap 2 cm - - ## Modification du Titre de la topo - code tex-map - \legendwidth=15cm - \legendtextsize={\size[12]} - \legendtextheadersize={\size[28]} %%% Taille du titre - \legendtextsectionsize={\size[14]} %%% Taille du titre - %\legendtextcolor={\color[0 0 110]} %# RGB values 0--100 - % Output map title as determined by Therion is stored in cavename, défini par la une Map. - % It will be empty if there are multiple maps selected for any one projection - % AND there are multiple source surveys identified in the thconfig file - % ie Therion can not infer a unique title from the input data given. - % This code allows you to define an output map title {cavename} if it happens to be empty - \edef\temp{\the\cavename} % cavename from Therion - \edef\nostring{} % empty string - \ifx\temp\nostring % test if cavename is empty - % if empty - reassign cavename to describe selected maps as a group - \else % if not empty keep the value set by therion, or assign an override cavename here - \fi - \cavename={{cavename}, Coupe développée 1:{Scale}} % Note Alex : Bug avec certains fichiers ? - \newtoks\club \club={{club}} - %\newtoks\thanksto \thanksto={{thanksto}} - \newtoks\wpage \wpage={{wpage}} - \newtoks\datat \datat={{datat}} - \newtoks\synth \synth={{Author}} - \framethickness=0.5mm - endcode - -endlayout -## Fin de la definition du Layout "normal" - -layout layout-kml - ## Définition du système de projection du plan - cs EPSG:2154 - ## Couleur de la topographie - ## Rouge-Orange = 255,69,0 --> - ## Orange = 255,165,0 --> - ## Orange Sombre = 255,140,0 --> - ## Bleu --> 0, 0 255 - color map-fg [0 0 100] -endlayout - -############################################################################################### -# 3-EXPORT -############################################################################################### - -## Export des xvi pour le dessin si besoin -export map -proj plan -layout xviexport -fmt xvi -o Data/{fileName}-Plan.xvi -export map -proj extended -layout xviexport -fmt xvi -o Data/{fileName}-Extended.xvi - -## Selection des Maps à exporter -select MP-{fileName}-Plan-tot@{fileName} -select MC-{fileName}-Extended-tot@{fileName} - -## Export des fichiers pdf, plan et coupe. -## ATTENTION, la topo étant énorme, il faut mettre l'option ne traçant pas la centerline ! - -export map -projection plan -fmt pdf -layout layout-Plan -o Outputs/{fileName}-Plan.pdf -export map -projection extended -fmt pdf -layout layout-Extended -o Outputs/{fileName}-Extended.pdf - -## Export du fichier 3d pour Loch -export model -enable all -o Outputs/{fileName}.lox -export model -enable all -o Outputs/{fileName}.kml - -## Export des fichiers ESRI -#export map -proj plan -fmt esri -o Outputs/{fileName} - -## Export des fichiers kml -#export map -proj plan -fmt kml -o Outputs/{fileName}.kml -layout layout-kml -#export model -fmt kml -o Outputs/{fileName}-model.kml -enable all -#export model -enable all -o Outputs/{fileName}-3D.kml -export cave-list -location on -o Outputs/{fileName}-Cave-list.html -export survey-list -location on -o Outputs/{fileName}-Surveys.html - - -############################################################################################### -## END -############################################################################################### \ No newline at end of file diff --git a/Scripts/pyCreate_th2/test/Entree.th b/Scripts/pyCreate_th2/test/Entree.th deleted file mode 100644 index fe570f4..0000000 --- a/Scripts/pyCreate_th2/test/Entree.th +++ /dev/null @@ -1,810 +0,0 @@ -# 2024.04.12 created by TopoDroid v 5.1.40 - - -# This work is under the Creative Commons Attribution-ShareAlike-NonCommecial License: -# - -survey Geophysicaya_01_entree -title "Geophysicalskaya 01 entree" - # depart pt fr24 A00 - - - centerline - date 2024.04.12 - team "Alexandre Pont" - team "Jean-Philippe Grandcolas" - team "Gaël Cazes" - - #cs long-lat - #fix PTR_FR24_A00_Geophysicalskaya 66.394767 37.673152 856 # Alt from Google Earth - cs UTM42 - fix PTR_FR24_A00_Geophysicalskaya 0270251 4172755 870 # gps alex / Altitude PhA - station PTR_FR24_A00_Geophysicalskaya "Geophysicalskaya" entrance air-draught - - - #explo-date 19?? - #explo-team " " - #explo-date 1972 - #explo-team "Groupe AVEN" - - units length meters - units compass clino degrees - data normal from to length compass clino - # extend auto - PTR_FR24_A00_Geophysicalskaya . 0.77 171.9 -42.1 - PTR_FR24_A00_Geophysicalskaya . 0.59 345.7 -42.1 - PTR_FR24_A00_Geophysicalskaya . 1.07 280.3 -83.5 - PTR_FR24_A00_Geophysicalskaya . 0.17 77.9 54.4 - extend right - - PTR_FR24_A00_Geophysicalskaya 1 1.16 155.5 -59.6 # PTR_FR24_A00 - # extend auto - 1 . 0.87 1.2 3.5 - 1 . 1.07 23.9 2.8 - 1 . 0.31 19.8 -43.1 - 1 . 1.25 51.5 -14.6 - 1 . 0.68 111.1 0.1 - 1 . 1.60 79.2 -1.7 - 1 . 1.28 30.6 0.9 - extend right - 1 2 2.94 69.9 5.4 - # extend auto - 2 . 1.15 251.7 -12.0 - 2 . 0.94 232.5 -35.4 - 2 . 0.66 215.5 -45.5 - 2 . 1.12 264.4 3.9 - 2 . 0.62 276.1 24.2 - 2 . 0.54 237.2 50.1 - 2 . 1.70 313.3 -1.9 - 2 . 1.24 332.6 0.8 - 2 . 0.51 224.5 60.7 - 2 . 0.84 261.0 -49.5 - 2 . 1.55 171.2 -80.3 - extend vertical - 2 3 1.50 179.0 -57.3 - # extend auto - 3 . 2.59 62.1 15.4 - 3 . 2.72 85.4 4.2 - 3 . 1.29 124.2 -6.9 - 3 . 0.99 147.5 -9.4 - 3 . 1.76 179.1 -6.3 - 3 . 1.80 207.9 -0.5 - 3 . 0.97 237.3 1.0 - 3 . 0.90 274.2 16.6 - 3 . 0.56 339.4 68.3 - 3 . 0.80 199.3 73.4 - 3 . 0.70 172.9 25.6 - 3 . 0.75 159.0 -44.1 - extend vertical - 3 4 1.76 189.9 -14.9 - # extend auto - 4 . 1.05 44.5 -4.3 - 4 . 0.97 76.9 -5.0 - 4 . 0.73 42.8 42.7 - 4 . 1.00 66.1 -61.5 - 4 . 1.44 74.5 -48.2 - extend right - 4 5 1.40 85.5 -40.9 - # extend auto - 5 . 0.81 6.9 0.7 - 5 . 0.71 27.4 -2.1 - 5 . 0.53 167.6 23.1 - 5 . 0.65 132.1 31.3 - 5 . 0.44 62.0 64.9 - 5 . 1.01 64.7 5.2 - 5 . 0.44 168.0 -6.4 - extend right - 5 6 2.38 87.9 -41.5 - # extend auto - 6 . 1.44 15.0 35.4 - 6 . 2.17 37.6 29.2 - 6 . 1.52 158.1 9.7 - 6 . 1.90 217.0 16.6 - 6 . 0.35 200.8 -51.1 - 6 . 0.92 207.6 56.8 - 6 . 1.74 114.8 30.9 - 6 . 3.32 100.0 3.8 - extend right - 6 7 7.07 91.7 -15.0 - # extend auto - 7 . 6.16 334.1 28.8 - 7 . 7.14 1.2 22.1 - 7 . 8.14 37.3 7.9 - 7 . 9.31 97.1 -2.5 - 7 . 13.25 121.4 -3.4 - 7 . 1.63 133.8 62.7 - 7 . 0.89 120.0 -58.0 - 7 . 10.93 240.5 4.6 - 7 . 11.74 219.7 -1.8 - 7 . 2.04 201.6 42.7 - 7 . 4.65 171.2 18.7 - 7 . 12.10 165.1 1.7 - 7 . 7.11 160.3 -24.2 - extend right - 7 8 8.55 29.2 8.0 - extend vertical - 7 9 9.73 170.9 -20.0 - # extend auto - 9 . 10.71 91.8 8.0 - 9 . 15.71 255.1 -5.7 - 9 . 15.41 240.0 -11.6 - 9 . 16.44 209.0 -19.0 - 9 . 1.28 159.3 -40.3 - 9 . 5.37 162.4 -26.3 - 9 . 4.72 168.9 4.0 - 9 . 11.77 164.8 -4.8 - extend ignore - 9 10 12.21 150.7 -17.3 - # extend auto - 10 . 10.35 44.2 19.0 - 10 . 12.19 67.8 12.0 - 10 . 15.37 87.8 8.0 - 10 . 16.74 174.0 -15.4 - 10 . 19.62 149.0 -12.4 - 10 . 13.94 243.2 -9.9 - 10 . 3.13 143.3 -33.1 - 10 . 3.51 152.5 71.2 - 10 . 3.97 127.8 42.1 - 10 . 13.50 128.0 13.8 - extend right - 10 11 12.27 146.2 -10.7 - # extend auto - 11 . 7.08 162.3 -17.0 - 11 . 9.80 130.5 -7.6 - 11 . 3.62 100.9 40.2 - 11 . 10.67 102.6 20.2 - 11 . 2.07 130.7 -41.8 - 11 . 6.76 109.7 -20.5 - extend right - 11 12 12.24 114.3 -8.3 - # extend auto - 12 . 8.54 37.7 5.2 - 12 . 1.68 158.4 -1.0 - 12 . 4.09 135.3 -19.6 - 12 . 4.71 88.5 30.3 - 12 . 6.41 114.8 -33.4 - 12 . 2.42 77.4 -31.4 - extend right - 12 13 6.78 114.0 -18.5 - # extend auto - 13 . 3.87 34.7 9.8 - 13 . 1.37 324.4 -82.3 - 13 . 3.24 88.5 -60.6 - extend right - 13 14 4.88 89.5 -28.4 - # extend auto - 14 . 1.90 229.0 13.3 - 14 . 1.16 206.0 9.9 - 14 . 1.71 137.9 -8.0 - 14 . 0.96 64.1 -6.7 - 14 . 1.00 174.3 71.3 - 14 . 1.33 1.1 42.9 - 14 . 1.88 315.2 -2.0 - 14 . 3.96 336.6 -12.0 - extend vertical - 14 15 4.25 9.4 -26.4 - # extend auto - 15 . 1.96 165.5 -35.4 - 15 . 1.56 220.7 -35.0 - 15 . 1.72 230.2 -62.6 - 15 . 2.42 329.3 1.0 - extend right - 15 16 1.98 107.9 -85.5 - # extend auto - 16 . 2.24 54.5 -56.7 - 16 . 1.39 80.2 22.8 - 16 . 1.11 81.6 57.5 - extend right - 16 17 9.21 105.0 -24.3 - # extend auto - 17 . 5.24 201.1 0.5 - 17 . 10.15 142.2 2.4 - 17 . 3.50 281.7 51.8 - 17 . 2.97 146.8 71.6 - 17 . 4.22 74.9 41.0 - 17 . 5.82 76.1 12.2 - 17 . 11.16 25.7 0.7 - 17 . 6.69 8.9 11.3 - 17 . 19.90 41.3 -3.3 - 17 . 5.72 76.6 -23.9 - 17 . 9.74 70.1 -23.9 - extend right - 17 18 8.45 75.9 -21.0 - # extend auto - 18 . 10.52 10.4 10.7 - 18 . 14.54 42.0 7.9 - 18 . 10.86 162.9 15.0 - 18 . 19.17 144.0 9.3 - 18 . 4.55 87.6 -27.3 - 18 . 8.61 87.7 -19.4 - 18 . 4.40 115.4 64.5 - 18 . 11.46 97.3 30.4 - extend right - - 18 PTR_FR24_A01_19 19.59 100.6 -1.2 # 19 : PTR_FR24_A01_ depart rg - # extend auto - PTR_FR24_A01_19 . 14.69 214.8 8.8 - PTR_FR24_A01_19 . 10.74 18.1 -12.8 - PTR_FR24_A01_19 . 15.31 359.0 -19.2 - PTR_FR24_A01_19 . 15.06 15.0 -27.2 - PTR_FR24_A01_19 . 6.51 15.4 -41.7 - PTR_FR24_A01_19 . 12.68 59.4 -17.0 - PTR_FR24_A01_19 . 14.74 79.6 -5.3 - PTR_FR24_A01_19 . 6.13 55.5 71.4 - PTR_FR24_A01_19 . 27.16 160.6 16.8 - PTR_FR24_A01_19 . 9.64 120.5 -5.5 - PTR_FR24_A01_19 . 18.68 120.1 1.9 - PTR_FR24_A01_19 . 11.54 133.9 6.1 - extend right - PTR_FR24_A01_19 20 21.34 131.3 7.9 - # extend auto - 20 . 11.72 60.1 -2.3 - 20 . 24.25 83.3 -1.4 - 20 . 8.41 145.3 64.6 - 20 . 15.97 129.9 40.0 - 20 . 12.64 231.9 15.9 - 20 . 14.12 200.4 21.2 - 20 . 1.81 55.9 -34.2 - 20 . 8.24 91.6 -16.3 - extend right - 20 21 13.25 120.2 6.1 - # extend auto - 21 . 21.20 79.1 3.5 - 21 . 27.03 99.6 3.0 - 21 . 13.82 216.3 7.0 - 21 . 19.89 184.8 5.7 - 21 . 9.16 133.2 57.8 - 21 . 18.70 139.3 28.9 - 21 . 6.14 146.7 -11.8 - 21 . 14.14 141.3 -4.8 - extend right - 21 22 24.07 137.6 0.7 - # extend auto - 22 . 12.50 88.5 1.2 - 22 . 17.53 116.7 -3.7 - 22 . 19.99 127.7 -5.0 - 22 . 16.46 244.5 7.0 - 22 . 19.33 215.1 2.6 - 22 . 7.32 196.2 44.9 - 22 . 20.67 160.7 10.9 - 22 . 10.38 191.9 -19.2 - 22 . 14.93 152.8 -17.5 - 22 . 7.97 144.4 70.7 - extend right - 22 23 21.01 155.1 -13.1 - # extend auto - 23 . 17.29 237.9 6.0 - 23 . 23.42 201.3 0.9 - 23 . 35.04 176.1 -0.8 - 23 . 8.90 201.5 63.0 - 23 . 13.84 158.5 49.6 - 23 . 11.95 47.7 8.8 - 23 . 11.29 75.3 6.2 - 23 . 2.26 22.3 -23.8 - 23 . 4.76 140.1 -33.2 - 23 . 12.10 142.3 -15.0 - extend right - - 23 PTR_FR24_A02_24 24.18 162.8 -5.1 # PTR_FR24_A02 - # extend auto - PTR_FR24_A02_24 . 25.81 49.0 1.5 - PTR_FR24_A02_24 . 10.69 64.4 48.5 - PTR_FR24_A02_24 . 12.91 82.2 35.5 - PTR_FR24_A02_24 . 13.66 130.4 -8.2 - PTR_FR24_A02_24 . 20.98 109.3 -6.0 - PTR_FR24_A02_24 . 3.75 92.4 -27.6 - PTR_FR24_A02_24 . 14.87 96.4 -16.9 - PTR_FR24_A02_24 . 17.48 214.8 1.9 - PTR_FR24_A02_24 . 11.90 199.5 48.4 - extend left - PTR_FR24_A02_24 25 12.58 197.1 -14.8 - # extend auto - 25 . 12.47 15.4 15.8 - 25 . 7.94 103.2 2.4 - 25 . 4.98 152.3 -2.1 - 25 . 9.92 262.7 3.9 - 25 . 10.09 239.2 -10.3 - 25 . 4.68 243.1 57.1 - 25 . 5.95 207.1 21.9 - 25 . 8.39 201.3 -11.5 - 25 . 2.38 278.8 -19.9 - 25 . 6.27 228.3 -31.6 - extend left - 25 26 8.73 195.3 -32.9 - # extend auto - 26 . 1.39 81.4 -17.5 - 26 . 1.95 103.6 -26.9 - 26 . 3.44 235.8 -6.6 - 26 . 1.22 165.5 51.8 - 26 . 1.11 159.7 1.3 - 26 . 3.32 174.8 -51.6 - 26 . 4.14 157.0 -49.3 - extend right - 26 27 7.92 164.8 -40.9 - # extend auto - 27 . 4.69 253.0 5.1 - 27 . 10.44 232.5 -8.4 - 27 . 1.05 285.8 56.5 - 27 . 1.55 165.3 20.1 - 27 . 1.74 163.9 -30.9 - 27 . 4.38 36.4 10.5 - 27 . 9.30 95.3 -14.0 - 27 . 10.56 106.6 -17.1 - 27 . 8.66 145.4 -24.0 - extend right - 27 28 11.40 156.3 -21.1 - # extend auto - 28 . 9.43 59.0 -5.6 - 28 . 7.54 103.6 -3.7 - 28 . 6.01 344.5 46.6 - 28 . 3.38 165.1 64.7 - 28 . 1.33 166.7 -35.5 - 28 . 15.04 276.5 4.6 - 28 . 18.01 248.3 1.6 - 28 . 25.17 216.7 2.3 - 28 . 6.82 205.2 -16.5 - 28 . 12.45 181.1 -11.1 - 28 . 7.15 173.8 20.1 - extend right - 28 29 30.02 156.5 -2.9 - # extend auto - 29 . 15.48 47.8 6.9 - 29 . 19.97 76.7 8.9 - 29 . 15.77 242.5 12.9 - 29 . 17.79 194.6 8.3 - 29 . 8.31 323.1 36.7 - 29 . 5.53 36.7 69.3 - 29 . 11.26 104.2 29.5 - 29 . 2.37 130.2 -36.2 - 29 . 6.88 120.7 -16.1 - 29 . 4.33 335.1 -31.8 - 29 . 10.90 327.5 -7.4 - extend right - - 29 PTR_FR24_A03_30 14.82 114.9 -3.8 # PTR_FR24_A03 - # extend auto - PTR_FR24_A03_30 . 14.79 9.8 13.2 - PTR_FR24_A03_30 . 13.04 38.2 11.4 - PTR_FR24_A03_30 . 9.91 114.8 5.8 - PTR_FR24_A03_30 . 11.98 121.5 5.2 - PTR_FR24_A03_30 . 12.15 102.6 5.5 - PTR_FR24_A03_30 . 19.22 141.5 4.7 - PTR_FR24_A03_30 . 17.68 214.5 7.3 - PTR_FR24_A03_30 . 22.98 243.0 9.9 - PTR_FR24_A03_30 . 7.73 229.7 50.4 - PTR_FR24_A03_30 . 6.25 170.5 71.2 - PTR_FR24_A03_30 . 8.19 87.4 56.2 - PTR_FR24_A03_30 . 3.64 77.5 -8.7 - PTR_FR24_A03_30 . 9.72 85.5 35.9 - extend right - PTR_FR24_A03_30 31 13.97 82.1 5.2 - # extend auto - 31 . 1.66 48.2 24.6 - 31 . 3.63 200.3 3.0 - 31 . 5.22 162.9 1.8 - 31 . 3.62 173.0 -21.9 - 31 . 6.84 124.0 24.9 - extend vertical - PTR_FR24_A03_30 32 19.55 186.9 -3.7 - # extend auto - 32 . 12.52 93.1 14.6 - 32 . 6.09 266.3 6.0 - 32 . 5.85 161.2 88.6 - 32 . 1.43 237.3 -81.9 - 32 . 9.73 186.5 5.2 - 32 . 16.59 51.4 9.3 - 32 . 10.56 300.8 12.6 - extend right - 32 33 16.05 159.4 -13.4 - # extend auto - 33 . 6.78 79.1 18.5 - 33 . 7.28 261.6 22.0 - 33 . 3.68 152.9 86.4 - 33 . 1.56 276.4 -79.5 - 33 . 11.85 153.0 14.7 - 33 . 9.07 49.4 27.8 - 33 . 9.20 315.8 34.4 - 33 . 9.92 218.7 11.6 - extend left - 33 34 11.85 199.8 1.5 - # extend auto - 34 . 3.22 305.0 10.7 - 34 . 8.37 103.7 9.0 - 34 . 3.09 351.7 86.2 - 34 . 1.53 45.9 -65.0 - 34 . 13.94 55.2 5.8 - 34 . 6.44 341.0 12.6 - 34 . 6.04 266.4 12.2 - 34 . 9.82 137.4 23.0 - extend left - 34 35 8.67 207.7 10.2 - # extend auto - 35 . 10.92 78.6 10.6 - 35 . 2.43 145.9 89.0 - 35 . 8.63 238.7 12.7 - 35 . 1.65 183.4 -85.5 - 35 . 14.95 112.3 14.2 - 35 . 13.10 169.4 8.3 - 35 . 5.74 335.5 2.9 - extend left - 35 36 8.78 247.8 10.0 - # extend auto - 36 . 8.67 172.9 5.4 - 36 . 11.41 172.7 5.7 - extend vertical - - 35 PTR_FR24_A05_37 8.69 172.9 5.3 # PTR_FR24_A05_ sur bite gypse - # extend auto - PTR_FR24_A05_37 . 3.24 244.8 23.0 - PTR_FR24_A05_37 . 12.43 53.8 9.2 - PTR_FR24_A05_37 . 1.84 131.1 88.3 - PTR_FR24_A05_37 . 1.57 30.9 -68.2 - PTR_FR24_A05_37 . 5.17 144.4 13.6 - PTR_FR24_A05_37 . 9.93 317.7 7.3 - PTR_FR24_A05_37 . 14.47 40.0 8.2 - extend right - PTR_FR24_A05_37 38 6.07 93.8 4.6 - # extend auto - 38 . 6.91 74.6 13.8 - 38 . 5.24 227.8 9.0 - 38 . 1.88 174.7 84.5 - 38 . 1.45 284.8 -79.0 - extend right - 38 39 8.85 167.0 -12.8 - # extend auto - 39 . 4.91 275.0 13.4 - 39 . 9.05 50.0 15.8 - 39 . 2.46 176.7 80.6 - 39 . 1.53 270.8 -79.1 - 39 . 11.08 162.1 6.6 - extend left - 39 40 7.84 201.4 2.0 - # extend auto - 40 . 5.54 161.6 7.0 - 40 . 4.78 330.3 14.9 - 40 . 1.81 225.3 82.6 - 40 . 1.41 334.7 -75.2 - 40 . 6.94 104.0 8.2 - 40 . 6.83 298.6 8.6 - extend left - 40 41 10.61 248.7 3.2 - # extend auto - 41 . 7.60 125.4 -2.9 - 41 . 9.91 177.4 0.9 - 41 . 5.06 349.4 3.7 - 41 . 1.17 212.9 87.7 - 41 . 1.91 211.4 -84.2 - extend left - 41 42 13.83 266.1 -4.4 - # extend auto - 42 . 5.93 349.8 22.7 - 42 . 5.17 176.3 0.7 - 42 . 1.62 170.9 82.3 - 42 . 0.87 93.4 -86.0 - 42 . 6.30 23.3 14.7 - 42 . 8.51 261.2 5.3 - extend left - 42 43 6.06 256.2 -1.4 - # extend auto - 43 . 1.38 205.9 5.4 - 43 . 3.94 26.6 26.9 - 43 . 1.68 332.7 83.5 - 43 . 1.20 236.7 -54.7 - extend left - 43 44 4.52 310.2 2.9 - # extend auto - 44 . 2.95 226.3 -24.4 - 44 . 13.10 48.2 38.4 - 44 . 9.24 293.2 1.2 - 44 . 2.88 156.7 26.1 - 44 . 1.30 70.9 -78.2 - 44 . 1.09 325.4 88.0 - extend left - 44 45 7.07 311.1 -8.8 - # extend auto - 45 . 3.71 168.8 4.8 - 45 . 4.46 311.2 4.7 - 45 . 4.81 291.7 80.5 - 45 . 1.26 249.1 -77.8 - extend left - 45 46 12.62 275.8 -24.3 - # extend auto - 46 . 2.61 352.6 3.1 - 46 . 6.04 170.3 10.9 - 46 . 2.45 335.9 82.8 - 46 . 1.46 119.6 -84.4 - 46 . 5.22 219.0 5.2 - 46 . 4.03 84.6 8.5 - extend left - 46 47 12.85 242.1 -2.5 - # extend auto - 47 . 1.22 150.2 -0.6 - 47 . 2.17 304.4 8.3 - 47 . 1.52 358.0 88.3 - 47 . 0.86 333.6 -89.5 - 47 . 1.96 106.6 4.6 - 47 . 2.83 11.8 0.8 - 47 . 4.13 248.9 9.4 - extend left - 47 PTR_FR24_A06_48 4.78 245.3 2.3 # PTR_FR24_A06_ - # extend auto - PTR_FR24_A06_48 . 1.19 107.7 2.8 - PTR_FR24_A06_48 . 1.31 301.2 0.8 - PTR_FR24_A06_48 . 0.96 5.6 85.7 - PTR_FR24_A06_48 . 1.39 244.8 -84.8 - extend vertical - PTR_FR24_A06_48 49 2.32 182.0 -33.1 - # extend auto - 49 . 1.22 157.0 13.6 - 49 . 1.47 325.7 18.8 - 49 . 0.43 241.9 78.5 - 49 . 0.38 134.1 -76.3 - extend left - 49 50 5.87 234.0 -3.0 # laminoire a suivre... - 45 51 10.31 349.4 22.5 - # extend auto - 51 . 0.61 284.6 2.3 - 51 . 18.47 134.2 8.0 - 51 . 0.85 149.6 80.7 - 51 . 1.19 104.7 -70.1 - extend right - 51 52 9.88 83.0 6.3 - # extend auto - 52 . 12.11 146.7 25.2 - 52 . 10.12 194.2 12.5 - 52 . 2.64 351.8 -7.1 - 52 . 1.09 235.2 85.3 - 52 . 1.83 356.1 -84.6 - extend right - 52 53 14.63 93.9 15.2 - # extend auto - 53 . 7.84 182.3 4.1 - 53 . 6.10 11.3 3.4 - 53 . 2.69 207.3 80.8 - 53 . 3.04 241.0 -64.2 - 53 . 15.74 219.1 -1.3 - 53 . 19.02 245.7 -1.8 - 53 . 10.01 266.9 -0.9 - 53 . 5.30 326.9 -1.3 - 53 . 10.98 128.2 -0.3 - 53 . 6.92 76.7 2.3 - 53 . 12.49 87.6 1.9 - extend right - - 53 54 10.80 87.7 -12.5 # 54 pt topo 2023 35 - # extend auto - 54 . 2.39 101.4 12.5 - 54 . 4.68 303.6 7.3 - 54 . 1.73 58.8 10.0 - 54 . 1.36 172.9 -79.4 - 54 . 3.95 205.3 85.0 - extend vertical - # bouclage pt 37 - 54 PTR_FR24_A05_37 5.29 2.7 -33.4 - extend right - 31 55 4.93 146.6 -17.1 - # extend auto - 55 . 2.42 5.0 7.4 - 55 . 1.27 190.1 19.0 - 55 . 3.78 80.2 84.2 - 55 . 3.44 24.9 46.1 - 55 . 0.88 75.0 -80.7 - 55 . 7.00 73.4 -4.9 - 55 . 4.33 110.6 1.0 - extend right - 55 56 10.18 93.9 -13.6 - # extend auto - 56 . 4.07 201.2 12.0 - 56 . 3.09 351.6 12.8 - 56 . 4.81 144.5 84.5 - 56 . 1.12 221.7 -86.5 - 56 . 6.05 155.1 7.6 - 56 . 8.48 58.1 11.5 - 56 . 3.87 318.5 7.1 - extend right - 56 57 10.94 104.5 6.3 - # extend auto - 57 . 6.10 200.7 2.4 - 57 . 7.67 24.3 3.6 - 57 . 8.37 326.4 2.4 - 57 . 14.02 82.6 9.0 - 57 . 10.30 150.9 9.9 - 57 . 2.11 124.2 86.8 - 57 . 2.77 211.2 -74.8 - extend right - 57 58 17.08 121.9 12.1 - # extend auto - 58 . 5.52 39.9 6.2 - 58 . 2.32 214.2 -6.6 - 58 . 1.30 110.9 85.1 - 58 . 1.68 214.4 -86.9 - 58 . 9.81 93.9 5.8 - extend right - 58 59 12.74 122.3 2.7 - # extend auto - 59 . 10.93 50.2 -2.3 - 59 . 5.96 214.6 -0.5 - 59 . 1.84 268.1 85.4 - 59 . 2.49 255.9 -78.7 - 59 . 7.94 146.5 -0.1 - 59 . 14.86 358.7 0.9 - 59 . 12.57 120.6 -0.2 - 59 . 14.29 120.7 -0.2 - extend right - - 59 PTR_FR24_A07_60 12.55 120.7 -0.2 # PTR_FR24_A07_ - # extend auto - PTR_FR24_A07_60 . 2.52 58.6 13.3 - PTR_FR24_A07_60 . 2.35 223.8 -4.8 - PTR_FR24_A07_60 . 0.99 125.8 85.3 - PTR_FR24_A07_60 . 1.70 218.9 -78.5 - extend left - PTR_FR24_A07_60 61 4.83 250.4 -37.7 - # extend auto - 61 . 3.45 254.0 2.6 - 61 . 1.18 104.3 12.3 - 61 . 0.78 259.3 85.4 - 61 . 1.53 149.1 -78.0 - extend right - - 61 62 5.21 135.6 6.7 # non marqué, etroiture dans gypse - - 57 63 6.36 15.5 -2.8 - # extend auto - 63 . 9.55 276.4 5.7 - 63 . 4.16 93.3 12.7 - 63 . 2.46 266.1 86.3 - 63 . 1.05 94.3 -84.5 - 63 . 19.59 5.7 -6.9 - 63 . 13.22 185.6 10.5 - 63 . 8.38 286.2 -8.9 - extend right - 63 64 9.58 30.7 -8.4 - # extend auto - 64 . 8.81 35.5 -2.2 - 64 . 9.83 116.7 4.0 - 64 . 8.26 198.9 5.0 - 64 . 15.67 259.1 -3.3 - 64 . 19.65 280.3 -2.1 - 64 . 1.56 325.3 84.6 - 64 . 1.12 160.8 -84.0 - extend left - 64 65 9.67 324.1 -4.7 - # extend auto - 65 . 9.73 2.3 4.8 - 65 . 15.44 218.1 2.2 - 65 . 13.76 111.4 5.6 - 65 . 10.17 334.2 4.7 - 65 . 17.78 281.5 0.3 - 65 . 1.56 219.4 87.6 - 65 . 1.54 352.4 -88.9 - extend left - 65 66 21.63 297.4 -0.1 - # extend auto - 66 . 3.71 25.2 7.0 - 66 . 1.93 206.0 1.0 - 66 . 0.57 271.5 77.6 - 66 . 1.04 185.3 -87.3 - extend left - # arret etroiture - 66 67 10.91 307.6 -0.9 - # extend auto - 67 . 0.49 190.2 -3.8 - 67 . 0.64 10.0 1.8 - 67 . 0.54 8.3 -74.5 - 67 . 0.27 295.2 68.0 - extend right - 65 68 10.62 16.4 5.9 - # extend auto - 68 . 2.69 79.6 -3.1 - 68 . 0.44 266.3 1.3 - 68 . 0.69 352.1 84.2 - 68 . 1.01 4.1 -82.3 - extend vertical - 68 69 3.07 4.0 18.7 - # extend auto - 69 . 6.43 84.1 10.2 - 69 . 8.88 250.5 8.4 - 69 . 3.56 340.6 73.8 - 69 . 1.39 247.8 -75.6 - 69 . 21.08 0.8 12.5 - 69 . 25.84 49.5 4.3 - 69 . 22.31 278.6 1.0 - 69 . 22.91 286.3 2.6 - 69 . 4.16 101.9 -0.2 - 69 . 2.16 158.4 0.4 - extend left - 69 70 10.37 320.9 12.9 - # extend auto - 70 . 19.22 342.6 26.8 - 70 . 10.19 205.4 5.1 - 70 . 21.67 46.9 12.3 - 70 . 15.46 86.4 7.8 - 70 . 13.80 109.1 0.8 - 70 . 1.95 197.2 -79.6 - 70 . 1.70 213.8 81.6 - 70 . 6.20 330.6 75.3 - extend left - 70 71 17.68 261.0 -3.7 - # extend auto - 71 . 1.08 188.6 -1.8 - 71 . 1.20 30.5 4.7 - 71 . 0.89 270.8 80.4 - 71 . 1.30 312.9 -83.8 - extend left - 71 72 10.98 332.5 16.7 - # extend auto - 72 . 16.22 350.3 22.6 - 72 . 9.66 128.1 12.8 - 72 . 25.59 63.1 11.2 - 72 . 3.55 206.1 -2.0 - 72 . 5.55 186.6 89.6 - 72 . 1.24 111.2 -69.5 - extend right - - 72 PTR_FR24_A04_73 15.82 68.9 10.2 # PTR_FR24_A04_ - # extend auto - PTR_FR24_A04_73 . 15.77 63.7 12.6 - PTR_FR24_A04_73 . 16.28 230.0 -4.7 - PTR_FR24_A04_73 . 11.77 179.7 -1.8 - PTR_FR24_A04_73 . 25.50 115.7 -3.1 - PTR_FR24_A04_73 . 0.16 323.7 4.2 - PTR_FR24_A04_73 . 5.18 215.9 80.5 - PTR_FR24_A04_73 . 2.37 127.6 -86.7 - extend right - PTR_FR24_A04_73 74 7.12 128.1 -2.5 - # extend auto - 74 . 8.44 213.7 2.6 - 74 . 7.51 27.5 14.8 - 74 . 4.81 166.1 80.9 - 74 . 2.13 55.6 -83.3 - 74 . 7.31 179.1 -0.3 - 74 . 16.99 103.5 0.8 - 74 . 18.71 67.3 -0.2 - extend right - # boucle - 74 70 9.14 165.7 -24.0 - - 70 75 16.58 70.3 -0.5 - # extend auto - 75 . 10.00 7.4 14.2 - 75 . 0.34 159.5 -1.0 - 75 . 3.82 50.7 78.9 - 75 . 1.36 56.9 -81.4 - 75 . 10.89 68.1 6.4 - 75 . 13.26 308.8 16.6 - extend right - 75 76 10.72 88.7 -11.3 - # extend auto - 76 . 9.39 30.2 1.7 - 76 . 5.90 177.9 -6.0 - 76 . 1.18 12.4 83.8 - 76 . 1.44 94.0 -88.2 - 76 . 3.71 357.8 31.7 - 76 . 9.77 343.8 26.0 - 76 . 2.34 215.8 10.0 - extend right - - 76 PTR_FR24_A08_77 22.34 88.2 5.6 # PTR_FR24_A08 - # extend auto - PTR_FR24_A08_77 . 0.71 354.7 5.3 - PTR_FR24_A08_77 . 0.95 174.6 1.2 - PTR_FR24_A08_77 . 1.00 5.7 81.4 - PTR_FR24_A08_77 . 0.52 173.3 -79.4 - extend right - # arret etr - PTR_FR24_A08_77 78 5.38 89.6 13.8 - extend left - - PTR_FR24_A04_73 79 19.38 314.8 9.8 - # extend auto - 79 . 4.59 214.6 2.4 - 79 . 4.98 35.5 8.8 - 79 . 4.73 290.3 67.0 - 79 . 0.97 206.0 -81.0 - extend left - - 79 PTR_FR24_A09_80 4.80 307.5 39.3 # PTR_FR24_A09 jonction equipe audra pt 2 - - endcenterline - -endsurvey diff --git a/Scripts/pyCreate_th2/test/Gouffre_du_Colonney.th b/Scripts/pyCreate_th2/test/Gouffre_du_Colonney.th deleted file mode 100644 index 9fae0e2..0000000 --- a/Scripts/pyCreate_th2/test/Gouffre_du_Colonney.th +++ /dev/null @@ -1,1189 +0,0 @@ -survey Colonney_Entree -title "Gouffre du Colonney" - # Depuis entrée / Math / Will / Pierre / Alex - - - centerline - date 2024.07.15 - team "Mathilde Hamm" - team "William Gros" - team "Pierre Maleysson" - team "Alexandre Pont" - - explo-date 2024 - explo-team "CESAME" - explo-date 1983 - explo-team "GEKHA" - - cs UTM32 - fix Gouffre_du_Colonney 322803.00 5094375.00 2290.00 - station Gouffre_du_Colonney "Gouffre du colonney" entrance - - units length meters - units compass clino degrees - - data normal from to length compass clino - - extend right - Gouffre_du_Colonney 1 1.73 267.3 -20.2 - 1 2 9.13 311.4 -80.8 - # extend auto - 2 . 1.44 163.9 -1.2 - 2 . 1.52 95.7 6.4 - 2 . 1.15 341.6 -7.3 - 2 . 1.68 132.7 -60.9 - 2 . 1.99 45.9 -67.8 - - 2 3 6.19 341.2 -72.4 - # extend auto - 3 . 1.71 298.6 7.3 - 3 . 3.07 272.1 3.0 - 3 . 2.32 221.2 0.7 - 3 . 1.56 184.3 -1.2 - 3 . 5.60 229.9 80.3 - 3 . 3.73 283.9 59.4 - 3 . 4.08 350.1 84.5 - 3 . 1.81 264.6 -52.3 - - 3 4 2.27 152.4 -38.0 - # extend auto - 4 . 0.89 80.9 81.4 - 4 . 1.46 4.1 46.6 - 4 . 0.95 4.1 11.6 - 4 . 1.37 33.2 -84.9 - 4 . 1.15 265.6 8.0 - 4 . 2.47 264.1 22.4 - 4 . 0.84 289.1 -5.4 - - 4 5 6.86 104.9 -32.7 - # extend auto - 5 . 0.52 349.5 -10.0 - 5 . 0.47 339.0 50.4 - 5 . 2.54 54.6 -9.2 - 5 . 2.06 294.8 3.1 - 5 . 3.83 276.3 14.8 - 5 . 2.31 250.1 8.5 - 5 . 1.88 260.3 40.5 - 5 . 2.21 290.2 30.9 - - 5 6 3.28 52.0 -22.3 - # extend auto - 6 . 0.43 93.5 12.7 - 6 . 0.75 123.9 57.1 - 6 . 0.75 198.1 37.0 - 6 . 2.07 245.7 7.5 - 6 . 5.19 235.3 17.3 - 6 . 1.85 223.6 15.6 - 6 . 1.38 193.7 -85.9 - 6 . 1.60 189.6 -18.2 - - 6 7 3.38 168.8 -34.0 - # extend auto - 7 . 1.02 237.3 -2.3 - 7 . 0.81 223.0 49.2 - 7 . 0.67 191.8 79.6 - 7 . 1.70 320.0 51.9 - 7 . 0.61 195.2 -77.3 - 7 . 1.30 203.8 -25.8 - - 7 8 2.01 162.2 -18.6 - # extend auto - 8 . 0.75 168.9 3.0 - 8 . 0.92 77.3 13.5 - 8 . 0.89 92.1 60.6 - 8 . 0.59 195.1 23.0 - 8 . 1.01 125.1 -16.7 - 8 . 1.18 21.7 9.8 - 8 . 1.33 7.8 28.6 - 8 . 1.36 330.1 -6.3 - 8 . 1.71 353.4 -47.3 - 8 . 1.19 273.2 -74.8 - - 8 9 8.87 193.0 -84.9 - # extend auto - 9 . 0.74 240.3 15.6 - 9 . 1.13 163.7 9.2 - 9 . 1.61 90.2 10.6 - 9 . 1.75 23.1 9.0 - 9 . 3.50 2.8 53.1 - 9 . 2.74 6.4 46.3 - 9 . 6.80 226.7 77.2 - - 9 10 2.57 80.3 19.9 - # extend auto - 10 . 1.36 120.3 -3.6 - 10 . 1.72 17.4 46.4 - 10 . 7.46 284.9 86.0 - 10 . 2.82 284.4 4.0 - 10 . 3.10 258.4 6.4 - 10 . 1.95 334.7 -77.0 - 10 . 0.90 348.4 -8.7 - extend left - 10 11 2.54 5.6 -18.6 - # extend auto - 11 . 0.42 99.2 0.7 - 11 . 1.23 272.4 20.1 - 11 . 1.47 313.8 75.6 - 11 . 2.67 42.9 0.3 - 11 . 2.04 19.8 22.8 - 11 . 1.78 344.0 9.7 - 11 . 1.89 313.6 16.5 - - # arrivée petit actif imp... - 11 12 2.95 50.6 -5.9 - 11 13 4.56 289.8 15.4 - # extend auto - 13 . 0.94 171.9 13.9 - 13 . 1.96 46.5 84.0 - 13 . 0.59 1.7 43.8 - 13 . 1.68 1.8 61.0 - 13 . 3.29 278.6 42.3 - 13 . 2.44 105.3 5.6 - 13 . 2.26 88.9 10.1 - 13 . 3.59 27.5 -17.0 - 13 . 1.83 82.0 -34.2 - - 13 14 3.41 17.0 16.4 - # extend auto - 14 . 4.13 338.1 73.2 - 14 . 9.81 282.8 57.9 - 14 . 1.53 217.6 38.8 - 14 . 1.84 341.1 25.7 - 14 . 1.62 290.9 13.4 - 14 . 0.73 336.3 -13.0 - 14 . 1.53 4.5 2.4 - 14 . 2.11 217.9 -87.9 - - # escalade - 14 15 5.03 299.0 73.1 - # 13 ptr - 13 16 2.44 265.9 30.6 - # extend auto - 16 . 0.37 154.9 16.9 - 16 . 1.17 10.7 70.4 - 16 . 0.61 296.2 -11.5 - 16 . 2.45 157.5 -83.2 - 16 . 2.17 62.2 8.0 - 16 . 1.15 39.3 22.2 - - # escalade - 16 17 12.66 344.6 47.4 - # depart bas avec actif - 16 18 5.83 352.7 -39.4 - # suis vers aval ca soufflant - extend right - 10 19 5.72 105.1 -3.3 - # extend auto - 19 . 0.81 25.5 3.5 - 19 . 1.25 77.7 7.2 - 19 . 0.88 117.7 22.0 - 19 . 1.42 74.7 58.5 - 19 . 0.95 4.3 60.3 - 19 . 4.17 125.5 -82.5 - - # debut MC - 19 20 5.65 104.6 -0.7 - # extend auto - 20 . 1.36 121.5 82.8 - 20 . 0.52 38.7 73.8 - 20 . 0.52 207.0 72.7 - 20 . 0.55 30.4 20.5 - 20 . 0.56 212.1 10.1 - 20 . 0.62 249.4 9.7 - 20 . 0.70 328.9 10.5 - 20 . 0.85 209.9 -88.2 - 20 . 2.29 216.8 -72.1 - - # 21 ca soufflant haut puits arret du jour marque ptr - 20 21 4.28 120.1 0.1 - # extend auto - 21 . 0.48 316.0 76.7 - 21 . 0.39 6.7 38.3 - 21 . 0.67 217.8 17.0 - 21 . 2.96 117.4 3.7 - 21 . 3.91 125.9 2.3 - 21 . 1.04 282.9 4.0 - 21 . 1.52 333.2 6.3 - endcenterline - - centerline - date 2024.07.16 - team "William Gros" - team "Pierre Maleysson" - team "Alexandre Pont" - - explo-date 2024 - explo-team "CESAME" - explo-date 1985 - explo-team "GEKHA" - - units length meters - units compass clino degrees - - data normal from to length compass clino - - # reprise topo le 16 sans math inverse - extend left - 22 21 12.00 304.4 65.4 # Note: Ajout de 50cm pour erreur... - extend right - # extend auto - 22 . 1.05 37.3 21.6 - 22 . 1.80 336.5 21.1 - 22 . 2.84 311.5 12.7 - 22 . 1.22 254.3 15.5 - 22 . 0.93 226.7 9.5 - 22 . 1.91 99.6 14.2 - 22 . 3.64 120.5 6.4 - 22 . 5.01 136.1 11.2 - 22 . 1.03 182.2 31.2 - 22 . 7.17 56.4 77.6 - 22 . 0.53 52.9 -71.4 - - 22 23 3.53 126.1 29.4 - # extend auto - 23 . 0.45 90.9 -1.9 - 23 . 0.91 19.9 -3.3 - 23 . 2.04 133.2 -0.8 - 23 . 1.88 185.2 -2.4 - 23 . 3.48 166.7 0.6 - 23 . 0.98 253.6 2.4 - 23 . 1.58 283.2 -3.3 - 23 . 5.63 307.7 -7.5 - 23 . 5.69 314.6 -7.5 - 23 . 5.33 317.0 75.8 - 23 . 2.87 130.8 -82.6 - - 23 24 3.11 158.9 -5.0 - # extend auto - 24 . 2.52 357.4 8.9 - 24 . 1.03 44.9 9.7 - 24 . 2.63 81.4 1.9 - 24 . 0.86 110.3 5.1 - 24 . 0.84 209.0 9.9 - 24 . 1.85 275.8 22.0 - 24 . 1.98 312.6 16.8 - 24 . 2.39 336.5 19.6 - 24 . 2.37 340.0 83.3 - 24 . 1.19 21.1 -81.9 - - 24 25 1.81 90.7 -21.7 - # extend auto - 25 . 0.56 358.3 10.5 - 25 . 1.66 65.8 -4.1 - 25 . 2.14 82.7 -9.5 - 25 . 0.76 120.5 -4.9 - 25 . 0.64 228.9 3.0 - 25 . 0.70 322.7 7.0 - 25 . 1.85 42.5 68.7 - 25 . 0.81 266.9 -79.9 - - 25 26 22.81 89.3 -73.5 - # extend auto - 26 . 0.38 354.6 2.5 - 26 . 0.74 179.8 6.4 - 26 . 1.40 250.6 6.0 - 26 . 4.73 275.7 8.6 - 26 . 0.43 325.9 -5.5 - 26 . 0.52 18.4 -11.6 - 26 . 1.52 131.8 3.2 - 26 . 3.77 111.7 1.6 - 26 . 0.96 96.0 6.4 - 26 . 5.68 102.7 86.3 - 26 . 0.67 136.8 -55.7 - - 26 27 3.90 110.9 24.9 - # extend auto - 27 . 1.06 353.9 1.9 - 27 . 1.70 57.6 2.5 - 27 . 0.81 92.1 10.0 - 27 . 1.55 239.8 12.5 - 27 . 1.75 277.8 1.8 - 27 . 1.93 307.0 -3.6 - 27 . 1.30 334.9 3.7 - 27 . 4.66 311.4 84.7 - 27 . 1.71 94.9 -88.1 - 27 . 3.99 122.5 -78.7 - - 27 28 0.91 25.2 -17.4 - - 28 29 7.19 114.0 -62.4 - # extend auto - 29 . 0.72 10.9 7.0 - 29 . 1.66 317.6 2.1 - 29 . 2.36 284.5 0.1 - 29 . 1.58 248.0 2.5 - 29 . 1.44 178.9 -4.5 - 29 . 1.82 117.6 -5.3 - 29 . 2.34 87.9 -2.4 - 29 . 0.68 59.4 4.2 - 29 . 0.82 19.5 11.6 - 29 . 5.29 325.4 83.8 - 29 . 3.38 162.8 -78.0 - 29 . 3.00 144.9 -59.2 - - 29 30 6.28 120.0 -73.2 - # extend auto - 30 . 1.13 275.6 8.1 - 30 . 0.94 258.4 1.8 - 30 . 1.05 359.3 8.9 - 30 . 5.51 48.2 -1.3 - 30 . 0.84 110.5 4.0 - 30 . 0.58 159.3 11.1 - - 30 31 2.14 30.9 16.0 - # extend auto - 31 . 4.01 39.9 1.4 - 31 . 0.38 312.4 14.9 - 31 . 2.39 232.9 2.6 - 31 . 1.26 182.5 8.1 - 31 . 0.72 129.9 2.7 - 31 . 1.55 66.7 -1.1 - 31 . 4.71 54.1 -2.0 - 31 . 4.98 56.5 70.5 - 31 . 0.18 223.5 -87.6 - 31 . 4.70 352.2 -85.9 - - # 32 bs puuts borgne - 31 32 12.66 48.0 -66.4 - # 33 sur spit marqué vernis - 31 33 8.82 45.4 -37.7 - # extend auto - 32 . 2.29 171.6 -4.1 - 32 . 3.67 219.1 -0.6 - 32 . 4.05 243.2 -3.0 - 32 . 3.14 261.8 -4.9 - 32 . 1.37 290.6 -3.8 - 32 . 0.69 40.3 -5.2 - 33 . 0.62 40.5 -5.2 - 33 . 1.50 122.5 -7.2 - 33 . 13.97 208.6 79.3 - 33 . 1.70 106.2 -4.1 - 33 . 2.66 150.5 2.7 - 33 . 2.46 178.2 5.2 - 33 . 3.29 190.5 -3.4 - 33 . 6.64 226.5 -2.4 - 33 . 2.92 259.6 -2.7 - 33 . 2.72 288.2 2.6 - 33 . 1.57 189.6 68.8 - 33 . 1.14 167.4 -84.3 - 33 . 6.12 8.0 -74.9 - - # escalade - 33 34 14.72 184.7 65.0 - - 33 35 1.42 94.9 -31.4 - # extend auto - 35 . 0.55 105.1 6.5 - 35 . 0.90 351.7 13.4 - 35 . 0.78 284.9 7.2 - 35 . 1.36 140.7 -3.0 - 35 . 0.55 102.0 1.7 - 35 . 0.59 341.6 6.1 - 35 . 0.96 158.9 74.5 - 35 . 0.86 253.1 -80.8 - - # desob - 35 36 4.22 46.5 -11.5 - # extend auto - 36 . 0.83 172.6 -2.3 - 36 . 0.55 339.7 -6.5 - 36 . 0.81 264.3 8.7 - 36 . 0.99 196.7 -3.3 - 36 . 0.95 108.5 -4.5 - 36 . 0.85 70.2 5.8 - 36 . 0.62 154.8 72.0 - 36 . 0.92 330.5 -81.5 - - # desob - 36 37 2.49 91.0 -25.7 - # extend auto - 37 . 1.40 115.4 -6.6 - 37 . 1.01 219.5 4.1 - 37 . 2.45 183.2 2.5 - 37 . 2.36 173.9 -3.6 - 37 . 2.21 132.7 -75.1 - 37 . 1.03 174.6 65.3 - - 37 38 2.07 180.0 -24.8 - # extend auto - 38 . 1.36 71.5 -2.2 - 38 . 3.18 45.9 -2.3 - 38 . 1.99 21.7 2.7 - 38 . 1.74 1.3 2.9 - 38 . 1.80 23.9 47.6 - 38 . 1.80 67.4 -79.7 - - # escalade - 38 39 10.56 83.7 77.1 - - 38 40 5.59 70.7 -25.4 - # extend auto - 40 . 7.73 70.7 -25.3 - 40 . 5.58 70.8 -25.5 - 40 . 1.61 44.0 6.3 - 40 . 2.45 103.9 0.2 - 40 . 2.34 151.4 -1.1 - 40 . 4.41 189.9 -0.7 - 40 . 3.34 224.6 1.3 - 40 . 2.98 267.8 0.3 - 40 . 2.14 297.5 8.5 - 40 . 1.55 293.3 7.2 - 40 . 9.63 195.0 85.2 - 40 . 1.03 143.3 -69.5 - 40 . 5.57 63.7 65.8 - - # escalade, arrivée eau - 40 41 11.29 235.0 81.0 - - # aval avec actif - 40 42 7.57 163.4 -28.0 - # extend auto - 42 . 2.32 325.4 2.0 - 42 . 1.36 24.9 5.5 - 42 . 0.88 85.4 3.9 - 42 . 1.38 150.2 4.2 - 42 . 1.52 302.6 72.3 - 42 . 1.35 65.8 -83.5 - - # actif - 42 43 4.46 126.0 -35.4 - # extend auto - 43 . 0.59 12.5 10.0 - 43 . 0.86 312.5 7.1 - 43 . 0.94 226.6 0.6 - 43 . 0.66 176.8 11.2 - 43 . 0.65 138.2 -5.4 - 43 . 1.40 200.8 84.9 - 43 . 1.05 84.3 -83.3 - - 43 44 4.25 153.5 -39.3 - # extend auto - 44 . 1.33 13.5 6.1 - 44 . 0.70 109.5 0.7 - 44 . 6.13 118.8 -7.6 - 44 . 3.95 76.1 -1.0 - 44 . 1.90 41.7 1.7 - 44 . 1.00 19.0 3.8 - 44 . 13.80 129.3 77.7 - 44 . 1.64 109.8 -81.1 - - 44 45 4.76 104.4 -30.5 - # extend auto - 45 . 5.73 198.3 -6.2 - 45 . 2.75 227.5 -1.7 - 45 . 3.15 143.0 -1.9 - 45 . 0.54 15.6 12.6 - 45 . 3.39 321.0 24.2 - 45 . 13.67 206.4 76.1 - 45 . 1.41 231.1 -72.5 - 45 . 5.76 204.9 -15.9 - - 45 46 6.34 182.3 -42.4 - # extend auto - 46 . 1.51 230.5 3.4 - 46 . 1.93 190.2 2.0 - 46 . 2.03 72.4 8.7 - 46 . 4.25 17.3 35.4 - 46 . 5.76 285.3 34.8 - 46 . 10.36 135.3 -5.8 - 46 . 14.44 154.5 78.0 - 46 . 1.36 116.7 -81.4 - - 46 47 14.12 143.7 -34.8 - # extend auto - 47 . 4.80 227.5 4.1 - 47 . 8.41 176.6 5.6 - 47 . 8.01 286.8 17.9 - 47 . 5.25 343.8 19.4 - 47 . 8.75 327.0 32.0 - 47 . 2.91 41.7 9.1 - 47 . 3.74 102.6 7.7 - 47 . 8.36 137.0 7.8 - 47 . 9.86 172.5 -2.3 - 47 . 15.24 174.2 81.4 - 47 . 10.52 221.1 65.6 - - # actif - 47 48 8.12 163.7 -8.4 - # extend auto - 48 . 4.47 73.4 41.3 - 48 . 7.35 26.8 21.0 - 48 . 3.22 176.6 -0.1 - 48 . 9.26 151.1 -2.2 - 48 . 3.18 289.9 8.7 - 48 . 12.60 107.8 81.4 - - # bout faille - 48 49 10.11 163.7 -8.0 - - # spit haut grand puits fin topo du jour - extend left - 47 50 5.12 212.9 -1.0 - - - endcenterline - - centerline - date 2024.07.17 - team "Pierre Maleysson" - team "Alexandre Pont" - team "Vincent Lacombe" - - explo-date 2024 - explo-team "CESAME" - explo-date 1985 - explo-team "GEKHA" - - units length meters - units compass clino degrees - - data normal from to length compass clino - - extend right - # extend auto - 50 . 2.96 157.0 12.6 - 50 . 15.23 124.0 20.1 - 50 . 7.33 91.2 17.8 - 50 . 6.49 21.0 25.5 - 50 . 8.15 5.9 12.3 - 50 . 4.54 319.8 20.4 - 50 . 12.72 138.8 88.4 - 50 . 2.12 175.5 -87.7 - - # reprise le 17 vincent pierre alex - 50 51 9.89 156.9 -87.9 - # extend auto - 51 . 2.76 206.9 4.0 - 51 . 4.43 169.0 4.3 - 51 . 0.66 140.7 7.3 - 51 . 0.93 55.7 8.5 - 51 . 2.81 1.5 8.6 - 51 . 4.43 322.5 6.2 - 51 . 4.80 317.0 3.4 - 51 . 2.33 283.0 2.8 - 51 . 5.11 289.2 18.8 - 51 . 8.91 65.1 89.1 - 51 . 16.13 176.4 -80.9 - - # 51 dev - 51 52 16.22 290.3 -85.0 - # extend auto - 52 . 1.70 251.9 -2.5 - 52 . 2.65 310.5 -1.0 - 52 . 4.91 340.3 -3.3 - 52 . 3.46 15.1 -0.5 - 52 . 2.94 54.6 0.7 - 52 . 2.23 100.0 -0.5 - 52 . 1.87 129.3 -3.0 - 52 . 2.22 151.1 10.7 - 52 . 10.07 156.0 30.9 - 52 . 2.96 194.2 20.1 - 52 . 1.75 227.5 8.0 - 52 . 0.78 324.1 -56.9 - 52 . 13.95 283.5 81.6 - extend left - # 52 bas puits - 52 53 5.14 322.0 1.8 - # extend auto - 53 . 1.52 71.0 -4.7 - 53 . 0.48 260.0 -14.4 - - # sous l'eau - 53 54 5.29 303.2 -67.4 - extend right - 52 55 11.13 157.5 32.8 - - # extend auto - 55 . 2.10 35.0 -1.4 - 55 . 4.55 355.7 -0.4 - 55 . 15.44 337.8 0.1 - 55 . 4.39 316.9 4.8 - 55 . 1.00 326.4 6.9 - 55 . 3.24 127.9 20.1 - 55 . 0.81 256.2 5.8 - 55 . 1.38 111.1 -81.6 - 55 . 14.41 355.8 84.6 - - 55 56 8.86 136.2 42.5 - # extend auto - 56 . 6.44 312.9 -2.4 - 56 . 0.67 28.3 5.5 - 56 . 0.58 164.7 10.4 - 56 . 1.67 219.3 5.8 - 56 . 1.63 229.8 9.3 - 56 . 2.41 273.0 1.0 - 56 . 4.97 301.8 1.8 - 56 . 7.49 278.9 87.3 - 56 . 1.50 231.8 -72.4 - - 56 57 1.94 213.8 -11.5 - # extend auto - 57 . 1.18 65.0 3.7 - 57 . 1.70 134.8 -3.0 - 57 . 6.40 148.2 -5.2 - 57 . 0.59 194.5 -6.6 - 57 . 1.50 307.6 -2.4 - 57 . 8.16 106.8 78.6 - 57 . 1.46 256.2 -76.3 - - 57 58 6.01 159.8 -35.3 - # extend auto - 58 . 0.74 52.3 -4.5 - 58 . 0.31 242.2 6.3 - 58 . 1.31 161.6 -4.8 - 58 . 0.61 20.8 2.7 - 58 . 3.71 90.3 71.7 - 58 . 0.79 332.9 -54.1 - - 58 59 2.17 291.4 -82.9 - # extend auto - 59 . 0.42 248.9 12.0 - 59 . 0.32 100.8 -1.3 - 59 . 0.76 195.3 6.9 - 59 . 0.53 337.0 -19.0 - - 59 60 4.16 179.5 -33.3 - # extend auto - 60 . 0.38 58.2 -3.3 - 60 . 1.27 134.5 -0.3 - 60 . 1.53 326.6 13.5 - 60 . 0.78 138.4 78.9 - 60 . 0.96 219.7 -75.8 - - 60 61 3.71 156.8 -23.6 - # extend auto - 61 . 0.36 250.5 6.6 - 61 . 0.43 92.7 15.1 - 61 . 0.68 173.3 9.1 - 61 . 0.52 288.4 -6.1 - 61 . 1.29 234.2 -75.4 - 61 . 3.45 73.0 80.5 - - 61 62 3.24 168.6 -20.0 - # extend auto - 62 . 0.56 56.3 0.7 - 62 . 0.27 253.5 12.0 - 62 . 0.86 136.7 1.8 - 62 . 2.15 71.3 71.6 - 62 . 0.76 201.2 -86.1 - - 62 63 2.67 153.8 -13.5 - # extend auto - 63 . 0.55 250.2 0.4 - 63 . 0.38 66.9 2.8 - 63 . 2.92 164.5 1.1 - 63 . 2.18 217.5 -74.3 - 63 . 2.03 93.1 75.2 - - 63 64 2.38 178.0 -24.2 - # extend auto - 64 . 0.65 68.8 -10.6 - 64 . 0.30 225.3 12.5 - 64 . 2.51 347.3 9.1 - 64 . 1.61 162.2 -2.0 - 64 . 1.61 310.8 -67.4 - 64 . 2.42 43.8 70.4 - 64 . 4.70 244.2 -71.4 - - # R5 - 64 65 4.90 225.1 -70.0 - # extend auto - 65 . 0.46 74.8 2.0 - 65 . 0.35 249.5 16.7 - 65 . 1.35 176.6 6.5 - 65 . 1.28 145.9 3.2 - 65 . 3.47 160.3 1.3 - 65 . 2.78 344.7 0.1 - 65 . 5.30 65.6 67.1 - - 65 66 2.43 167.2 7.7 - # extend auto - 66 . 0.51 80.7 -7.8 - 66 . 0.26 254.7 16.7 - 66 . 5.16 80.7 66.7 - 66 . 0.99 321.1 -82.1 - - 66 67 4.77 192.2 -57.8 - extend left - 68 67 1.50 341.0 39.3 - extend right - # extend auto - 68 . 0.48 238.9 15.6 - 68 . 0.33 38.3 15.2 - 68 . 3.22 58.1 70.5 - 68 . 2.13 315.1 -50.2 - 68 . 3.56 159.7 4.9 - - 68 69 5.88 169.6 -18.3 - # extend auto - 69 . 0.47 271.7 2.9 - 69 . 1.29 313.9 5.0 - 69 . 1.25 77.1 5.3 - 69 . 3.13 142.9 10.0 - 69 . 11.17 149.7 4.1 - 69 . 2.01 175.1 8.6 - 69 . 5.86 53.7 71.8 - 69 . 1.37 218.3 -69.7 - - # y sommet p100, 70 ptr - 69 70 3.72 159.7 14.7 - # extend auto - 70 . 1.16 64.4 -0.9 - 70 . 1.96 114.1 -2.4 - 70 . 6.26 134.1 -3.5 - 70 . 8.08 152.5 -3.8 - 70 . 5.55 159.8 -5.5 - 70 . 2.53 313.3 18.0 - 70 . 3.86 92.6 68.7 - 70 . 2.57 207.6 -84.8 - 70 . 8.87 230.4 -74.6 - 70 . 3.02 119.0 -1.1 - 70 . 7.79 123.6 -14.7 - 70 . 1.33 46.7 7.4 - 70 . 2.72 16.4 7.7 - - # 71 dev - 70 71 9.03 241.1 -76.1 - # extend auto - 71 . 6.49 124.5 0.5 - 71 . 10.95 149.1 1.2 - 71 . 8.21 105.9 -0.8 - 71 . 1.57 80.6 8.9 - 71 . 1.10 356.0 5.0 - 71 . 3.84 332.8 1.8 - 71 . 3.45 172.8 -0.9 - 71 . 9.11 77.0 79.8 - 71 . 12.23 120.8 -75.8 - - # 72 y en haut grande longueur, palier gros blocs. fin du jour, dessous corde sous eau - 71 72 19.04 130.8 -81.9 - - endcenterline - - - centerline - date 2024.07.18 - team "Alexandre Pont" - team "Bertrand Hamm" - - explo-date 2024 - explo-team "CESAME" - explo-date 1985 - explo-team "GEKHA" - - units length meters - units compass clino degrees - - data normal from to length compass clino - - extend right - 73 . 7.16 105.3 3.2 - 73 . 2.47 159.6 10.9 - 73 . 1.80 199.8 7.5 - 73 . 1.34 19.4 6.4 - 73 . 9.07 308.8 4.0 - 73 . 4.27 291.5 2.1 - 73 . 13.95 107.3 61.1 - 73 . 3.64 273.2 1.5 - 73 . 13.59 129.1 2.4 - 73 . 7.00 149.9 -2.8 - 73 . 17.71 166.4 -15.0 - 73 . 14.12 176.4 -18.2 - 73 . 2.60 64.2 6.2 - 73 . 2.72 49.7 7.3 - 73 . 0.45 254.5 9.3 - 73 . 1.60 63.4 61.1 - 73 . 1.45 50.8 -81.1 - 73 . 5.11 134.6 -43.1 - 73 . 8.46 115.6 13.2 - 73 . 7.12 96.2 15.9 - 73 . 2.87 73.3 9.5 - 73 . 7.44 146.0 1.3 - 73 . 12.38 139.9 5.5 - 73 . 14.41 124.8 9.7 - - 73 . 9.31 121.7 8.2 - # extend auto - 73 . 4.27 114.5 1.9 - 73 . 3.44 105.5 -0.4 - - # reprise le 19 avec beb - 73 72 9.15 128.3 -3.7 - - extend left - 73 74 9.52 354.2 7.5 - # extend auto - 74 . 2.25 310.4 1.7 - 74 . 3.33 327.7 -3.7 - 74 . 6.56 344.7 4.6 - 74 . 2.26 343.8 8.2 - 74 . 4.99 183.7 -6.1 - 74 . 2.53 195.2 -3.3 - 74 . 1.59 226.6 6.6 - 74 . 1.37 237.1 8.8 - 74 . 2.13 80.7 86.2 - 74 . 1.60 266.9 -36.0 - 74 . 1.44 248.8 -2.0 - - 74 75 4.09 328.9 14.3 - # extend auto - 75 . 5.70 154.6 -10.2 - 75 . 1.76 130.0 -0.2 - 75 . 1.15 88.7 -1.5 - 75 . 1.43 34.4 6.9 - 75 . 2.18 1.1 -0.4 - 75 . 3.99 354.6 11.7 - 75 . 6.60 347.9 16.0 - 75 . 6.42 59.6 62.3 - 75 . 1.59 322.2 -84.1 - - # imp - 75 76 6.65 348.3 14.9 - - # e5 - 75 77 5.10 65.9 65.3 - # extend auto - 77 . 2.76 148.3 -6.2 - 77 . 1.42 121.1 -2.0 - 77 . 0.98 102.8 -2.7 - 77 . 0.70 65.5 -4.4 - 77 . 0.93 31.6 9.7 - 77 . 2.09 11.0 20.9 - 77 . 1.81 339.1 26.5 - 77 . 1.61 69.4 64.1 - 77 . 6.19 250.2 -72.9 - - 77 78 4.79 345.6 17.3 - # extend auto - 78 . 2.34 171.3 -6.6 - 78 . 1.68 187.0 -5.1 - 78 . 1.18 192.5 -2.5 - 78 . 0.73 234.7 -1.3 - 78 . 0.79 279.7 0.3 - 78 . 1.31 301.8 -1.8 - 78 . 3.59 325.5 -2.5 - 78 . 4.66 339.2 -3.9 - 78 . 0.79 222.8 77.4 - 78 . 1.56 137.7 -88.4 - 78 . 9.98 332.5 -1.6 - - 78 79 10.26 332.7 -1.5 - # extend auto - 79 . 1.32 303.1 0.1 - 79 . 1.79 310.4 1.0 - 79 . 2.20 359.4 11.4 - 79 . 1.24 16.6 14.5 - 79 . 0.77 47.6 16.1 - 79 . 1.16 114.7 14.8 - 79 . 1.87 131.0 18.7 - 79 . 2.77 141.1 10.6 - 79 . 11.07 153.8 0.3 - 79 . 4.09 161.4 4.4 - 79 . 3.30 170.6 10.4 - 79 . 2.06 193.8 3.0 - 79 . 1.55 237.4 21.5 - 79 . 0.80 255.9 4.6 - 79 . 2.36 164.1 80.5 - 79 . 1.13 266.4 -66.2 - 79 . 6.51 270.6 -58.8 - - 79 80 4.86 337.0 30.0 - # extend auto - 80 . 4.32 351.0 -4.2 - 80 . 1.79 10.2 -2.7 - 80 . 1.31 28.6 -3.6 - 80 . 1.03 58.6 -0.1 - 80 . 1.32 100.7 1.8 - 80 . 2.01 134.9 5.9 - 80 . 2.71 140.1 -3.4 - 80 . 1.65 152.9 -10.2 - 80 . 2.86 67.8 72.5 - 80 . 2.29 267.3 -75.4 - 80 . 3.94 67.0 73.0 - - 80 81 2.50 356.8 13.9 - # extend auto - 81 . 2.54 325.6 15.4 - 81 . 2.02 347.3 15.0 - 81 . 1.31 348.1 13.3 - 81 . 2.34 301.9 5.8 - 81 . 1.74 284.2 7.1 - 81 . 1.19 259.7 8.6 - 81 . 1.27 233.3 3.0 - 81 . 1.42 194.8 1.4 - 81 . 3.33 171.3 3.0 - 81 . 4.23 160.8 3.0 - 81 . 3.52 111.9 83.3 - 81 . 8.97 353.6 84.3 - 81 . 2.11 235.5 -72.7 - 81 . 9.62 4.7 82.9 - 81 . 5.99 11.6 76.3 - - 81 82 9.72 355.9 82.3 - - # 83 marque puits descendre - 81 83 4.45 291.5 31.0 - # extend auto - 83 . 0.98 176.2 -8.2 - 83 . 2.86 195.8 -9.7 - 83 . 4.94 204.7 -8.7 - 83 . 6.14 212.6 -7.3 - 83 . 4.01 217.6 -4.9 - 83 . 2.97 225.0 -4.8 - 83 . 2.57 236.6 -2.1 - 83 . 2.32 257.9 2.2 - 83 . 1.36 283.0 4.4 - 83 . 0.73 303.5 5.9 - 83 . 0.32 348.8 7.4 - 83 . 5.46 25.3 83.0 - 83 . 0.86 261.3 72.8 - 83 . 1.25 63.5 -84.4 - 83 . 4.14 215.4 -62.5 - - extend right - # puits a descendre - 83 84 17.75 209.2 -57.9 - # petit depart - extend left - 83 85 6.58 306.1 37.6 - 81 86 7.96 340.2 32.7 - # extend auto - 86 . 1.20 327.8 6.2 - 86 . 4.49 348.2 15.5 - 86 . 2.37 3.3 10.7 - 86 . 1.24 30.3 7.5 - 86 . 0.86 66.4 1.2 - 86 . 0.93 82.1 1.2 - 86 . 1.57 124.0 -5.7 - 86 . 3.06 150.3 -6.1 - 86 . 4.28 157.7 -5.1 - 86 . 1.97 167.4 -13.9 - 86 . 2.66 95.1 72.3 - 86 . 1.28 95.4 -85.5 - - 86 87 10.94 343.8 20.8 - # extend auto - 87 . 0.81 262.0 0.0 - 87 . 1.33 304.1 6.8 - 87 . 2.38 320.2 8.8 - 87 . 6.03 329.1 1.2 - 87 . 3.42 336.2 -1.8 - 87 . 0.31 77.3 12.5 - 87 . 2.16 157.6 11.5 - 87 . 1.65 177.9 3.5 - 87 . 1.07 205.6 2.9 - 87 . 0.76 231.9 5.7 - 87 . 0.89 222.4 84.8 - 87 . 1.54 243.9 -75.3 - 87 . 8.47 263.4 -57.5 - - extend right - 87 88 7.02 262.8 -56.5 - extend left - 87 89 8.12 334.9 14.3 - # extend auto - 89 . 1.07 310.5 -7.2 - 89 . 3.82 329.0 -5.2 - 89 . 2.50 352.8 7.2 - 89 . 1.30 9.4 5.5 - 89 . 0.90 36.0 4.3 - 89 . 0.36 237.2 -5.2 - 89 . 1.38 118.3 -0.1 - 89 . 2.79 146.9 -3.0 - 89 . 2.99 153.2 -4.2 - 89 . 2.94 161.1 -18.5 - 89 . 2.67 61.5 74.7 - 89 . 2.21 264.4 -71.2 - - 89 90 3.77 329.9 1.0 - # extend auto - 90 . 0.31 260.0 5.8 - 90 . 1.34 302.8 9.5 - 90 . 2.24 318.6 -0.9 - 90 . 1.23 337.7 4.5 - 90 . 1.41 21.5 15.5 - 90 . 0.96 55.5 15.9 - 90 . 1.05 90.2 15.7 - 90 . 1.95 116.2 10.6 - 90 . 0.87 164.8 -4.0 - 90 . 3.77 68.2 60.6 - 90 . 1.30 232.8 -65.7 - - 90 91 2.08 52.6 67.4 - # extend auto - 91 . 0.78 322.8 6.8 - 91 . 1.84 350.2 5.3 - 91 . 0.85 3.0 5.7 - 91 . 0.60 47.5 2.4 - 91 . 0.56 93.4 3.8 - 91 . 0.93 126.6 7.4 - 91 . 0.31 243.3 12.1 - 91 . 0.49 251.5 15.2 - 91 . 1.25 44.5 47.4 - 91 . 3.32 196.2 -70.4 - - 91 92 3.76 337.8 3.1 - # extend auto - 92 . 1.46 240.1 -1.3 - 92 . 1.53 272.7 3.5 - 92 . 1.95 289.1 6.7 - 92 . 3.36 311.1 11.3 - 92 . 2.84 342.7 15.0 - 92 . 0.37 49.2 20.4 - 92 . 0.96 342.8 27.6 - 92 . 1.54 142.0 12.7 - 92 . 2.77 168.0 20.0 - 92 . 2.68 190.8 8.6 - 92 . 2.23 201.2 1.0 - 92 . 1.67 197.2 14.5 - 92 . 2.17 300.3 80.9 - 92 . 2.25 257.1 -66.6 - - 92 93 5.84 332.7 25.4 - # extend auto - 93 . 1.06 229.1 4.2 - 93 . 2.00 268.1 13.0 - 93 . 2.99 284.1 11.2 - 93 . 2.34 294.7 16.0 - 93 . 2.22 320.5 18.2 - 93 . 1.56 333.6 14.6 - 93 . 0.44 38.2 3.6 - 93 . 0.91 132.2 2.1 - 93 . 0.83 162.7 4.5 - 93 . 0.72 172.3 10.4 - 93 . 1.50 248.0 82.7 - 93 . 1.02 134.2 -63.4 - - 93 94 3.25 266.0 34.7 - # extend auto - 94 . 1.14 294.8 16.4 - 94 . 0.71 328.0 11.5 - 94 . 0.63 354.4 4.7 - 94 . 0.90 32.9 2.5 - 94 . 0.97 54.9 -3.6 - 94 . 1.10 78.7 0.1 - 94 . 0.90 120.9 11.2 - 94 . 0.34 144.5 11.8 - 94 . 4.20 0.4 74.2 - 94 . 4.10 5.7 76.1 - 94 . 4.74 8.5 73.0 - 94 . 1.86 38.3 -83.0 - - 94 95 5.04 314.4 59.0 - # extend auto - 95 . 1.04 186.9 3.0 - 95 . 1.20 210.6 0.9 - 95 . 1.36 222.3 -1.8 - 95 . 2.24 236.3 -5.4 - 95 . 2.29 258.1 -2.2 - 95 . 2.47 269.8 2.3 - 95 . 1.88 295.7 6.8 - 95 . 1.71 308.7 11.0 - 95 . 0.97 324.2 21.3 - 95 . 0.43 8.8 26.5 - 95 . 0.85 130.1 6.4 - 95 . 0.34 167.1 0.9 - 95 . 0.31 173.6 5.0 - 95 . 1.25 237.1 79.7 - 95 . 1.01 189.1 77.2 - 95 . 3.20 274.3 70.0 - 95 . 0.99 178.0 -64.9 - 95 . 3.35 195.4 -55.4 - - # 96 bas escalade a suivre marqué - 95 96 2.25 256.8 -10.4 - # extend auto - 96 . 0.81 0.4 13.9 - 96 . 1.51 33.2 12.6 - 96 . 2.04 64.6 12.5 - 96 . 2.86 92.5 8.6 - 96 . 2.11 102.3 8.5 - 96 . 1.18 115.2 5.9 - 96 . 0.44 155.8 -4.4 - 96 . 0.34 279.4 10.4 - 96 . 14.56 35.0 63.3 - 96 . 3.80 16.2 73.1 - 96 . 1.87 90.1 -66.8 - - # escalade , 96 ptr 96 - 96 97 14.69 43.1 65.6 - - extend left - # vers bas p100 - 73 98 9.30 209.7 -65.1 - # extend auto - 98 . 19.16 151.3 27.0 - 98 . 2.32 113.4 21.5 - 98 . 22.11 108.8 44.3 - 98 . 14.44 109.9 -12.1 - 98 . 3.37 212.6 14.3 - 98 . 1.12 15.7 21.2 - 98 . 5.41 306.0 24.0 - 98 . 8.28 299.2 25.9 - 98 . 4.53 278.3 36.9 - 98 . 2.95 226.7 9.8 - - 98 99 14.08 330.5 -84.7 - # extend auto - 99 . 0.78 336.2 7.6 - 99 . 5.32 257.5 2.2 - 99 . 7.31 238.0 2.8 - 99 . 1.26 203.2 2.7 - 99 . 13.26 102.1 -0.2 - 99 . 6.64 103.7 0.7 - 99 . 3.79 118.9 1.8 - 99 . 1.85 140.5 2.4 - 99 . 1.49 192.8 6.0 - - 99 100 11.54 236.8 -73.3 - # extend auto - 100 . 4.17 255.9 14.7 - 100 . 16.68 93.3 6.0 - 100 . 2.02 42.1 8.8 - 100 . 1.18 350.0 15.6 - 100 . 9.74 271.4 -63.9 - - 100 101 15.20 264.2 -75.8 - # extend auto - 101 . 9.89 85.3 33.6 - 101 . 9.07 196.0 -5.0 - 101 . 1.76 140.6 5.8 - 101 . 1.98 97.4 29.5 - 101 . 0.59 340.1 23.4 - - 101 102 8.94 185.8 -29.6 - # extend auto - 102 . 2.23 344.7 1.5 - 102 . 4.33 22.9 4.7 - 102 . 3.16 35.0 7.7 - 102 . 9.67 24.5 29.6 - 102 . 5.51 237.6 16.5 - 102 . 5.22 282.2 7.8 - 102 . 2.31 313.2 3.5 - 102 . 10.43 272.7 55.4 - 102 . 1.73 338.4 -80.5 - 102 . 7.99 25.5 -76.7 - 102 . 20.81 260.2 -75.2 - - # Marqué 103 - 102 103 5.57 255.6 12.7 - # extend auto - 103 . 2.07 359.9 5.5 - 103 . 3.25 37.9 0.1 - 103 . 7.82 65.0 0.0 - 103 . 4.61 72.7 3.7 - 103 . 6.83 71.9 4.0 - 103 . 3.88 84.3 2.2 - 103 . 3.32 112.5 3.2 - 103 . 1.35 155.7 10.6 - 103 . 2.56 160.6 5.0 - 103 . 1.06 205.4 2.5 - 103 . 3.31 261.9 12.5 - 103 . 7.02 309.9 29.2 - 103 . 7.73 48.4 -67.1 - 103 . 20.83 121.1 -76.7 - - # 104, bas p100 ? sous amarrage fin du jour - 103 104 20.85 283.8 -88.7 - - endcenterline -endsurvey diff --git a/Scripts/pyCreate_th2/therion.log b/Scripts/pyCreate_th2/therion.log deleted file mode 100644 index 350b9cf..0000000 --- a/Scripts/pyCreate_th2/therion.log +++ /dev/null @@ -1,6 +0,0 @@ -therion 6.3.1 (2024-11-22) - - using Proj 9.4.1, compiled against 9.4.1 -initialization file: C:\Program Files\Therion/therion.ini -reading ... done -C:\Program Files\Therion\therion.exe: error -- can't open file for input -- B3_Amonts.thconfig -Press ENTER to exit! \ No newline at end of file