Attribut-Tags umbenannt: N_SEPARATOREN → ANZAHL_SEPARATOR, N_SCANNER → ANZAHL_SCANNER

This commit is contained in:
2026-07-20 13:04:47 +02:00
parent f38b06ddf5
commit 57a9f09898
3 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -109,9 +109,9 @@ def build_kreisel_details(block):
hoehe_m = "0"
return {
"Abstand (Kreiselachse A - Kreiselachse) in Meter": abstand_m,
"Anzahl der Separatoren": attribs.get("N_SEPARATOREN", "2"),
"Anzahl der Separatoren": attribs.get("ANZAHL_SEPARATOR", attribs.get("N_SEPARATOREN", "2")),
"Kreiselart": attribs.get("KREISELART", "STANDARD"),
"Anzahl der Scanner": attribs.get("N_SCANNER", "0"),
"Anzahl der Scanner": attribs.get("ANZAHL_SCANNER", attribs.get("N_SCANNER", "0")),
"Anzahl der Rampen": attribs.get("N_RAMPEN", "0"),
"Hoehe in m": hoehe_m,
"Drehrichtung": attribs.get("DREHRICHTUNG", "UZS"),
@@ -254,7 +254,7 @@ def process_blocks(blocks, lookup):
kreisel_list.append(block)
attribs = block.get("attribs", {})
counters["anzahl_kreisel"] += 1
n_sep = int(attribs.get("N_SEPARATOREN", "2") or "2")
n_sep = int(attribs.get("ANZAHL_SEPARATOR", attribs.get("N_SEPARATOREN", "2")) or "2")
kreiselart = attribs.get("KREISELART", "STANDARD")
if kreiselart == "PIN":
counters["anzahl_kreisel_pinband"] += 1
@@ -264,7 +264,7 @@ def process_blocks(blocks, lookup):
abstand_mm = float(attribs.get("ABSTAND", "2300") or "2300")
counters["laengen_kreisel"] += abstand_mm / 1000.0
counters["anzahl_separatoren"] += n_sep
counters["anzahl_scanner"] += int(attribs.get("N_SCANNER", "0") or "0")
counters["anzahl_scanner"] += int(attribs.get("ANZAHL_SCANNER", attribs.get("N_SCANNER", "0")) or "0")
if counters["anzahl_streckengruppen"] == 0:
counters["anzahl_streckengruppen"] = 1
continue