Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hallo zusammen,

 

ich stehe gerade auf dem Schlauch bezüglich des Formats des Längengrades.

Laut Doku sind Breiten- und Längengrad im Format DD.dddddd°.

Sollte das Format des Längengrad nicht DDD.dddddd° sein?

Der Hooverdamm z.B. hat die Koordinaten 36.016196° N 114.737252° W

 

Danke für eure Hilfe

temp

Geschrieben

Der Längengrad kann in der Tat DDD haben, das ändert aber nichts an den Formeln um das umzurechnen.

 

Wir benutzen im Brick Viewer folgende Funktionen für die unterschiedlichen Formate:

 

    def make_ddmm_mmmmm(self, degree):
        dd = degree / 1000000
        mm = (degree % 1000000) * 60 / 1000000.0
        mmmmm = (mm - int(mm)) * 100000

        dd_str = str(dd)
        mm_str = str(int(mm))
        mmmmm_str = str(int(mmmmm + 0.5))

        while len(mm_str) < 2:
            mm_str = '0' + mm_str

        while len(mmmmm_str) < 5:
            mmmmm_str = '0' + mmmmm_str

        return u'{0}° {1}.{2}’'.format(dd_str, mm_str, mmmmm_str)

    def make_dd_dddddd(self, degree, url=False):
        if url:
            return '%2.6f' % (degree / 1000000.0)
        else:
            return u'%2.6f°' % (degree / 1000000.0)

    def make_ddmmss_sss(self, degree):
        dd = degree / 1000000
        mm = (degree % 1000000) * 60 / 1000000.0
        ss = (mm - int(mm)) * 60
        sss = (ss - int(ss)) * 1000

        dd_str = str(dd)
        mm_str = str(int(mm))
        ss_str = str(int(ss))
        sss_str = str(int(sss + 0.5))

        while len(mm_str) < 2:
            mm_str = '0' + mm_str

        while len(ss_str) < 2:
            ss_str = '0' + ss_str

        while len(sss_str) < 3:
            sss_str = '0' + sss_str

        return u'{0}° {1}’ {2}.{3}’’'.format(dd_str, mm_str, ss_str, sss_str)

 

Dabei kann "DD" immer auch "D" oder "DDD" werden, je nachdem wo man sich befindet ;).

Geschrieben
  • Autor

Danke für die Info, genau so habe ich meinen Ausgabestring auch formatiert.

Wie gesagt hat mich die Doku etwas verwirrt.

Ich hoffe, ich komme nächstes Jahr dann auch dazu es mit einem dreistelligen Längengrad zu testen ;)

 

Viele Grüße

temp

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.