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