Datenimport angepasst und Abfrage Näaherungskoordinaten lokales Horizontsystem

This commit is contained in:
2025-12-08 18:05:30 +01:00
parent 824c8fe938
commit 74d467e957
4 changed files with 228 additions and 12 deletions

View File

@@ -6,6 +6,10 @@ class Import:
self.pfad_datenbank = pfad_datenbank
pass
def string_to_float(self, zahl):
zahl = zahl.replace(',', '.')
return float(zahl)
def import_koordinaten_lh_tachymeter(self, pfad_datei):
liste_punktnummern = []
liste_punktnummern_vorher = []
@@ -45,7 +49,7 @@ class Import:
for row in r:
cursor.execute(
"INSERT INTO Netzpunkte (punktnummer, naeherungx_lh, naeherungy_lh, naeherungz_lh) VALUES (?, ?, ?, ?)",
(row[0], row[1], row[2], row[3]))
(row[0], self.string_to_float(row[1]), self.string_to_float(row[2]), self.string_to_float(row[3])))
con.commit()
cursor.close()