-
Notifications
You must be signed in to change notification settings - Fork 3
Coordinate conversion help #2
Description
Hi! I came across this library a few weeks ago and was just trying to integrate it within a project of mine. I'm running into some issues though was wondering if you might be able to help me understand them 🙈 I unfortunately don't have a lot of experience dealing with coordinate systems in general.
I'm developing a library dealing with our local public transport provider in Dresden, Germany. Unfortunately their API doesn't provide WGS84 coordinates, but as far as I've figured out something called GaussKrueger. They look a lot like the UTM points in your readme, which is the entire reason I'm here.
I am however not getting anything sensible when trying to convert them using Geotum. Having looked at the tests I've tried the following.
let utmCoordinate = UTMPoint(easting: 5656979, northing: 4621548, zone: 5, hemisphere: .northern)
let wgsCoordinate = UTMConverter(datum: .wgs84).coordinateFrom(utm: utmCoordinate)
// LatLonCoordinate(latitude: 0.517059907625437 rad, longitude: -1.79271322321059 rad)Interestingly enough I believe that Dresden should be in zone 5, but their coordinates appear to be based in zone 4 (kiliankoe/DVB#20 (comment)). Using zone 4 in the example above also doesn't lead to an output I can understand.
The GK4 coordinates listed above should correlate with 51.0411199, 13.7308041.
On other platforms I've been able to use wrappers for proj4 to handle the conversion, but that unfortunately doesn't really seem to be an option for the Swift ecosystem.
I'd be extremely grateful for any kind of input on this! I've been stuck on this for several months now 😕