Gefällestrecke in Sivas und csv Exports eingebaut

This commit is contained in:
2026-07-02 13:19:30 +02:00
parent 3dd6e091e0
commit 05a7000d33
2 changed files with 103 additions and 12 deletions
+33
View File
@@ -79,6 +79,25 @@ def build_weiche_merkmale(block, eintrag):
}
def build_variofoerderer_merkmale(block):
attribs = block.get("attribs", {})
return {
"Typ": attribs.get("TYP", ""),
"Seite": attribs.get("SEITE", ""),
"Winkel": attribs.get("WINKEL", ""),
"DeltaH_mm": attribs.get("DELTA_H", ""),
"DeltaL_mm": attribs.get("DELTA_L", ""),
"L_VF_m": attribs.get("L_VF_m", ""),
"L_GF_m": attribs.get("L_GF_m", ""),
"Montagehoehe_m": attribs.get("MONTAGEHOEHE_m", ""),
"Hoehe_Von_mm": attribs.get("HOEHE_VON", ""),
"Hoehe_Bis_mm": attribs.get("HOEHE_BIS", ""),
"Antriebfahrtrichtung": attribs.get("ANTRIEBFAHRTRICHTUNG", ""),
"Anzahl_Separator": attribs.get("ANZAHL_SEPARATOR", ""),
"Anzahl_Scanner": attribs.get("ANZAHL_SCANNER", ""),
}
def build_gerade_merkmale(block):
return {
"Anzahl der Separatoren": "0",
@@ -135,6 +154,7 @@ def process_blocks(blocks, lookup):
weiche_count = {}
gerade_count = 0
kreisel_count = 0
vf_count = 0
for block in blocks:
bname = block.get("block_name", "")
@@ -183,6 +203,19 @@ def process_blocks(blocks, lookup):
})
continue
# VarioFoerderer Compound-Block (VF_N)
if bname.startswith("VF_"):
elem_nr += 1
vf_count += 1
items.append({
"nr": elem_nr,
"teileart": "VarioFoerderer",
"teileid": block.get("attribs", {}).get("ID", "0000"),
"bezeichnung": f"VarioFoerderer :{vf_count}",
"merkmale": build_variofoerderer_merkmale(block),
})
continue
# ILS Kreisel (Compound-Bloecke mit Praefix KR_)
if bname.startswith("KR_"):
elem_nr += 1