pyCreateTh update

This commit is contained in:
Alex38Lyon committed 2026-11-19 18:51:48 +01:00
1 parent f900462feb
commit 98fb6dc75e
10 files changed
+2164 -2660

No files matched your search

+70 -72
View File
@@ -1,16 +1,16 @@
"""
!#############################################################################################!
global_data.py for pyCreateTh.py
global_data.py for pyCreateTh.py
!#############################################################################################!
"""
Version = "2026.01.08"
Version = "2026.11.19"
#################################################################################################
error_count = 0 # Compteur d'erreurs
debug_log = False # Mode debug des messages
error_count = 0 # Compteur d'erreurs
## [Survey_Data] default values
Author = "Created by pyCreateTh.py"
@@ -28,7 +28,7 @@ templatePath = "./Template"
stationByScrap = 20
finalTherion_exe = True
therionPath = "C:/Therion/therion.exe"
SurveyPrefixName = f"Survey_"
SurveyPrefixName = "Survey_"
linesInTh2 = True
stationNamesInTh2 = True
wallLinesInTh2 = True
@@ -39,33 +39,35 @@ parse_tro_files_by_explo = True
#################################################################################################
THERION_KEYWORDS = {
"centerline",
"centerline",
"endcenterline",
"date",
"units",
"flags",
"date",
"units",
"flags",
"team",
"calibrate",
"data",
"calibrate",
"data",
"declination",
"fix",
"station",
"fix",
"station",
"equate",
"cs",
"extend",
"infer",
"cs",
"extend",
"infer",
"explo-team",
"instrument",
"grade",
"clino",
"compass",
"length",
"reverse",
"topofil",
"duplicate",
"instrument",
"grade",
"clino",
"compass",
"length",
"reverse",
"topofil",
"duplicate",
"not",
}
#################################################################################################
# tot file template #
#################################################################################################
totfile = """\t## Survey file:
\tinput Data/{TH_NAME}.th
@@ -81,6 +83,8 @@ totfile = """\t## Survey file:
"""
#################################################################################################
# Th file template #
#################################################################################################
thFileDat = """
encoding utf-8
@@ -93,6 +97,7 @@ survey {SURVEY_NAME} -title "{SURVEY_TITLE}"
\t\t# team "{SURVEY_TEAM}"
{FIX_POINTS}
\t\texplo-date {EXPLO_DATE}
\t\t# explo-team "{EXPLO_TEAM}"
{CORRECTIONS}{DECLINATION}
@@ -109,7 +114,8 @@ endsurvey
{SOURCE}
"""
#################################################################################################
# thconfig template (minimal) #
#################################################################################################
thconfigTemplate = """
source "{th_file}"
@@ -152,9 +158,9 @@ endscrap
"""
th2Point = """\tpoint {x} {y} station -name {station}"""
th2Name = """\tpoint {x} {y} station-name -align tr -scale xs -text {station}"""
th2Name = """\tpoint {x} {y} station-name -align tr -scale xs -text {station}"""
th2Line = """
th2Line = """
line u:Shot_Survey
\t{x1} {y1}
\t{x2} {y2}
@@ -173,49 +179,41 @@ endscrap
#################################################################################################
datumToEPSG = {
# Datums globaux
"wgs84": "326", # UTM Nord (WGS84) - EPSG:326XX
"wgs1984": "326", # UTM Nord (WGS84) - EPSG:326XX
"etrs89": "258", # UTM Nord (ETRS89) - Europe
# Datums européens
"european1950": "230", # ED50 / UTM Nord - Europe
"ed50": "230",
# Datums nord-américains
"nad27": "267", # UTM Nord (NAD27) - Amérique du Nord
"northamericandatum1927": "267",
"northamerican1927": "267",
"nad83": "269", # UTM Nord (NAD83) - Amérique du Nord
"northamericandatum1983": "269",
"northamerican1983" : "269",
# Datums français
"ntf": "275", # UTM Nord (NTF) - France (Paris)
"nouvelletriangulationfrançaise": "275",
# Datums africains
"clarke1880": "297", # UTM Nord (Clarke 1880) - Afrique
# Datums australiens
"agd66": "202", # UTM Nord (AGD66) - Australie
"australiangeodeticdatum1966": "202",
"australiangeodetic1966": "202",
"agd84": "203", # UTM Nord (AGD84) - Australie
"australiangeodeticdatum1984": "203",
"australiangeodetic1984": "203",
"gda94": "283", # UTM Nord (GDA94) - Australie
"geocentricdatumofaustralia1994": "283",
"geocentricofaustralia1994": "283",
# Datums asiatiques
"pulkovo1942": "284", # UTM Nord (Pulkovo 1942) - Russie/CEI
"beijing1954": "214", # UTM Nord (Beijing 1954) - Chine
# Datums sud-américains
"sad69": "291", # UTM Nord (SAD69) - Amérique du Sud
"southamericandatum1969": "291",
"southamerican1969": "291",
"sirgas2000": "319", # UTM Nord (SIRGAS 2000) - Amérique Latine
# Datums globaux
"wgs84": "326", # UTM Nord (WGS84) - EPSG:326XX
"wgs1984": "326", # UTM Nord (WGS84) - EPSG:326XX
"etrs89": "258", # UTM Nord (ETRS89) - Europe
# Datums européens
"european1950": "230", # ED50 / UTM Nord - Europe
"ed50": "230",
# Datums nord-américains
"nad27": "267", # UTM Nord (NAD27) - Amérique du Nord
"northamericandatum1927": "267",
"northamerican1927": "267",
"nad83": "269", # UTM Nord (NAD83) - Amérique du Nord
"northamericandatum1983": "269",
"northamerican1983": "269",
# Datums français
"ntf": "275", # UTM Nord (NTF) - France (Paris)
"nouvelletriangulationfrançaise": "275",
# Datums africains
"clarke1880": "297", # UTM Nord (Clarke 1880) - Afrique
# Datums australiens
"agd66": "202", # UTM Nord (AGD66) - Australie
"australiangeodeticdatum1966": "202",
"australiangeodetic1966": "202",
"agd84": "203", # UTM Nord (AGD84) - Australie
"australiangeodeticdatum1984": "203",
"australiangeodetic1984": "203",
"gda94": "283", # UTM Nord (GDA94) - Australie
"geocentricdatumofaustralia1994": "283",
"geocentricofaustralia1994": "283",
# Datums asiatiques
"pulkovo1942": "284", # UTM Nord (Pulkovo 1942) - Russie/CEI
"beijing1954": "214", # UTM Nord (Beijing 1954) - Chine
# Datums sud-américains
"sad69": "291", # UTM Nord (SAD69) - Amérique du Sud
"southamericandatum1969": "291",
"southamerican1969": "291",
"sirgas2000": "319", # UTM Nord (SIRGAS 2000) - Amérique Latine
}