line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# This file was automatically generated by SWIG (http://www.swig.org). |
2
|
|
|
|
|
|
|
# Version 3.0.5 |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Do not make changes to this file unless you know what you are doing--modify |
5
|
|
|
|
|
|
|
# the SWIG interface file instead. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Geo::OSR; |
8
|
6
|
|
|
6
|
|
32
|
use base qw(Exporter); |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
573
|
|
9
|
6
|
|
|
6
|
|
33
|
use base qw(DynaLoader); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
2435
|
|
10
|
|
|
|
|
|
|
package Geo::OSRc; |
11
|
|
|
|
|
|
|
bootstrap Geo::OSR; |
12
|
|
|
|
|
|
|
package Geo::OSR; |
13
|
|
|
|
|
|
|
@EXPORT = qw(); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# ---------- BASE METHODS ------------- |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
package Geo::OSR; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub TIEHASH { |
20
|
0
|
|
|
0
|
|
0
|
my ($classname,$obj) = @_; |
21
|
0
|
|
|
|
|
0
|
return bless $obj, $classname; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
0
|
|
|
sub CLEAR { } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
0
|
|
|
sub FIRSTKEY { } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
0
|
|
|
sub NEXTKEY { } |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub FETCH { |
31
|
0
|
|
|
0
|
|
0
|
my ($self,$field) = @_; |
32
|
0
|
|
|
|
|
0
|
my $member_func = "swig_${field}_get"; |
33
|
0
|
|
|
|
|
0
|
$self->$member_func(); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub STORE { |
37
|
0
|
|
|
0
|
|
0
|
my ($self,$field,$newval) = @_; |
38
|
0
|
|
|
|
|
0
|
my $member_func = "swig_${field}_set"; |
39
|
0
|
|
|
|
|
0
|
$self->$member_func($newval); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub this { |
43
|
0
|
|
|
0
|
0
|
0
|
my $ptr = shift; |
44
|
0
|
|
|
|
|
0
|
return tied(%$ptr); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# ------- FUNCTION WRAPPERS -------- |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
package Geo::OSR; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
*UseExceptions = *Geo::OSRc::UseExceptions; |
53
|
|
|
|
|
|
|
*DontUseExceptions = *Geo::OSRc::DontUseExceptions; |
54
|
|
|
|
|
|
|
*GetWellKnownGeogCSAsWKT = *Geo::OSRc::GetWellKnownGeogCSAsWKT; |
55
|
|
|
|
|
|
|
*GetUserInputAsWKT = *Geo::OSRc::GetUserInputAsWKT; |
56
|
|
|
|
|
|
|
*GetProjectionMethods = *Geo::OSRc::GetProjectionMethods; |
57
|
|
|
|
|
|
|
*GetProjectionMethodParameterList = *Geo::OSRc::GetProjectionMethodParameterList; |
58
|
|
|
|
|
|
|
*GetProjectionMethodParamInfo = *Geo::OSRc::GetProjectionMethodParamInfo; |
59
|
|
|
|
|
|
|
*CreateCoordinateTransformation = *Geo::OSRc::CreateCoordinateTransformation; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
############# Class : Geo::OSR::SpatialReference ############## |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
package Geo::OSR::SpatialReference; |
64
|
6
|
|
|
6
|
|
67
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
552
|
|
65
|
|
|
|
|
|
|
@ISA = qw( Geo::OSR ); |
66
|
|
|
|
|
|
|
%OWNER = (); |
67
|
|
|
|
|
|
|
%ITERATORS = (); |
68
|
6
|
|
|
6
|
|
31
|
use Carp; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
11487
|
|
69
|
|
|
|
|
|
|
sub new { |
70
|
2
|
|
|
2
|
|
363
|
my $pkg = shift; |
71
|
2
|
|
|
|
|
11
|
my %param = @_; |
72
|
2
|
|
|
|
|
70
|
my $self = Geo::OSRc::new_SpatialReference(); |
73
|
2
|
50
|
|
|
|
44
|
if ($param{WKT}) { |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
74
|
0
|
|
|
|
|
0
|
ImportFromWkt($self, $param{WKT}); |
75
|
|
|
|
|
|
|
} elsif ($param{Text}) { |
76
|
0
|
|
|
|
|
0
|
ImportFromWkt($self, $param{Text}); |
77
|
|
|
|
|
|
|
} elsif ($param{Proj4}) { |
78
|
0
|
|
|
|
|
0
|
ImportFromProj4($self, $param{Proj4}); |
79
|
|
|
|
|
|
|
} elsif ($param{ESRI}) { |
80
|
0
|
|
|
|
|
0
|
ImportFromESRI($self, @{$param{ESRI}}); |
|
0
|
|
|
|
|
0
|
|
81
|
|
|
|
|
|
|
} elsif ($param{EPSG}) { |
82
|
1
|
|
|
|
|
282
|
ImportFromEPSG($self, $param{EPSG}); |
83
|
|
|
|
|
|
|
} elsif ($param{EPSGA}) { |
84
|
0
|
|
|
|
|
0
|
ImportFromEPSGA($self, $param{EPSGA}); |
85
|
|
|
|
|
|
|
} elsif ($param{PCI}) { |
86
|
0
|
|
|
|
|
0
|
ImportFromPCI($self, @{$param{PCI}}); |
|
0
|
|
|
|
|
0
|
|
87
|
|
|
|
|
|
|
} elsif ($param{USGS}) { |
88
|
0
|
|
|
|
|
0
|
ImportFromUSGS($self, @{$param{USGS}}); |
|
0
|
|
|
|
|
0
|
|
89
|
|
|
|
|
|
|
} elsif ($param{XML}) { |
90
|
0
|
|
|
|
|
0
|
ImportFromXML($self, $param{XML}); |
91
|
|
|
|
|
|
|
} elsif ($param{GML}) { |
92
|
0
|
|
|
|
|
0
|
ImportFromGML($self, $param{GML}); |
93
|
|
|
|
|
|
|
} elsif ($param{URL}) { |
94
|
0
|
|
|
|
|
0
|
ImportFromUrl($self, $param{URL}); |
95
|
|
|
|
|
|
|
} elsif ($param{ERMapper}) { |
96
|
0
|
|
|
|
|
0
|
ImportFromERM($self, @{$param{ERMapper}}); |
|
0
|
|
|
|
|
0
|
|
97
|
|
|
|
|
|
|
} elsif ($param{ERM}) { |
98
|
0
|
|
|
|
|
0
|
ImportFromERM($self, @{$param{ERM}}); |
|
0
|
|
|
|
|
0
|
|
99
|
|
|
|
|
|
|
} elsif ($param{MICoordSys}) { |
100
|
0
|
|
|
|
|
0
|
ImportFromMICoordSys($self, $param{MICoordSys}); |
101
|
|
|
|
|
|
|
} elsif ($param{MapInfoCS}) { |
102
|
0
|
|
|
|
|
0
|
ImportFromMICoordSys($self, $param{MapInfoCS}); |
103
|
|
|
|
|
|
|
} elsif ($param{WGS}) { |
104
|
1
|
|
|
|
|
3
|
eval { |
105
|
1
|
|
|
|
|
71
|
SetWellKnownGeogCS($self, 'WGS'.$param{WGS}); |
106
|
|
|
|
|
|
|
}; |
107
|
1
|
50
|
|
|
|
9
|
confess "$@" if $@; |
108
|
|
|
|
|
|
|
} else { |
109
|
0
|
|
|
|
|
0
|
confess "Unrecognized/missing parameters: @_."; |
110
|
|
|
|
|
|
|
} |
111
|
1
|
50
|
|
|
|
18
|
bless $self, $pkg if defined $self; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub DESTROY { |
115
|
4
|
100
|
|
4
|
|
180236
|
return unless $_[0]->isa('HASH'); |
116
|
2
|
|
|
|
|
15
|
my $self = tied(%{$_[0]}); |
|
2
|
|
|
|
|
13
|
|
117
|
2
|
50
|
|
|
|
17
|
return unless defined $self; |
118
|
2
|
|
|
|
|
11
|
delete $ITERATORS{$self}; |
119
|
2
|
50
|
|
|
|
18
|
if (exists $OWNER{$self}) { |
120
|
2
|
|
|
|
|
44
|
Geo::OSRc::delete_SpatialReference($self); |
121
|
2
|
|
|
|
|
13
|
delete $OWNER{$self}; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
*IsSame = *Geo::OSRc::SpatialReference_IsSame; |
126
|
|
|
|
|
|
|
*IsSameGeogCS = *Geo::OSRc::SpatialReference_IsSameGeogCS; |
127
|
|
|
|
|
|
|
*IsSameVertCS = *Geo::OSRc::SpatialReference_IsSameVertCS; |
128
|
|
|
|
|
|
|
*IsGeographic = *Geo::OSRc::SpatialReference_IsGeographic; |
129
|
|
|
|
|
|
|
*IsProjected = *Geo::OSRc::SpatialReference_IsProjected; |
130
|
|
|
|
|
|
|
*IsCompound = *Geo::OSRc::SpatialReference_IsCompound; |
131
|
|
|
|
|
|
|
*IsGeocentric = *Geo::OSRc::SpatialReference_IsGeocentric; |
132
|
|
|
|
|
|
|
*IsLocal = *Geo::OSRc::SpatialReference_IsLocal; |
133
|
|
|
|
|
|
|
*IsVertical = *Geo::OSRc::SpatialReference_IsVertical; |
134
|
|
|
|
|
|
|
*EPSGTreatsAsLatLong = *Geo::OSRc::SpatialReference_EPSGTreatsAsLatLong; |
135
|
|
|
|
|
|
|
*EPSGTreatsAsNorthingEasting = *Geo::OSRc::SpatialReference_EPSGTreatsAsNorthingEasting; |
136
|
|
|
|
|
|
|
*SetAuthority = *Geo::OSRc::SpatialReference_SetAuthority; |
137
|
|
|
|
|
|
|
*GetAttrValue = *Geo::OSRc::SpatialReference_GetAttrValue; |
138
|
|
|
|
|
|
|
*SetAttrValue = *Geo::OSRc::SpatialReference_SetAttrValue; |
139
|
|
|
|
|
|
|
*SetAngularUnits = *Geo::OSRc::SpatialReference_SetAngularUnits; |
140
|
|
|
|
|
|
|
*GetAngularUnits = *Geo::OSRc::SpatialReference_GetAngularUnits; |
141
|
|
|
|
|
|
|
*SetTargetLinearUnits = *Geo::OSRc::SpatialReference_SetTargetLinearUnits; |
142
|
|
|
|
|
|
|
*SetLinearUnits = *Geo::OSRc::SpatialReference_SetLinearUnits; |
143
|
|
|
|
|
|
|
*SetLinearUnitsAndUpdateParameters = *Geo::OSRc::SpatialReference_SetLinearUnitsAndUpdateParameters; |
144
|
|
|
|
|
|
|
*GetLinearUnits = *Geo::OSRc::SpatialReference_GetLinearUnits; |
145
|
|
|
|
|
|
|
*GetLinearUnitsName = *Geo::OSRc::SpatialReference_GetLinearUnitsName; |
146
|
|
|
|
|
|
|
*GetAuthorityCode = *Geo::OSRc::SpatialReference_GetAuthorityCode; |
147
|
|
|
|
|
|
|
*GetAuthorityName = *Geo::OSRc::SpatialReference_GetAuthorityName; |
148
|
|
|
|
|
|
|
*SetUTM = *Geo::OSRc::SpatialReference_SetUTM; |
149
|
|
|
|
|
|
|
*_GetUTMZone = *Geo::OSRc::SpatialReference__GetUTMZone; |
150
|
|
|
|
|
|
|
*SetStatePlane = *Geo::OSRc::SpatialReference_SetStatePlane; |
151
|
|
|
|
|
|
|
*AutoIdentifyEPSG = *Geo::OSRc::SpatialReference_AutoIdentifyEPSG; |
152
|
|
|
|
|
|
|
*SetProjection = *Geo::OSRc::SpatialReference_SetProjection; |
153
|
|
|
|
|
|
|
*SetProjParm = *Geo::OSRc::SpatialReference_SetProjParm; |
154
|
|
|
|
|
|
|
*GetProjParm = *Geo::OSRc::SpatialReference_GetProjParm; |
155
|
|
|
|
|
|
|
*SetNormProjParm = *Geo::OSRc::SpatialReference_SetNormProjParm; |
156
|
|
|
|
|
|
|
*GetNormProjParm = *Geo::OSRc::SpatialReference_GetNormProjParm; |
157
|
|
|
|
|
|
|
*GetSemiMajor = *Geo::OSRc::SpatialReference_GetSemiMajor; |
158
|
|
|
|
|
|
|
*GetSemiMinor = *Geo::OSRc::SpatialReference_GetSemiMinor; |
159
|
|
|
|
|
|
|
*GetInvFlattening = *Geo::OSRc::SpatialReference_GetInvFlattening; |
160
|
|
|
|
|
|
|
*SetACEA = *Geo::OSRc::SpatialReference_SetACEA; |
161
|
|
|
|
|
|
|
*SetAE = *Geo::OSRc::SpatialReference_SetAE; |
162
|
|
|
|
|
|
|
*SetBonne = *Geo::OSRc::SpatialReference_SetBonne; |
163
|
|
|
|
|
|
|
*SetCEA = *Geo::OSRc::SpatialReference_SetCEA; |
164
|
|
|
|
|
|
|
*SetCS = *Geo::OSRc::SpatialReference_SetCS; |
165
|
|
|
|
|
|
|
*SetEC = *Geo::OSRc::SpatialReference_SetEC; |
166
|
|
|
|
|
|
|
*SetEckertIV = *Geo::OSRc::SpatialReference_SetEckertIV; |
167
|
|
|
|
|
|
|
*SetEckertVI = *Geo::OSRc::SpatialReference_SetEckertVI; |
168
|
|
|
|
|
|
|
*SetEquirectangular = *Geo::OSRc::SpatialReference_SetEquirectangular; |
169
|
|
|
|
|
|
|
*SetEquirectangular2 = *Geo::OSRc::SpatialReference_SetEquirectangular2; |
170
|
|
|
|
|
|
|
*SetGaussSchreiberTMercator = *Geo::OSRc::SpatialReference_SetGaussSchreiberTMercator; |
171
|
|
|
|
|
|
|
*SetGS = *Geo::OSRc::SpatialReference_SetGS; |
172
|
|
|
|
|
|
|
*SetGH = *Geo::OSRc::SpatialReference_SetGH; |
173
|
|
|
|
|
|
|
*SetIGH = *Geo::OSRc::SpatialReference_SetIGH; |
174
|
|
|
|
|
|
|
*SetGEOS = *Geo::OSRc::SpatialReference_SetGEOS; |
175
|
|
|
|
|
|
|
*SetGnomonic = *Geo::OSRc::SpatialReference_SetGnomonic; |
176
|
|
|
|
|
|
|
*SetHOM = *Geo::OSRc::SpatialReference_SetHOM; |
177
|
|
|
|
|
|
|
*SetHOM2PNO = *Geo::OSRc::SpatialReference_SetHOM2PNO; |
178
|
|
|
|
|
|
|
*SetKrovak = *Geo::OSRc::SpatialReference_SetKrovak; |
179
|
|
|
|
|
|
|
*SetLAEA = *Geo::OSRc::SpatialReference_SetLAEA; |
180
|
|
|
|
|
|
|
*SetLCC = *Geo::OSRc::SpatialReference_SetLCC; |
181
|
|
|
|
|
|
|
*SetLCC1SP = *Geo::OSRc::SpatialReference_SetLCC1SP; |
182
|
|
|
|
|
|
|
*SetLCCB = *Geo::OSRc::SpatialReference_SetLCCB; |
183
|
|
|
|
|
|
|
*SetMC = *Geo::OSRc::SpatialReference_SetMC; |
184
|
|
|
|
|
|
|
*SetMercator = *Geo::OSRc::SpatialReference_SetMercator; |
185
|
|
|
|
|
|
|
*SetMollweide = *Geo::OSRc::SpatialReference_SetMollweide; |
186
|
|
|
|
|
|
|
*SetNZMG = *Geo::OSRc::SpatialReference_SetNZMG; |
187
|
|
|
|
|
|
|
*SetOS = *Geo::OSRc::SpatialReference_SetOS; |
188
|
|
|
|
|
|
|
*SetOrthographic = *Geo::OSRc::SpatialReference_SetOrthographic; |
189
|
|
|
|
|
|
|
*SetPolyconic = *Geo::OSRc::SpatialReference_SetPolyconic; |
190
|
|
|
|
|
|
|
*SetPS = *Geo::OSRc::SpatialReference_SetPS; |
191
|
|
|
|
|
|
|
*SetRobinson = *Geo::OSRc::SpatialReference_SetRobinson; |
192
|
|
|
|
|
|
|
*SetSinusoidal = *Geo::OSRc::SpatialReference_SetSinusoidal; |
193
|
|
|
|
|
|
|
*SetStereographic = *Geo::OSRc::SpatialReference_SetStereographic; |
194
|
|
|
|
|
|
|
*SetSOC = *Geo::OSRc::SpatialReference_SetSOC; |
195
|
|
|
|
|
|
|
*SetTM = *Geo::OSRc::SpatialReference_SetTM; |
196
|
|
|
|
|
|
|
*SetTMVariant = *Geo::OSRc::SpatialReference_SetTMVariant; |
197
|
|
|
|
|
|
|
*SetTMG = *Geo::OSRc::SpatialReference_SetTMG; |
198
|
|
|
|
|
|
|
*SetTMSO = *Geo::OSRc::SpatialReference_SetTMSO; |
199
|
|
|
|
|
|
|
*SetVDG = *Geo::OSRc::SpatialReference_SetVDG; |
200
|
|
|
|
|
|
|
*SetWellKnownGeogCS = *Geo::OSRc::SpatialReference_SetWellKnownGeogCS; |
201
|
|
|
|
|
|
|
*SetFromUserInput = *Geo::OSRc::SpatialReference_SetFromUserInput; |
202
|
|
|
|
|
|
|
*CopyGeogCSFrom = *Geo::OSRc::SpatialReference_CopyGeogCSFrom; |
203
|
|
|
|
|
|
|
*SetTOWGS84 = *Geo::OSRc::SpatialReference_SetTOWGS84; |
204
|
|
|
|
|
|
|
*GetTOWGS84 = *Geo::OSRc::SpatialReference_GetTOWGS84; |
205
|
|
|
|
|
|
|
*SetLocalCS = *Geo::OSRc::SpatialReference_SetLocalCS; |
206
|
|
|
|
|
|
|
*SetGeogCS = *Geo::OSRc::SpatialReference_SetGeogCS; |
207
|
|
|
|
|
|
|
*SetProjCS = *Geo::OSRc::SpatialReference_SetProjCS; |
208
|
|
|
|
|
|
|
*SetGeocCS = *Geo::OSRc::SpatialReference_SetGeocCS; |
209
|
|
|
|
|
|
|
*SetVertCS = *Geo::OSRc::SpatialReference_SetVertCS; |
210
|
|
|
|
|
|
|
*SetCompoundCS = *Geo::OSRc::SpatialReference_SetCompoundCS; |
211
|
|
|
|
|
|
|
*ImportFromWkt = *Geo::OSRc::SpatialReference_ImportFromWkt; |
212
|
|
|
|
|
|
|
*ImportFromProj4 = *Geo::OSRc::SpatialReference_ImportFromProj4; |
213
|
|
|
|
|
|
|
*ImportFromUrl = *Geo::OSRc::SpatialReference_ImportFromUrl; |
214
|
|
|
|
|
|
|
*ImportFromESRI = *Geo::OSRc::SpatialReference_ImportFromESRI; |
215
|
|
|
|
|
|
|
*ImportFromEPSG = *Geo::OSRc::SpatialReference_ImportFromEPSG; |
216
|
|
|
|
|
|
|
*ImportFromEPSGA = *Geo::OSRc::SpatialReference_ImportFromEPSGA; |
217
|
|
|
|
|
|
|
*ImportFromPCI = *Geo::OSRc::SpatialReference_ImportFromPCI; |
218
|
|
|
|
|
|
|
*ImportFromUSGS = *Geo::OSRc::SpatialReference_ImportFromUSGS; |
219
|
|
|
|
|
|
|
*ImportFromXML = *Geo::OSRc::SpatialReference_ImportFromXML; |
220
|
|
|
|
|
|
|
*ImportFromERM = *Geo::OSRc::SpatialReference_ImportFromERM; |
221
|
|
|
|
|
|
|
*ImportFromMICoordSys = *Geo::OSRc::SpatialReference_ImportFromMICoordSys; |
222
|
|
|
|
|
|
|
*ImportFromOzi = *Geo::OSRc::SpatialReference_ImportFromOzi; |
223
|
|
|
|
|
|
|
*ExportToWkt = *Geo::OSRc::SpatialReference_ExportToWkt; |
224
|
|
|
|
|
|
|
*ExportToPrettyWkt = *Geo::OSRc::SpatialReference_ExportToPrettyWkt; |
225
|
|
|
|
|
|
|
*ExportToProj4 = *Geo::OSRc::SpatialReference_ExportToProj4; |
226
|
|
|
|
|
|
|
*ExportToPCI = *Geo::OSRc::SpatialReference_ExportToPCI; |
227
|
|
|
|
|
|
|
*ExportToUSGS = *Geo::OSRc::SpatialReference_ExportToUSGS; |
228
|
|
|
|
|
|
|
*ExportToXML = *Geo::OSRc::SpatialReference_ExportToXML; |
229
|
|
|
|
|
|
|
*ExportToMICoordSys = *Geo::OSRc::SpatialReference_ExportToMICoordSys; |
230
|
|
|
|
|
|
|
*CloneGeogCS = *Geo::OSRc::SpatialReference_CloneGeogCS; |
231
|
|
|
|
|
|
|
*Clone = *Geo::OSRc::SpatialReference_Clone; |
232
|
|
|
|
|
|
|
*Validate = *Geo::OSRc::SpatialReference_Validate; |
233
|
|
|
|
|
|
|
*StripCTParms = *Geo::OSRc::SpatialReference_StripCTParms; |
234
|
|
|
|
|
|
|
*FixupOrdering = *Geo::OSRc::SpatialReference_FixupOrdering; |
235
|
|
|
|
|
|
|
*Fixup = *Geo::OSRc::SpatialReference_Fixup; |
236
|
|
|
|
|
|
|
*MorphToESRI = *Geo::OSRc::SpatialReference_MorphToESRI; |
237
|
|
|
|
|
|
|
*MorphFromESRI = *Geo::OSRc::SpatialReference_MorphFromESRI; |
238
|
|
|
|
|
|
|
sub DISOWN { |
239
|
0
|
|
|
0
|
|
|
my $self = shift; |
240
|
0
|
|
|
|
|
|
my $ptr = tied(%$self); |
241
|
0
|
|
|
|
|
|
delete $OWNER{$ptr}; |
242
|
|
|
|
|
|
|
} |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
sub ACQUIRE { |
245
|
0
|
|
|
0
|
|
|
my $self = shift; |
246
|
0
|
|
|
|
|
|
my $ptr = tied(%$self); |
247
|
0
|
|
|
|
|
|
$OWNER{$ptr} = 1; |
248
|
|
|
|
|
|
|
} |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
############# Class : Geo::OSR::CoordinateTransformation ############## |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
package Geo::OSR::CoordinateTransformation; |
254
|
6
|
|
|
6
|
|
36
|
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); |
|
6
|
|
|
|
|
16
|
|
|
6
|
|
|
|
|
11951
|
|
255
|
|
|
|
|
|
|
@ISA = qw( Geo::OSR ); |
256
|
|
|
|
|
|
|
%OWNER = (); |
257
|
|
|
|
|
|
|
%ITERATORS = (); |
258
|
|
|
|
|
|
|
sub new { |
259
|
0
|
|
|
0
|
|
|
my $pkg = shift; |
260
|
0
|
|
|
|
|
|
my $self = Geo::OSRc::new_CoordinateTransformation(@_); |
261
|
0
|
0
|
|
|
|
|
bless $self, $pkg if defined($self); |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
sub DESTROY { |
265
|
0
|
0
|
|
0
|
|
|
return unless $_[0]->isa('HASH'); |
266
|
0
|
|
|
|
|
|
my $self = tied(%{$_[0]}); |
|
0
|
|
|
|
|
|
|
267
|
0
|
0
|
|
|
|
|
return unless defined $self; |
268
|
0
|
|
|
|
|
|
delete $ITERATORS{$self}; |
269
|
0
|
0
|
|
|
|
|
if (exists $OWNER{$self}) { |
270
|
0
|
|
|
|
|
|
Geo::OSRc::delete_CoordinateTransformation($self); |
271
|
0
|
|
|
|
|
|
delete $OWNER{$self}; |
272
|
|
|
|
|
|
|
} |
273
|
|
|
|
|
|
|
} |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
*TransformPoint = *Geo::OSRc::CoordinateTransformation_TransformPoint; |
276
|
|
|
|
|
|
|
*_TransformPoints = *Geo::OSRc::CoordinateTransformation__TransformPoints; |
277
|
|
|
|
|
|
|
sub DISOWN { |
278
|
0
|
|
|
0
|
|
|
my $self = shift; |
279
|
0
|
|
|
|
|
|
my $ptr = tied(%$self); |
280
|
0
|
|
|
|
|
|
delete $OWNER{$ptr}; |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
sub ACQUIRE { |
284
|
0
|
|
|
0
|
|
|
my $self = shift; |
285
|
0
|
|
|
|
|
|
my $ptr = tied(%$self); |
286
|
0
|
|
|
|
|
|
$OWNER{$ptr} = 1; |
287
|
|
|
|
|
|
|
} |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
# ------- VARIABLE STUBS -------- |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
package Geo::OSR; |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
*SRS_WKT_WGS84 = *Geo::OSRc::SRS_WKT_WGS84; |
295
|
|
|
|
|
|
|
*SRS_PT_ALBERS_CONIC_EQUAL_AREA = *Geo::OSRc::SRS_PT_ALBERS_CONIC_EQUAL_AREA; |
296
|
|
|
|
|
|
|
*SRS_PT_AZIMUTHAL_EQUIDISTANT = *Geo::OSRc::SRS_PT_AZIMUTHAL_EQUIDISTANT; |
297
|
|
|
|
|
|
|
*SRS_PT_CASSINI_SOLDNER = *Geo::OSRc::SRS_PT_CASSINI_SOLDNER; |
298
|
|
|
|
|
|
|
*SRS_PT_CYLINDRICAL_EQUAL_AREA = *Geo::OSRc::SRS_PT_CYLINDRICAL_EQUAL_AREA; |
299
|
|
|
|
|
|
|
*SRS_PT_BONNE = *Geo::OSRc::SRS_PT_BONNE; |
300
|
|
|
|
|
|
|
*SRS_PT_ECKERT_I = *Geo::OSRc::SRS_PT_ECKERT_I; |
301
|
|
|
|
|
|
|
*SRS_PT_ECKERT_II = *Geo::OSRc::SRS_PT_ECKERT_II; |
302
|
|
|
|
|
|
|
*SRS_PT_ECKERT_III = *Geo::OSRc::SRS_PT_ECKERT_III; |
303
|
|
|
|
|
|
|
*SRS_PT_ECKERT_IV = *Geo::OSRc::SRS_PT_ECKERT_IV; |
304
|
|
|
|
|
|
|
*SRS_PT_ECKERT_V = *Geo::OSRc::SRS_PT_ECKERT_V; |
305
|
|
|
|
|
|
|
*SRS_PT_ECKERT_VI = *Geo::OSRc::SRS_PT_ECKERT_VI; |
306
|
|
|
|
|
|
|
*SRS_PT_EQUIDISTANT_CONIC = *Geo::OSRc::SRS_PT_EQUIDISTANT_CONIC; |
307
|
|
|
|
|
|
|
*SRS_PT_EQUIRECTANGULAR = *Geo::OSRc::SRS_PT_EQUIRECTANGULAR; |
308
|
|
|
|
|
|
|
*SRS_PT_GALL_STEREOGRAPHIC = *Geo::OSRc::SRS_PT_GALL_STEREOGRAPHIC; |
309
|
|
|
|
|
|
|
*SRS_PT_GAUSSSCHREIBERTMERCATOR = *Geo::OSRc::SRS_PT_GAUSSSCHREIBERTMERCATOR; |
310
|
|
|
|
|
|
|
*SRS_PT_GEOSTATIONARY_SATELLITE = *Geo::OSRc::SRS_PT_GEOSTATIONARY_SATELLITE; |
311
|
|
|
|
|
|
|
*SRS_PT_GOODE_HOMOLOSINE = *Geo::OSRc::SRS_PT_GOODE_HOMOLOSINE; |
312
|
|
|
|
|
|
|
*SRS_PT_IGH = *Geo::OSRc::SRS_PT_IGH; |
313
|
|
|
|
|
|
|
*SRS_PT_GNOMONIC = *Geo::OSRc::SRS_PT_GNOMONIC; |
314
|
|
|
|
|
|
|
*SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER = *Geo::OSRc::SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER; |
315
|
|
|
|
|
|
|
*SRS_PT_HOTINE_OBLIQUE_MERCATOR = *Geo::OSRc::SRS_PT_HOTINE_OBLIQUE_MERCATOR; |
316
|
|
|
|
|
|
|
*SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN = *Geo::OSRc::SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN; |
317
|
|
|
|
|
|
|
*SRS_PT_LABORDE_OBLIQUE_MERCATOR = *Geo::OSRc::SRS_PT_LABORDE_OBLIQUE_MERCATOR; |
318
|
|
|
|
|
|
|
*SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP = *Geo::OSRc::SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP; |
319
|
|
|
|
|
|
|
*SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP = *Geo::OSRc::SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP; |
320
|
|
|
|
|
|
|
*SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM = *Geo::OSRc::SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM; |
321
|
|
|
|
|
|
|
*SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA = *Geo::OSRc::SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA; |
322
|
|
|
|
|
|
|
*SRS_PT_MERCATOR_1SP = *Geo::OSRc::SRS_PT_MERCATOR_1SP; |
323
|
|
|
|
|
|
|
*SRS_PT_MERCATOR_2SP = *Geo::OSRc::SRS_PT_MERCATOR_2SP; |
324
|
|
|
|
|
|
|
*SRS_PT_MERCATOR_AUXILIARY_SPHERE = *Geo::OSRc::SRS_PT_MERCATOR_AUXILIARY_SPHERE; |
325
|
|
|
|
|
|
|
*SRS_PT_MILLER_CYLINDRICAL = *Geo::OSRc::SRS_PT_MILLER_CYLINDRICAL; |
326
|
|
|
|
|
|
|
*SRS_PT_MOLLWEIDE = *Geo::OSRc::SRS_PT_MOLLWEIDE; |
327
|
|
|
|
|
|
|
*SRS_PT_NEW_ZEALAND_MAP_GRID = *Geo::OSRc::SRS_PT_NEW_ZEALAND_MAP_GRID; |
328
|
|
|
|
|
|
|
*SRS_PT_OBLIQUE_STEREOGRAPHIC = *Geo::OSRc::SRS_PT_OBLIQUE_STEREOGRAPHIC; |
329
|
|
|
|
|
|
|
*SRS_PT_ORTHOGRAPHIC = *Geo::OSRc::SRS_PT_ORTHOGRAPHIC; |
330
|
|
|
|
|
|
|
*SRS_PT_POLAR_STEREOGRAPHIC = *Geo::OSRc::SRS_PT_POLAR_STEREOGRAPHIC; |
331
|
|
|
|
|
|
|
*SRS_PT_POLYCONIC = *Geo::OSRc::SRS_PT_POLYCONIC; |
332
|
|
|
|
|
|
|
*SRS_PT_ROBINSON = *Geo::OSRc::SRS_PT_ROBINSON; |
333
|
|
|
|
|
|
|
*SRS_PT_SINUSOIDAL = *Geo::OSRc::SRS_PT_SINUSOIDAL; |
334
|
|
|
|
|
|
|
*SRS_PT_STEREOGRAPHIC = *Geo::OSRc::SRS_PT_STEREOGRAPHIC; |
335
|
|
|
|
|
|
|
*SRS_PT_SWISS_OBLIQUE_CYLINDRICAL = *Geo::OSRc::SRS_PT_SWISS_OBLIQUE_CYLINDRICAL; |
336
|
|
|
|
|
|
|
*SRS_PT_TRANSVERSE_MERCATOR = *Geo::OSRc::SRS_PT_TRANSVERSE_MERCATOR; |
337
|
|
|
|
|
|
|
*SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED = *Geo::OSRc::SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED; |
338
|
|
|
|
|
|
|
*SRS_PT_TRANSVERSE_MERCATOR_MI_21 = *Geo::OSRc::SRS_PT_TRANSVERSE_MERCATOR_MI_21; |
339
|
|
|
|
|
|
|
*SRS_PT_TRANSVERSE_MERCATOR_MI_22 = *Geo::OSRc::SRS_PT_TRANSVERSE_MERCATOR_MI_22; |
340
|
|
|
|
|
|
|
*SRS_PT_TRANSVERSE_MERCATOR_MI_23 = *Geo::OSRc::SRS_PT_TRANSVERSE_MERCATOR_MI_23; |
341
|
|
|
|
|
|
|
*SRS_PT_TRANSVERSE_MERCATOR_MI_24 = *Geo::OSRc::SRS_PT_TRANSVERSE_MERCATOR_MI_24; |
342
|
|
|
|
|
|
|
*SRS_PT_TRANSVERSE_MERCATOR_MI_25 = *Geo::OSRc::SRS_PT_TRANSVERSE_MERCATOR_MI_25; |
343
|
|
|
|
|
|
|
*SRS_PT_TUNISIA_MINING_GRID = *Geo::OSRc::SRS_PT_TUNISIA_MINING_GRID; |
344
|
|
|
|
|
|
|
*SRS_PT_TWO_POINT_EQUIDISTANT = *Geo::OSRc::SRS_PT_TWO_POINT_EQUIDISTANT; |
345
|
|
|
|
|
|
|
*SRS_PT_VANDERGRINTEN = *Geo::OSRc::SRS_PT_VANDERGRINTEN; |
346
|
|
|
|
|
|
|
*SRS_PT_KROVAK = *Geo::OSRc::SRS_PT_KROVAK; |
347
|
|
|
|
|
|
|
*SRS_PT_IMW_POLYCONIC = *Geo::OSRc::SRS_PT_IMW_POLYCONIC; |
348
|
|
|
|
|
|
|
*SRS_PT_WAGNER_I = *Geo::OSRc::SRS_PT_WAGNER_I; |
349
|
|
|
|
|
|
|
*SRS_PT_WAGNER_II = *Geo::OSRc::SRS_PT_WAGNER_II; |
350
|
|
|
|
|
|
|
*SRS_PT_WAGNER_III = *Geo::OSRc::SRS_PT_WAGNER_III; |
351
|
|
|
|
|
|
|
*SRS_PT_WAGNER_IV = *Geo::OSRc::SRS_PT_WAGNER_IV; |
352
|
|
|
|
|
|
|
*SRS_PT_WAGNER_V = *Geo::OSRc::SRS_PT_WAGNER_V; |
353
|
|
|
|
|
|
|
*SRS_PT_WAGNER_VI = *Geo::OSRc::SRS_PT_WAGNER_VI; |
354
|
|
|
|
|
|
|
*SRS_PT_WAGNER_VII = *Geo::OSRc::SRS_PT_WAGNER_VII; |
355
|
|
|
|
|
|
|
*SRS_PT_QSC = *Geo::OSRc::SRS_PT_QSC; |
356
|
|
|
|
|
|
|
*SRS_PT_AITOFF = *Geo::OSRc::SRS_PT_AITOFF; |
357
|
|
|
|
|
|
|
*SRS_PT_WINKEL_I = *Geo::OSRc::SRS_PT_WINKEL_I; |
358
|
|
|
|
|
|
|
*SRS_PT_WINKEL_II = *Geo::OSRc::SRS_PT_WINKEL_II; |
359
|
|
|
|
|
|
|
*SRS_PT_WINKEL_TRIPEL = *Geo::OSRc::SRS_PT_WINKEL_TRIPEL; |
360
|
|
|
|
|
|
|
*SRS_PT_CRASTER_PARABOLIC = *Geo::OSRc::SRS_PT_CRASTER_PARABOLIC; |
361
|
|
|
|
|
|
|
*SRS_PT_LOXIMUTHAL = *Geo::OSRc::SRS_PT_LOXIMUTHAL; |
362
|
|
|
|
|
|
|
*SRS_PT_QUARTIC_AUTHALIC = *Geo::OSRc::SRS_PT_QUARTIC_AUTHALIC; |
363
|
|
|
|
|
|
|
*SRS_PP_CENTRAL_MERIDIAN = *Geo::OSRc::SRS_PP_CENTRAL_MERIDIAN; |
364
|
|
|
|
|
|
|
*SRS_PP_SCALE_FACTOR = *Geo::OSRc::SRS_PP_SCALE_FACTOR; |
365
|
|
|
|
|
|
|
*SRS_PP_STANDARD_PARALLEL_1 = *Geo::OSRc::SRS_PP_STANDARD_PARALLEL_1; |
366
|
|
|
|
|
|
|
*SRS_PP_STANDARD_PARALLEL_2 = *Geo::OSRc::SRS_PP_STANDARD_PARALLEL_2; |
367
|
|
|
|
|
|
|
*SRS_PP_PSEUDO_STD_PARALLEL_1 = *Geo::OSRc::SRS_PP_PSEUDO_STD_PARALLEL_1; |
368
|
|
|
|
|
|
|
*SRS_PP_LONGITUDE_OF_CENTER = *Geo::OSRc::SRS_PP_LONGITUDE_OF_CENTER; |
369
|
|
|
|
|
|
|
*SRS_PP_LATITUDE_OF_CENTER = *Geo::OSRc::SRS_PP_LATITUDE_OF_CENTER; |
370
|
|
|
|
|
|
|
*SRS_PP_LONGITUDE_OF_ORIGIN = *Geo::OSRc::SRS_PP_LONGITUDE_OF_ORIGIN; |
371
|
|
|
|
|
|
|
*SRS_PP_LATITUDE_OF_ORIGIN = *Geo::OSRc::SRS_PP_LATITUDE_OF_ORIGIN; |
372
|
|
|
|
|
|
|
*SRS_PP_FALSE_EASTING = *Geo::OSRc::SRS_PP_FALSE_EASTING; |
373
|
|
|
|
|
|
|
*SRS_PP_FALSE_NORTHING = *Geo::OSRc::SRS_PP_FALSE_NORTHING; |
374
|
|
|
|
|
|
|
*SRS_PP_AZIMUTH = *Geo::OSRc::SRS_PP_AZIMUTH; |
375
|
|
|
|
|
|
|
*SRS_PP_LONGITUDE_OF_POINT_1 = *Geo::OSRc::SRS_PP_LONGITUDE_OF_POINT_1; |
376
|
|
|
|
|
|
|
*SRS_PP_LATITUDE_OF_POINT_1 = *Geo::OSRc::SRS_PP_LATITUDE_OF_POINT_1; |
377
|
|
|
|
|
|
|
*SRS_PP_LONGITUDE_OF_POINT_2 = *Geo::OSRc::SRS_PP_LONGITUDE_OF_POINT_2; |
378
|
|
|
|
|
|
|
*SRS_PP_LATITUDE_OF_POINT_2 = *Geo::OSRc::SRS_PP_LATITUDE_OF_POINT_2; |
379
|
|
|
|
|
|
|
*SRS_PP_LONGITUDE_OF_POINT_3 = *Geo::OSRc::SRS_PP_LONGITUDE_OF_POINT_3; |
380
|
|
|
|
|
|
|
*SRS_PP_LATITUDE_OF_POINT_3 = *Geo::OSRc::SRS_PP_LATITUDE_OF_POINT_3; |
381
|
|
|
|
|
|
|
*SRS_PP_RECTIFIED_GRID_ANGLE = *Geo::OSRc::SRS_PP_RECTIFIED_GRID_ANGLE; |
382
|
|
|
|
|
|
|
*SRS_PP_LANDSAT_NUMBER = *Geo::OSRc::SRS_PP_LANDSAT_NUMBER; |
383
|
|
|
|
|
|
|
*SRS_PP_PATH_NUMBER = *Geo::OSRc::SRS_PP_PATH_NUMBER; |
384
|
|
|
|
|
|
|
*SRS_PP_PERSPECTIVE_POINT_HEIGHT = *Geo::OSRc::SRS_PP_PERSPECTIVE_POINT_HEIGHT; |
385
|
|
|
|
|
|
|
*SRS_PP_SATELLITE_HEIGHT = *Geo::OSRc::SRS_PP_SATELLITE_HEIGHT; |
386
|
|
|
|
|
|
|
*SRS_PP_FIPSZONE = *Geo::OSRc::SRS_PP_FIPSZONE; |
387
|
|
|
|
|
|
|
*SRS_PP_ZONE = *Geo::OSRc::SRS_PP_ZONE; |
388
|
|
|
|
|
|
|
*SRS_PP_LATITUDE_OF_1ST_POINT = *Geo::OSRc::SRS_PP_LATITUDE_OF_1ST_POINT; |
389
|
|
|
|
|
|
|
*SRS_PP_LONGITUDE_OF_1ST_POINT = *Geo::OSRc::SRS_PP_LONGITUDE_OF_1ST_POINT; |
390
|
|
|
|
|
|
|
*SRS_PP_LATITUDE_OF_2ND_POINT = *Geo::OSRc::SRS_PP_LATITUDE_OF_2ND_POINT; |
391
|
|
|
|
|
|
|
*SRS_PP_LONGITUDE_OF_2ND_POINT = *Geo::OSRc::SRS_PP_LONGITUDE_OF_2ND_POINT; |
392
|
|
|
|
|
|
|
*SRS_UL_METER = *Geo::OSRc::SRS_UL_METER; |
393
|
|
|
|
|
|
|
*SRS_UL_FOOT = *Geo::OSRc::SRS_UL_FOOT; |
394
|
|
|
|
|
|
|
*SRS_UL_FOOT_CONV = *Geo::OSRc::SRS_UL_FOOT_CONV; |
395
|
|
|
|
|
|
|
*SRS_UL_US_FOOT = *Geo::OSRc::SRS_UL_US_FOOT; |
396
|
|
|
|
|
|
|
*SRS_UL_US_FOOT_CONV = *Geo::OSRc::SRS_UL_US_FOOT_CONV; |
397
|
|
|
|
|
|
|
*SRS_UL_NAUTICAL_MILE = *Geo::OSRc::SRS_UL_NAUTICAL_MILE; |
398
|
|
|
|
|
|
|
*SRS_UL_NAUTICAL_MILE_CONV = *Geo::OSRc::SRS_UL_NAUTICAL_MILE_CONV; |
399
|
|
|
|
|
|
|
*SRS_UL_LINK = *Geo::OSRc::SRS_UL_LINK; |
400
|
|
|
|
|
|
|
*SRS_UL_LINK_CONV = *Geo::OSRc::SRS_UL_LINK_CONV; |
401
|
|
|
|
|
|
|
*SRS_UL_CHAIN = *Geo::OSRc::SRS_UL_CHAIN; |
402
|
|
|
|
|
|
|
*SRS_UL_CHAIN_CONV = *Geo::OSRc::SRS_UL_CHAIN_CONV; |
403
|
|
|
|
|
|
|
*SRS_UL_ROD = *Geo::OSRc::SRS_UL_ROD; |
404
|
|
|
|
|
|
|
*SRS_UL_ROD_CONV = *Geo::OSRc::SRS_UL_ROD_CONV; |
405
|
|
|
|
|
|
|
*SRS_UL_LINK_Clarke = *Geo::OSRc::SRS_UL_LINK_Clarke; |
406
|
|
|
|
|
|
|
*SRS_UL_LINK_Clarke_CONV = *Geo::OSRc::SRS_UL_LINK_Clarke_CONV; |
407
|
|
|
|
|
|
|
*SRS_UL_KILOMETER = *Geo::OSRc::SRS_UL_KILOMETER; |
408
|
|
|
|
|
|
|
*SRS_UL_KILOMETER_CONV = *Geo::OSRc::SRS_UL_KILOMETER_CONV; |
409
|
|
|
|
|
|
|
*SRS_UL_DECIMETER = *Geo::OSRc::SRS_UL_DECIMETER; |
410
|
|
|
|
|
|
|
*SRS_UL_DECIMETER_CONV = *Geo::OSRc::SRS_UL_DECIMETER_CONV; |
411
|
|
|
|
|
|
|
*SRS_UL_CENTIMETER = *Geo::OSRc::SRS_UL_CENTIMETER; |
412
|
|
|
|
|
|
|
*SRS_UL_CENTIMETER_CONV = *Geo::OSRc::SRS_UL_CENTIMETER_CONV; |
413
|
|
|
|
|
|
|
*SRS_UL_MILLIMETER = *Geo::OSRc::SRS_UL_MILLIMETER; |
414
|
|
|
|
|
|
|
*SRS_UL_MILLIMETER_CONV = *Geo::OSRc::SRS_UL_MILLIMETER_CONV; |
415
|
|
|
|
|
|
|
*SRS_UL_INTL_NAUT_MILE = *Geo::OSRc::SRS_UL_INTL_NAUT_MILE; |
416
|
|
|
|
|
|
|
*SRS_UL_INTL_NAUT_MILE_CONV = *Geo::OSRc::SRS_UL_INTL_NAUT_MILE_CONV; |
417
|
|
|
|
|
|
|
*SRS_UL_INTL_INCH = *Geo::OSRc::SRS_UL_INTL_INCH; |
418
|
|
|
|
|
|
|
*SRS_UL_INTL_INCH_CONV = *Geo::OSRc::SRS_UL_INTL_INCH_CONV; |
419
|
|
|
|
|
|
|
*SRS_UL_INTL_FOOT = *Geo::OSRc::SRS_UL_INTL_FOOT; |
420
|
|
|
|
|
|
|
*SRS_UL_INTL_FOOT_CONV = *Geo::OSRc::SRS_UL_INTL_FOOT_CONV; |
421
|
|
|
|
|
|
|
*SRS_UL_INTL_YARD = *Geo::OSRc::SRS_UL_INTL_YARD; |
422
|
|
|
|
|
|
|
*SRS_UL_INTL_YARD_CONV = *Geo::OSRc::SRS_UL_INTL_YARD_CONV; |
423
|
|
|
|
|
|
|
*SRS_UL_INTL_STAT_MILE = *Geo::OSRc::SRS_UL_INTL_STAT_MILE; |
424
|
|
|
|
|
|
|
*SRS_UL_INTL_STAT_MILE_CONV = *Geo::OSRc::SRS_UL_INTL_STAT_MILE_CONV; |
425
|
|
|
|
|
|
|
*SRS_UL_INTL_FATHOM = *Geo::OSRc::SRS_UL_INTL_FATHOM; |
426
|
|
|
|
|
|
|
*SRS_UL_INTL_FATHOM_CONV = *Geo::OSRc::SRS_UL_INTL_FATHOM_CONV; |
427
|
|
|
|
|
|
|
*SRS_UL_INTL_CHAIN = *Geo::OSRc::SRS_UL_INTL_CHAIN; |
428
|
|
|
|
|
|
|
*SRS_UL_INTL_CHAIN_CONV = *Geo::OSRc::SRS_UL_INTL_CHAIN_CONV; |
429
|
|
|
|
|
|
|
*SRS_UL_INTL_LINK = *Geo::OSRc::SRS_UL_INTL_LINK; |
430
|
|
|
|
|
|
|
*SRS_UL_INTL_LINK_CONV = *Geo::OSRc::SRS_UL_INTL_LINK_CONV; |
431
|
|
|
|
|
|
|
*SRS_UL_US_INCH = *Geo::OSRc::SRS_UL_US_INCH; |
432
|
|
|
|
|
|
|
*SRS_UL_US_INCH_CONV = *Geo::OSRc::SRS_UL_US_INCH_CONV; |
433
|
|
|
|
|
|
|
*SRS_UL_US_YARD = *Geo::OSRc::SRS_UL_US_YARD; |
434
|
|
|
|
|
|
|
*SRS_UL_US_YARD_CONV = *Geo::OSRc::SRS_UL_US_YARD_CONV; |
435
|
|
|
|
|
|
|
*SRS_UL_US_CHAIN = *Geo::OSRc::SRS_UL_US_CHAIN; |
436
|
|
|
|
|
|
|
*SRS_UL_US_CHAIN_CONV = *Geo::OSRc::SRS_UL_US_CHAIN_CONV; |
437
|
|
|
|
|
|
|
*SRS_UL_US_STAT_MILE = *Geo::OSRc::SRS_UL_US_STAT_MILE; |
438
|
|
|
|
|
|
|
*SRS_UL_US_STAT_MILE_CONV = *Geo::OSRc::SRS_UL_US_STAT_MILE_CONV; |
439
|
|
|
|
|
|
|
*SRS_UL_INDIAN_YARD = *Geo::OSRc::SRS_UL_INDIAN_YARD; |
440
|
|
|
|
|
|
|
*SRS_UL_INDIAN_YARD_CONV = *Geo::OSRc::SRS_UL_INDIAN_YARD_CONV; |
441
|
|
|
|
|
|
|
*SRS_UL_INDIAN_FOOT = *Geo::OSRc::SRS_UL_INDIAN_FOOT; |
442
|
|
|
|
|
|
|
*SRS_UL_INDIAN_FOOT_CONV = *Geo::OSRc::SRS_UL_INDIAN_FOOT_CONV; |
443
|
|
|
|
|
|
|
*SRS_UL_INDIAN_CHAIN = *Geo::OSRc::SRS_UL_INDIAN_CHAIN; |
444
|
|
|
|
|
|
|
*SRS_UL_INDIAN_CHAIN_CONV = *Geo::OSRc::SRS_UL_INDIAN_CHAIN_CONV; |
445
|
|
|
|
|
|
|
*SRS_UA_DEGREE = *Geo::OSRc::SRS_UA_DEGREE; |
446
|
|
|
|
|
|
|
*SRS_UA_DEGREE_CONV = *Geo::OSRc::SRS_UA_DEGREE_CONV; |
447
|
|
|
|
|
|
|
*SRS_UA_RADIAN = *Geo::OSRc::SRS_UA_RADIAN; |
448
|
|
|
|
|
|
|
*SRS_PM_GREENWICH = *Geo::OSRc::SRS_PM_GREENWICH; |
449
|
|
|
|
|
|
|
*SRS_DN_NAD27 = *Geo::OSRc::SRS_DN_NAD27; |
450
|
|
|
|
|
|
|
*SRS_DN_NAD83 = *Geo::OSRc::SRS_DN_NAD83; |
451
|
|
|
|
|
|
|
*SRS_DN_WGS72 = *Geo::OSRc::SRS_DN_WGS72; |
452
|
|
|
|
|
|
|
*SRS_DN_WGS84 = *Geo::OSRc::SRS_DN_WGS84; |
453
|
|
|
|
|
|
|
*SRS_WGS84_SEMIMAJOR = *Geo::OSRc::SRS_WGS84_SEMIMAJOR; |
454
|
|
|
|
|
|
|
*SRS_WGS84_INVFLATTENING = *Geo::OSRc::SRS_WGS84_INVFLATTENING; |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
package Geo::OSR; |
458
|
6
|
|
|
6
|
|
36
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
185
|
|
459
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
212
|
|
460
|
|
|
|
|
|
|
|
461
|
6
|
|
|
6
|
|
31
|
use vars qw /%PROJECTIONS %PARAMETERS %LINEAR_UNITS %ANGULAR_UNITS %DATUMS/; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
2618
|
|
462
|
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
for (keys %Geo::OSR::) { |
464
|
|
|
|
|
|
|
if (/^SRS_PT_(\w+)/) { |
465
|
|
|
|
|
|
|
my $p = eval '$Geo::OSR::'.$_; |
466
|
|
|
|
|
|
|
$PROJECTIONS{$p} = 1; |
467
|
|
|
|
|
|
|
} |
468
|
|
|
|
|
|
|
elsif (/^SRS_PP_(\w+)/) { |
469
|
|
|
|
|
|
|
my $p = eval '$Geo::OSR::'.$_; |
470
|
|
|
|
|
|
|
$PARAMETERS{$p} = 1; |
471
|
|
|
|
|
|
|
} |
472
|
|
|
|
|
|
|
elsif (/^SRS_UL_(\w+)/) { |
473
|
|
|
|
|
|
|
my $p = eval '$Geo::OSR::'.$_; |
474
|
|
|
|
|
|
|
$LINEAR_UNITS{$p} = 1; |
475
|
|
|
|
|
|
|
} |
476
|
|
|
|
|
|
|
elsif (/^SRS_UA_(\w+)/) { |
477
|
|
|
|
|
|
|
my $p = eval '$Geo::OSR::'.$_; |
478
|
|
|
|
|
|
|
$ANGULAR_UNITS{$p} = 1; |
479
|
|
|
|
|
|
|
} |
480
|
|
|
|
|
|
|
elsif (/^SRS_DN_(\w+)/) { |
481
|
|
|
|
|
|
|
my $p = eval '$Geo::OSR::'.$_; |
482
|
|
|
|
|
|
|
$DATUMS{$p} = 1; |
483
|
|
|
|
|
|
|
} |
484
|
|
|
|
|
|
|
} |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
sub Projections { |
487
|
0
|
|
|
0
|
0
|
|
return keys %PROJECTIONS; |
488
|
|
|
|
|
|
|
} |
489
|
|
|
|
|
|
|
|
490
|
|
|
|
|
|
|
sub Parameters { |
491
|
0
|
|
|
0
|
0
|
|
return keys %PARAMETERS; |
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
sub LinearUnits { |
495
|
0
|
|
|
0
|
0
|
|
return keys %LINEAR_UNITS; |
496
|
|
|
|
|
|
|
} |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
sub AngularUnits { |
499
|
0
|
|
|
0
|
0
|
|
return keys %ANGULAR_UNITS; |
500
|
|
|
|
|
|
|
} |
501
|
|
|
|
|
|
|
|
502
|
|
|
|
|
|
|
sub Datums { |
503
|
0
|
|
|
0
|
0
|
|
return keys %DATUMS; |
504
|
|
|
|
|
|
|
} |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
0
|
0
|
|
sub RELEASE_PARENTS { |
507
|
|
|
|
|
|
|
} |
508
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
|
510
|
|
|
|
|
|
|
package Geo::OSR::SpatialReference; |
511
|
6
|
|
|
6
|
|
34
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
127
|
|
512
|
6
|
|
|
6
|
|
31
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
169
|
|
513
|
6
|
|
|
6
|
|
28
|
use Carp; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
11980
|
|
514
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
sub Export { |
516
|
0
|
|
|
0
|
|
|
my $self = shift; |
517
|
0
|
|
|
|
|
|
my $format; |
518
|
0
|
0
|
|
|
|
|
$format = pop if @_ == 1; |
519
|
0
|
|
|
|
|
|
my %params = @_; |
520
|
0
|
0
|
|
|
|
|
$format = $params{to} unless $format; |
521
|
0
|
0
|
|
|
|
|
$format = $params{format} unless $format; |
522
|
0
|
0
|
|
|
|
|
$format = $params{as} unless $format; |
523
|
0
|
0
|
0
|
|
|
|
if ($format eq 'WKT' or $format eq 'Text') { |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
524
|
0
|
|
|
|
|
|
return ExportToWkt($self); |
525
|
|
|
|
|
|
|
} elsif ($format eq 'PrettyWKT') { |
526
|
0
|
0
|
|
|
|
|
my $simplify = exists $params{simplify} ? $params{simplify} : 0; |
527
|
0
|
|
|
|
|
|
return ExportToPrettyWkt($self, $simplify); |
528
|
|
|
|
|
|
|
} elsif ($format eq 'Proj4') { |
529
|
0
|
|
|
|
|
|
return ExportToProj4($self); |
530
|
|
|
|
|
|
|
} elsif ($format eq 'PCI') { |
531
|
0
|
|
|
|
|
|
return ExportToPCI($self); |
532
|
|
|
|
|
|
|
} elsif ($format eq 'USGS') { |
533
|
0
|
|
|
|
|
|
return ExportToUSGS($self); |
534
|
|
|
|
|
|
|
} elsif ($format eq 'GML' or $format eq 'XML') { |
535
|
0
|
0
|
|
|
|
|
my $dialect = exists $params{dialect} ? $params{dialect} : ''; |
536
|
0
|
|
|
|
|
|
return ExportToXML($self, $dialect); |
537
|
|
|
|
|
|
|
} elsif ($format eq 'MICoordSys' or $format eq 'MapInfoCS') { |
538
|
0
|
|
|
|
|
|
return ExportToMICoordSys(); |
539
|
|
|
|
|
|
|
} else { |
540
|
0
|
|
|
|
|
|
confess "Unrecognized export format."; |
541
|
|
|
|
|
|
|
} |
542
|
|
|
|
|
|
|
} |
543
|
|
|
|
|
|
|
*AsText = *ExportToWkt; |
544
|
|
|
|
|
|
|
*As = *Export; |
545
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
sub Set { |
547
|
0
|
|
|
0
|
|
|
my($self, %params) = @_; |
548
|
0
|
0
|
0
|
|
|
|
if (exists $params{Authority} and exists $params{TargetKey} and exists $params{Node} and exists $params{Code}) { |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
549
|
0
|
|
|
|
|
|
SetAuthority($self, $params{TargetKey}, $params{Authority}, $params{Code}); |
550
|
|
|
|
|
|
|
} elsif (exists $params{Node} and exists $params{Value}) { |
551
|
0
|
|
|
|
|
|
SetAttrValue($self, $params{Node}, $params{Value}); |
552
|
|
|
|
|
|
|
} elsif (exists $params{AngularUnits} and exists $params{Value}) { |
553
|
0
|
|
|
|
|
|
SetAngularUnits($self, $params{AngularUnits}, $params{Value}); |
554
|
|
|
|
|
|
|
} elsif (exists $params{LinearUnits} and exists $params{Node} and exists $params{Value}) { |
555
|
0
|
|
|
|
|
|
SetTargetLinearUnits($self, $params{Node}, $params{LinearUnits}, $params{Value}); |
556
|
|
|
|
|
|
|
} elsif (exists $params{LinearUnits} and exists $params{Value}) { |
557
|
0
|
|
|
|
|
|
SetLinearUnitsAndUpdateParameters($self, $params{LinearUnits}, $params{Value}); |
558
|
|
|
|
|
|
|
} elsif ($params{Parameter} and exists $params{Value}) { |
559
|
0
|
0
|
|
|
|
|
croak "Unknown projection parameter '$params{Parameter}'." unless exists $Geo::OSR::PARAMETERS{$params{Parameter}}; |
560
|
|
|
|
|
|
|
$params{Normalized} ? |
561
|
|
|
|
|
|
|
SetNormProjParm($self, $params{Parameter}, $params{Value}) : |
562
|
0
|
0
|
|
|
|
|
SetProjParm($self, $params{Parameter}, $params{Value}); |
563
|
|
|
|
|
|
|
} elsif ($params{Name}) { |
564
|
0
|
|
|
|
|
|
SetWellKnownGeogCS($self, $params{Name}); |
565
|
|
|
|
|
|
|
} elsif ($params{GuessFrom}) { |
566
|
0
|
|
|
|
|
|
SetFromUserInput($self, $params{GuessFrom}); |
567
|
|
|
|
|
|
|
} elsif ($params{LOCAL_CS}) { |
568
|
0
|
|
|
|
|
|
SetLocalCS($self, $params{LOCAL_CS}); |
569
|
|
|
|
|
|
|
} elsif ($params{GeocentricCS}) { |
570
|
0
|
|
|
|
|
|
SetGeocCS($self, $params{GeocentricCS}); |
571
|
|
|
|
|
|
|
} elsif ($params{VerticalCS} and $params{Datum}) { |
572
|
0
|
|
0
|
|
|
|
my $type = $params{VertDatumType} || 2005; |
573
|
0
|
|
|
|
|
|
SetVertCS($self, $params{VerticalCS}, $params{Datum}, $type); |
574
|
|
|
|
|
|
|
} elsif ($params{CoordinateSystem}) { |
575
|
0
|
|
|
|
|
|
my @parameters = (); |
576
|
0
|
0
|
|
|
|
|
@parameters = @{$params{Parameters}} if ref($params{Parameters}); |
|
0
|
|
|
|
|
|
|
577
|
0
|
0
|
0
|
|
|
|
if ($params{CoordinateSystem} eq 'State Plane' and exists $params{Zone}) { |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
578
|
0
|
0
|
|
|
|
|
my $NAD83 = exists $params{NAD83} ? $params{NAD83} : 1; |
579
|
0
|
0
|
|
|
|
|
my $name = exists $params{UnitName} ? $params{UnitName} : undef; |
580
|
0
|
0
|
|
|
|
|
my $c = exists $params{UnitConversionFactor} ? $params{UnitConversionFactor} : 0.0; |
581
|
0
|
|
|
|
|
|
SetStatePlane($self, $params{Zone}, $NAD83, $name, $c); |
582
|
|
|
|
|
|
|
} elsif ($params{CoordinateSystem} eq 'UTM' and exists $params{Zone} and exists $params{North}) { |
583
|
0
|
0
|
|
|
|
|
my $north = exists $params{North} ? $params{North} : 1; |
584
|
0
|
|
|
|
|
|
SetUTM($self, $params{Zone}, $north); |
585
|
|
|
|
|
|
|
} elsif ($params{CoordinateSystem} eq 'WGS') { |
586
|
0
|
|
|
|
|
|
SetTOWGS84($self, @parameters); |
587
|
|
|
|
|
|
|
} elsif ($params{CoordinateSystem} and $params{Datum} and $params{Spheroid}) { |
588
|
0
|
|
|
|
|
|
SetGeogCS($self, $params{CoordinateSystem}, $params{Datum}, $params{Spheroid}, @parameters); |
589
|
|
|
|
|
|
|
} elsif ($params{CoordinateSystem} and $params{HorizontalCS} and $params{VerticalCS}) { |
590
|
0
|
|
|
|
|
|
SetCompoundCS($self, $params{CoordinateSystem}, $params{HorizontalCS}, $params{VerticalCS}); |
591
|
|
|
|
|
|
|
} else { |
592
|
0
|
|
|
|
|
|
SetProjCS($self, $params{CoordinateSystem}); |
593
|
|
|
|
|
|
|
} |
594
|
|
|
|
|
|
|
} elsif ($params{Projection}) { |
595
|
0
|
0
|
|
|
|
|
confess "Unknown projection." unless exists $Geo::OSR::PROJECTIONS{$params{Projection}}; |
596
|
0
|
|
|
|
|
|
my @parameters = (); |
597
|
0
|
0
|
|
|
|
|
@parameters = @{$params{Parameters}} if ref($params{Parameters}); |
|
0
|
|
|
|
|
|
|
598
|
0
|
0
|
|
|
|
|
if ($params{Projection} eq 'Albers_Conic_Equal_Area') { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
599
|
0
|
|
|
|
|
|
SetACEA($self, @parameters); |
600
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Azimuthal_Equidistant') { |
601
|
0
|
|
|
|
|
|
SetAE($self, @parameters); |
602
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Bonne') { |
603
|
0
|
|
|
|
|
|
SetBonne($self, @parameters); |
604
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Cylindrical_Equal_Area') { |
605
|
0
|
|
|
|
|
|
SetCEA($self, @parameters); |
606
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Cassini_Soldner') { |
607
|
0
|
|
|
|
|
|
SetCS($self, @parameters); |
608
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Equidistant_Conic') { |
609
|
0
|
|
|
|
|
|
SetEC($self, @parameters); |
610
|
|
|
|
|
|
|
# Eckert_I, Eckert_II, Eckert_III, Eckert_V ? |
611
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Eckert_IV') { |
612
|
0
|
|
|
|
|
|
SetEckertIV($self, @parameters); |
613
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Eckert_VI') { |
614
|
0
|
|
|
|
|
|
SetEckertVI($self, @parameters); |
615
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Equirectangular') { |
616
|
0
|
0
|
|
|
|
|
@parameters == 4 ? |
617
|
|
|
|
|
|
|
SetEquirectangular($self, @parameters) : |
618
|
|
|
|
|
|
|
SetEquirectangular2($self, @parameters); |
619
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Gauss_Schreiber_Transverse_Mercator') { |
620
|
0
|
|
|
|
|
|
SetGaussSchreiberTMercator($self, @parameters); |
621
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Gall_Stereographic') { |
622
|
0
|
|
|
|
|
|
SetGS($self, @parameters); |
623
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Goode_Homolosine') { |
624
|
0
|
|
|
|
|
|
SetGH($self, @parameters); |
625
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Interrupted_Goode_Homolosine') { |
626
|
0
|
|
|
|
|
|
SetIGH($self); |
627
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Geostationary_Satellite') { |
628
|
0
|
|
|
|
|
|
SetGEOS($self, @parameters); |
629
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Gnomonic') { |
630
|
0
|
|
|
|
|
|
SetGnomonic($self, @parameters); |
631
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Hotine_Oblique_Mercator') { |
632
|
|
|
|
|
|
|
# Hotine_Oblique_Mercator_Azimuth_Center ? |
633
|
0
|
|
|
|
|
|
SetHOM($self, @parameters); |
634
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Hotine_Oblique_Mercator_Two_Point_Natural_Origin') { |
635
|
0
|
|
|
|
|
|
SetHOM2PNO($self, @parameters); |
636
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Krovak') { |
637
|
0
|
|
|
|
|
|
SetKrovak($self, @parameters); |
638
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Lambert_Azimuthal_Equal_Area') { |
639
|
0
|
|
|
|
|
|
SetLAEA($self, @parameters); |
640
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Lambert_Conformal_Conic_2SP') { |
641
|
0
|
|
|
|
|
|
SetLCC($self, @parameters); |
642
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Lambert_Conformal_Conic_1SP') { |
643
|
0
|
|
|
|
|
|
SetLCC1SP($self, @parameters); |
644
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Lambert_Conformal_Conic_2SP_Belgium') { |
645
|
0
|
|
|
|
|
|
SetLCCB($self, @parameters); |
646
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'miller_cylindrical') { |
647
|
0
|
|
|
|
|
|
SetMC($self, @parameters); |
648
|
|
|
|
|
|
|
} elsif ($params{Projection} =~ /^Mercator/) { |
649
|
|
|
|
|
|
|
# Mercator_1SP, Mercator_2SP, Mercator_Auxiliary_Sphere ? |
650
|
|
|
|
|
|
|
# variant is in Variant (or Name) |
651
|
0
|
|
|
|
|
|
SetMercator($self, @parameters); |
652
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Mollweide') { |
653
|
0
|
|
|
|
|
|
SetMollweide($self, @parameters); |
654
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'New_Zealand_Map_Grid') { |
655
|
0
|
|
|
|
|
|
SetNZMG($self, @parameters); |
656
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Oblique_Stereographic') { |
657
|
0
|
|
|
|
|
|
SetOS($self, @parameters); |
658
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Orthographic') { |
659
|
0
|
|
|
|
|
|
SetOrthographic($self, @parameters); |
660
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Polyconic') { |
661
|
0
|
|
|
|
|
|
SetPolyconic($self, @parameters); |
662
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Polar_Stereographic') { |
663
|
0
|
|
|
|
|
|
SetPS($self, @parameters); |
664
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Robinson') { |
665
|
0
|
|
|
|
|
|
SetRobinson($self, @parameters); |
666
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Sinusoidal') { |
667
|
0
|
|
|
|
|
|
SetSinusoidal($self, @parameters); |
668
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Stereographic') { |
669
|
0
|
|
|
|
|
|
SetStereographic($self, @parameters); |
670
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Swiss_Oblique_Cylindrical') { |
671
|
0
|
|
|
|
|
|
SetSOC($self, @parameters); |
672
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Transverse_Mercator_South_Orientated') { |
673
|
0
|
|
|
|
|
|
SetTMSO($self, @parameters); |
674
|
|
|
|
|
|
|
} elsif ($params{Projection} =~ /^Transverse_Mercator/) { |
675
|
0
|
|
|
|
|
|
my($variant) = $params{Projection} =~ /^Transverse_Mercator_(\w+)/; |
676
|
0
|
0
|
|
|
|
|
$variant = $params{Variant} unless $variant; |
677
|
0
|
0
|
|
|
|
|
$variant = $params{Name} unless $variant; |
678
|
0
|
0
|
|
|
|
|
$variant ? |
679
|
|
|
|
|
|
|
SetTMVariant($self, $variant, @parameters) : |
680
|
|
|
|
|
|
|
SetTM($self, @parameters); |
681
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'Tunisia_Mining_Grid') { |
682
|
0
|
|
|
|
|
|
SetTMG($self, @parameters); |
683
|
|
|
|
|
|
|
} elsif ($params{Projection} eq 'VanDerGrinten') { |
684
|
0
|
|
|
|
|
|
SetVDG($self, @parameters); |
685
|
|
|
|
|
|
|
} else { |
686
|
|
|
|
|
|
|
# Aitoff, Craster_Parabolic, International_Map_of_the_World_Polyconic, Laborde_Oblique_Mercator |
687
|
|
|
|
|
|
|
# Loximuthal, Miller_Cylindrical, Quadrilateralized_Spherical_Cube, Quartic_Authalic, Two_Point_Equidistant |
688
|
|
|
|
|
|
|
# Wagner_I, Wagner_II, Wagner_III, Wagner_IV, Wagner_V, Wagner_VI, Wagner_VII |
689
|
|
|
|
|
|
|
# Winkel_I, Winkel_II, Winkel_Tripel |
690
|
|
|
|
|
|
|
# ? |
691
|
0
|
|
|
|
|
|
SetProjection($self, $params{Projection}); |
692
|
|
|
|
|
|
|
} |
693
|
|
|
|
|
|
|
} else { |
694
|
0
|
|
|
|
|
|
confess "Not enough information for a spatial reference object."; |
695
|
|
|
|
|
|
|
} |
696
|
|
|
|
|
|
|
} |
697
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
sub GetUTMZone { |
699
|
0
|
|
|
0
|
|
|
my $self = shift; |
700
|
0
|
|
|
|
|
|
my $zone = _GetUTMZone($self); |
701
|
0
|
0
|
|
|
|
|
if (wantarray) { |
702
|
0
|
|
|
|
|
|
my $north = 1; |
703
|
0
|
0
|
|
|
|
|
if ($zone < 0) { |
704
|
0
|
|
|
|
|
|
$zone *= -1; |
705
|
0
|
|
|
|
|
|
$north = 0; |
706
|
|
|
|
|
|
|
} |
707
|
0
|
|
|
|
|
|
return ($zone, $north); |
708
|
|
|
|
|
|
|
} else { |
709
|
0
|
|
|
|
|
|
return $zone; |
710
|
|
|
|
|
|
|
} |
711
|
|
|
|
|
|
|
} |
712
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
|
714
|
|
|
|
|
|
|
package Geo::OSR::CoordinateTransformation; |
715
|
6
|
|
|
6
|
|
46
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
133
|
|
716
|
6
|
|
|
6
|
|
34
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
1689
|
|
717
|
|
|
|
|
|
|
|
718
|
|
|
|
|
|
|
sub TransformPoints { |
719
|
0
|
|
|
0
|
|
|
my($self, $points) = @_; |
720
|
0
|
0
|
|
|
|
|
_TransformPoints($self, $points), return unless ref($points->[0]->[0]); |
721
|
0
|
|
|
|
|
|
for my $p (@$points) { |
722
|
0
|
|
|
|
|
|
TransformPoints($self, $p); |
723
|
|
|
|
|
|
|
} |
724
|
|
|
|
|
|
|
} |
725
|
|
|
|
|
|
|
1; |