Bin noch Anfänger in python wie auch in linux (Raspian/Raspberry)
Ich würde gerne von einem GPS-Empfänger die WGS84-Koordinaten in Schweizer-Koordinaten (LV95) transformieren. Dazu gibt es von swisstopo.ch eine DLL bzw. je nach System Bibliotheken.
https://shop.swisstopo.admin.ch/de/prod ... e/DLL_info
Es gibt ein Beispiel-Code für Python mit Hilfe von COMTYPES - schön und gut aber irgendwann habe ich rausgefunden, dass diese für Python mit Windowssystemen sind und nicht Linux. Oder verstehe ich was falsch?
Kann mir jemand Tipps geben, wie ich hier ans Ziel komme. (Grundlagenstudium bin ich dran

Danke und Gruss
Code: Alles auswählen
import os
try:
#Load Reframe COM library
from comtypes.client import GetModule, CreateObject
GetModule(os.environ["ProgramFiles"] + "\\swisstopo\\ReframeDLL\\swisstopoReframeLib.tlb")
#Create a new Reframe object
from comtypes.gen.swisstopoReframeLib import Reframe
o=CreateObject(Reframe)
Federal Office of Topography swisstopo Report 09-07
REFRAME library Page 24
#Input coordinates: read in a file, got from a textbox, #or obtained through another method or library...
e_lv03 = 601000.0
n_lv03 = 197500.0
h_ln02 = 555.0
#Transform LV03 coordinates to LV95 and LN02 height to Bessel
result = o.ComputeReframe(e_lv03, n_lv03, h_ln02, 0, 1, 0, 2)
#Save results to variables
e_lv95 = result[0]
n_lv95 = result[1]
h_bessel = result[2]
retcode = result[3]
#Analyze result
if retcode == 1: #OK
… #TODO
else: #Error
… #TODO