v2.1: Umfangreiche Überarbeitung
Änderungen: 1. Export-Dialog: Neuer wiederverwendbarer Dialog mit 4 Radio-Buttons (COR, CSV, TXT, DXF) - Für alle Export-Funktionen im Programm verfügbar - COR als Standard vorausgewählt 2. COR/CSV-Format korrigiert: - KEINE Header-Zeile mehr - Komma als Trenner (nicht Semikolon) - Format: PunktID,X,Y,Z 3. Transformation Tab: - Y-Richtung-Feld komplett entfernt - Nur noch: XY-Nullpunkt und Z-Nullpunkt - Neue compute_translation_only() Methode 4. Georeferenzierung - Komplett neuer Workflow: - Button 'Punktdatei laden' für Soll-Koordinaten - Tabelle mit Dropdown zur Zuordnung JXL-Punkte - Anzeige von Soll- und Ist-Koordinaten - Automatische Punkt-Zuordnung bei gleichem Namen 5. JXL-Analyse TreeView: - Verbesserte Darstellung und Layouting - Prismenkonstanten als editierbare SpinBox - Qualitätswerte farbcodiert (grün/gelb/rot) - Checkboxen für Passpunkte
This commit is contained in:
parent
e8ce645a51
commit
05a40b12a0
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
|
@ -259,42 +259,16 @@ class CORGenerator:
|
||||||
|
|
||||||
return self.cor_points
|
return self.cor_points
|
||||||
|
|
||||||
def write_cor_file(self, output_path: str, include_header: bool = True) -> str:
|
def write_cor_file(self, output_path: str, include_header: bool = False) -> str:
|
||||||
"""Schreibt die COR-Datei"""
|
"""
|
||||||
|
Schreibt die COR-Datei
|
||||||
|
Format: PunktID,X,Y,Z (Komma-getrennt, KEINE Header-Zeile)
|
||||||
|
"""
|
||||||
lines = []
|
lines = []
|
||||||
|
|
||||||
# Sammle eindeutige Stationsstarts für Header
|
|
||||||
ref_line = self.parser.get_reference_line()
|
|
||||||
stations_sorted = sorted(self.parser.stations.items(),
|
|
||||||
key=lambda x: x[1].timestamp)
|
|
||||||
|
|
||||||
current_station_idx = 0
|
|
||||||
written_points = set()
|
|
||||||
|
|
||||||
for station_id, station in stations_sorted:
|
|
||||||
# Header für neue Station (Referenzlinie)
|
|
||||||
if station.station_type == 'ReflineStationSetup' and ref_line:
|
|
||||||
if include_header:
|
|
||||||
# Markdown-Style Header
|
|
||||||
lines.append(f"|{ref_line.start_point} |0.000 |0.000.1 |0.000.2 |")
|
|
||||||
lines.append("|----:|----:|----:|----:|")
|
|
||||||
|
|
||||||
# Punkte von dieser Station
|
|
||||||
measurements = self.parser.get_measurements_from_station(station_id)
|
|
||||||
for meas in measurements:
|
|
||||||
if meas.name and meas.name not in written_points:
|
|
||||||
# Finde den COR-Punkt
|
|
||||||
for cp in self.cor_points:
|
|
||||||
if cp.name == meas.name:
|
|
||||||
lines.append(cp.to_cor_line())
|
|
||||||
written_points.add(meas.name)
|
|
||||||
break
|
|
||||||
|
|
||||||
# Verbleibende Punkte
|
|
||||||
for cp in self.cor_points:
|
for cp in self.cor_points:
|
||||||
if cp.name not in written_points:
|
# Format: Name,X,Y,Z (ohne Header, Komma als Trenner)
|
||||||
lines.append(cp.to_cor_line())
|
lines.append(f"{cp.name},{cp.x:.4f},{cp.y:.4f},{cp.z:.4f}")
|
||||||
written_points.add(cp.name)
|
|
||||||
|
|
||||||
content = "\n".join(lines)
|
content = "\n".join(lines)
|
||||||
|
|
||||||
|
|
@ -304,11 +278,15 @@ class CORGenerator:
|
||||||
return content
|
return content
|
||||||
|
|
||||||
def export_csv(self, output_path: str) -> str:
|
def export_csv(self, output_path: str) -> str:
|
||||||
"""Exportiert als CSV-Datei"""
|
"""
|
||||||
lines = ["Punktname;East;North;Elevation"]
|
Exportiert als CSV-Datei
|
||||||
|
Format: PunktID,X,Y,Z (Komma-getrennt, KEINE Header-Zeile)
|
||||||
|
"""
|
||||||
|
lines = []
|
||||||
|
|
||||||
for cp in self.cor_points:
|
for cp in self.cor_points:
|
||||||
lines.append(f"{cp.name};{cp.x:.4f};{cp.y:.4f};{cp.z:.4f}")
|
# Format: Name,X,Y,Z (ohne Header, Komma als Trenner)
|
||||||
|
lines.append(f"{cp.name},{cp.x:.4f},{cp.y:.4f},{cp.z:.4f}")
|
||||||
|
|
||||||
content = "\n".join(lines)
|
content = "\n".join(lines)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,42 @@ class CoordinateTransformer:
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def compute_translation_only(self,
|
||||||
|
xy_origin_name: str,
|
||||||
|
z_reference_name: Optional[str] = None) -> bool:
|
||||||
|
"""
|
||||||
|
Berechnet nur Translation (KEINE Rotation):
|
||||||
|
- xy_origin_name: Punkt wird zum Ursprung (0,0)
|
||||||
|
- z_reference_name: Punkt definiert Z=0
|
||||||
|
"""
|
||||||
|
# Finde Punkte
|
||||||
|
xy_origin = None
|
||||||
|
z_ref = None
|
||||||
|
|
||||||
|
for p in self.original_points:
|
||||||
|
if p.name == xy_origin_name:
|
||||||
|
xy_origin = p
|
||||||
|
if z_reference_name and p.name == z_reference_name:
|
||||||
|
z_ref = p
|
||||||
|
|
||||||
|
if xy_origin is None:
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Nur Translation, keine Rotation
|
||||||
|
self.params.dx = -xy_origin.x
|
||||||
|
self.params.dy = -xy_origin.y
|
||||||
|
self.params.rotation_gon = 0.0
|
||||||
|
self.params.pivot_x = 0.0
|
||||||
|
self.params.pivot_y = 0.0
|
||||||
|
|
||||||
|
# Z-Verschiebung
|
||||||
|
if z_ref:
|
||||||
|
self.params.dz = -z_ref.z
|
||||||
|
else:
|
||||||
|
self.params.dz = -xy_origin.z
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def transform(self) -> List[CORPoint]:
|
def transform(self) -> List[CORPoint]:
|
||||||
"""Führt die Transformation durch"""
|
"""Führt die Transformation durch"""
|
||||||
self.transformed_points = []
|
self.transformed_points = []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue