; ; TOBLER POLYCYLINDRICAL 1986 FIG.5/2 ; =================================== ; ; Name: Tobler Polycylindrical (1986, Figure 5/2) ; Autor: W. Tobler 1973 ; Quelle: Tobler, W.; Polycylindrical Map Projections. ; The Americal Cartographer, Vol. 13, No. 2, pp. 117-120 (1986) ; Figure 5, down ; Direction: Foreward (Direct) Transformation ; ; Note: To get a continous map plane use a fine step width (2 steps per pixel) ; The better solution - Compute it invers: phi=root(y), lambda=x(cos(phi) ; (C) Rolf Böhm 2007 ; Variables ; ========= _name Tobler~Polycylindrical~1986~Fig.~5/2 _var phi ; Latude _var lambda ; Longitude _var scale ; Scale number (Note: 1000000, not 1/1000000) _var lambda0 ; Central Meridian _var cosphi ; cos(phi) ; ; 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 ; -------------------------- ; ; Compute cos(phi) ; mov cosphi phi cos cosphi ; ; Save the sign ; mov r0 phi sgn r0 ; ; x ; mov x lambda mul x cosphi ; ; y ; mov y phi power y 2 mul y r0 ; ; 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