; ; GOODE HOMOLOSINE ; ================ ; ; Name: Goode Homolosine ; Autor: Goode ; Quelle: G I Evenden: Libproj4 Preliminary Draft March 2005 ; Richtung: Invers ; ; Maßstab und Berührungsparallel werden abgefragt. ; Die Zielbildgeometrie wird dem Sekundäroperanden oder einem Fixbild entnommen. ; Der Berührungspunkt wird bildmittig gesetzt. ; ; (C) Rolf Böhm 2006 ; Used Variables ; ============== ; ; Coordinates ; _name Goode~Homolosine _var phi ; Geographische Breite _var lambda ; Geographische Länge _var delta ; Poldistanz/geographisch, auch Schiefdistanz _var psi ; Parameter Psi _var sinpsi ; sin davon _var sin2psi ; sin von 2*psi _var cospsi ; cos davon _var cosphi ; cos phi _var t1 ; Temporär 1 _var 40.73° ; 40.73° in arc _var -40.73° ; 40.73° south ; ; Constants ; _var lambda0 ; Geogr. Länge des Bildmittelpunktes _var scale ; Kartenmaßstabszahl (also 1000000, nicht 1/1000000) _var \/2 ; Wurzel aus 2 (Ja, Variablenname »\/2« ist in RTA möglich) _var 2*\/2 ; 2 * Wurzel aus 2 ; ; x, y, x', y', Cx', Cy', Rx', Ry', °(, (°, pi, pi/2 etc. sind vordefinierte globale Konstanten ; ; Init ; ==== ; tstne initial 77$ ; Dialog input scale Goode~Homolosine\\Maßstabszahl input lambda0 Mittelpunktslänge~in~Grad ; Clip the Values clip scale 1 1E12 clip lambda0 -180 180 ; Constants mov \/2 2 ; Die Variablennamen sind ein kleiner Scherz ... root \/2 2 mov 2*\/2 \/2 mul 2*\/2 2 mov 40.73° 40.733333333333 mul 40.73° °( mov -40.73° 40.73° neg -40.73° ; Is initialized mov initial 1 77$: ; ; SIMD-Code ; ========= ; ; Scale, map centre etc. ; ---------------------- sub x Cx' ; Map centre div x Rx' ; Earth radius mul x scale ; Map scale sub y Cy' div y Ry' mul y scale ; ; The phi join into (Mollweide) y ; ------------------------------- ; mov r0 y ; Save the sgn r0 ; sign mov r1 y abs r1 ; abs add r1 0.05280 ; sub (value from Evenden) mul r1 r0 ; restore the sign ; ; Compute the Parameter psi and Cos(phi) ; -------------------------------------- ; mov psi r1 ; r1: reduced y div psi \/2 mov sinpsi psi ; sinpsi aufheben asin psi mov sin2psi psi mul sin2psi 2 sin sin2psi ; sin2psi mov cospsi psi cos cospsi ; cospsi mov cosphi y cos cosphi ; ; Mercator-Sanson, invers ; ----------------------- ; mov cosphi y cos cosphi mov lambda x div lambda cosphi mov phi y ; ; Decision: Mercator-Sanson or Mollweide ; -------------------------------------- ; cmpgt phi 40.73° $1001 ; gt: Mollweide cmplt phi -40.73° $1001 ; lt: Mollweide jump $1003 ; goto Mercator-Sanson $1001: ; The Mollweide, invers ; --------------------- ; mov lambda x ; Geographische Länge mul lambda pi mov t1 cospsi mul t1 2*\/2 div lambda t1 mov phi psi ; Geographische Breite mul phi 2 add phi sin2psi div phi pi asin phi $1003: ; Into Degree and borderline test ; ------------------------------- mul phi (° mul lambda (° cmplt phi -90 out cmpgt phi 90 out cmplt lambda -180 out cmpgt lambda 180 out ; ; Finale ; ------ ; mov x' lambda add x' lambda0 mov y' phi cmpgt x' -180 10$ add x' 360 10$: cmpgt x' -180 30$ add x' 360 30$: cmplt x' 180 40$ sub x' 360 40$: cmplt x' 180 50$ sub x' 360 50$: exit end out: mov x' -9999 mov y' -9999 exit _end