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