; ; TOBLER-FOUCAUT (1862) ; ==================== ; ; Name: Tobler-Foucaut(1862) ; Autor: Fouaut 1862, publicated form Tobler 1973 ; Quelle: Tobler, W.; The Hyperelliptical and Other New Pseudo ; Cylindrical Equal Area Map Projections. ; Journal of Geophys. Research, Vol. 78, No. 11, Apr. 10, 1973 ; (Fig. 1) ; Direction: Foreward (Direct) Transformation ; ; Scale and Zero-Longitude are inputable by user. ; ; (C) Rolf Böhm 2007 ; Variables ; ========= _name Tobler-Foucaut_(1862) _var phi ; Latude _var lambda ; Longitude _var sinphi _var cosphi _var scale ; Scale number (Note: 1000000, not 1/1000000) _var lambda0 ; Central Meridian ; ; x, y, x', y', Cx', Cy', °(, (°, pi, pi/2 etc. are pre-defined variables ; ; Init ; ==== ; tstne initial 077$ ; Dialog pause That~program~computes~a~foreward~transformation.¶ ~It~must~use~a~direct~transformation~projection~engine. input scale Scale~number input lambda0 Central~longitude~in~degree ; Cilp~the~given~values clip scale 1 1E12 clip lambda0 -180 180 ; Programm is initialized mov initial 1 077$: ; ; SIMD-Code ; ========= ; ; Lambda/Phi ; ---------- ; mov lambda x ; Receive the Longitude mov phi y ; Receive the Latitude sub lambda lambda0 cmod lambda -180 180 ; Note: x, y have a double function: ; - the general projection engine source co-ordinates (the Phi and Lambda in the formula), ; - also the map coordinates (will be written into the projection engine target co-ordinates x'/y') ; ; Degree into Arc ; --------------- ; mul phi °( ' The °( is a value in the RTA language! mul lambda °( ; ; Compute the Map Projection ; -------------------------- ; mov sinphi phi sin sinphi mov cosphi phi cos cosphi ; ; x ; mov r0 0.5 mul r0 cosphi add r0 0.5 mov x lambda mul x cosphi div x r0 ; ; y ; mov y phi mul y 0.5 mul sinphi 0.5 add y sinphi ; not sinphi: sinphi/2 ; ; Earth Radius, Scale division, Map centre ; ---------------------------------------- ; mul x Rx' ; pre-defined by the projection engine div x scale add x Cx' ; pre-defined ... mul y Ry' div y scale add y Cy' ; ; Exit ; ---- ; mov x' x mov y' y exit _end