Understand shapefiles in different projections (notably OSGB)
[potlatch2.git] / com / gradoservice / proj4as / proj / AbstractProjProjection.as
1 package com.gradoservice.proj4as.proj\r
2 {\r
3         import com.gradoservice.proj4as.ProjPoint;\r
4         \r
5         public class AbstractProjProjection extends ProjParams implements IProjection\r
6         {         \r
7           protected var sinphi:Number;\r
8           protected var cosphi:Number;\r
9           protected var temp:Number;\r
10           protected var e0:Number;        \r
11           protected var e1:Number;        \r
12           protected var e2:Number;        \r
13           protected var e3:Number;\r
14           protected var sin_po:Number;\r
15           protected var cos_po:Number;\r
16           protected var t1:Number;\r
17           protected var t2:Number;        \r
18           protected var t3:Number;        \r
19           protected var con:Number;\r
20           protected var ms1:Number;\r
21           protected var ms2:Number;\r
22           protected var ns:Number;        \r
23           protected var ns0:Number;       \r
24           protected var qs0:Number;\r
25           protected var qs1:Number;\r
26           protected var qs2:Number;\r
27           protected var c:Number;                 \r
28           protected var rh:Number;\r
29           protected var cos_phi:Number;\r
30           protected var sin_phi:Number; \r
31           protected var g:Number;\r
32           protected var ml:Number;        \r
33           protected var ml0:Number;\r
34           protected var ml1:Number;\r
35           protected var ml2:Number;\r
36           protected var mode:int;\r
37 \r
38           protected var cos_p12:Number;\r
39           protected var sin_p12:Number;\r
40           \r
41           protected var rc:Number;               \r
42                 \r
43                 \r
44                 public function AbstractProjProjection(data:ProjParams)\r
45                         {\r
46                           this.extend(data);                    \r
47                         }               \r
48                 \r
49                 public function init():void\r
50                         {\r
51                                     \r
52                         }\r
53         \r
54                 public function forward(p:ProjPoint):ProjPoint\r
55                         {\r
56                         return p;\r
57                         }\r
58                 \r
59                 public function inverse(p:ProjPoint):ProjPoint\r
60                         {\r
61                         return p;\r
62                         } \r
63                         \r
64                 protected function extend(source:ProjParams):void \r
65                 {\r
66 \r
67                         this.title = source.title;        \r
68                         this.projName= source.projName;\r
69                     this.units= source.units;\r
70                         this.datum = source.datum;        \r
71                         this.datumCode=source.datumCode;\r
72                         this.datumName=source.datumName;\r
73                         this.nagrids=source.nagrids;\r
74                         this.ellps=source.ellps;\r
75                         this.a=source.a;\r
76                         this.b=source.b;\r
77                         this.a2=source.a2;\r
78                         this.b2=source.b2;\r
79                         this.e=source.e;\r
80                         this.es=source.es;        \r
81                         this.ep2=source.ep2;      \r
82                         this.rf=source.rf;\r
83                         this.long0=source.long0;\r
84                         this.lat0=source.lat0;\r
85                         this.lat1=source.lat1;\r
86                         this.lat2=source.lat2;\r
87                         this.lat_ts=source.lat_ts;\r
88                         this.alpha=source.alpha;\r
89                         this.longc=source.longc;\r
90                         this.x0=source.x0;\r
91                         this.y0=source.y0;\r
92                         this.k0=source.k0;\r
93                         this.k=source.k;\r
94                         this.R_A=source.R_A;\r
95                         this.zone=source.zone;\r
96                         this.utmSouth=source.utmSouth;\r
97                         this.to_meter=source.to_meter;\r
98                         this.from_greenwich=source.from_greenwich;\r
99                         this.datum_params=source.datum_params;\r
100                         this.sphere=source.sphere;\r
101                         this.ellipseName=source.ellipseName;    \r
102 \r
103                         this.srsCode=source.srsCode;\r
104                         this.srsAuth=source.srsAuth;\r
105                         this.srsProjNumber=source.srsProjNumber;                      \r
106 \r
107             }                           \r
108 \r
109         }\r
110                 \r
111 \r
112 \r
113 }