199 |
"""Test Map.TreeInfo""" |
"""Test Map.TreeInfo""" |
200 |
proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"]) |
proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"]) |
201 |
self.map.SetProjection(proj) |
self.map.SetProjection(proj) |
202 |
|
# compute the extent string because there are platform |
203 |
|
# differences in the way %g is handled: |
204 |
|
# glibc: "%g" % 7.01969e+06 == "7.01969e+06" |
205 |
|
# w32/VC: "%g" % 7.01969e+06 == "7.01969e+006" |
206 |
|
extent = 'Extent (projected): (%g, %g, %g, %g)'\ |
207 |
|
% (608873, 7.01969e+06, 1.17356e+06, 7.44735e+06) |
208 |
self.assertEquals(self.map.TreeInfo(), |
self.assertEquals(self.map.TreeInfo(), |
209 |
('Map: Test Map', |
('Map: Test Map', |
210 |
[('Extent (lat-lon):' |
[('Extent (lat-lon):' |
211 |
' (-24.5465, 63.2868, -13.4958, 66.5638)'), |
' (-24.5465, 63.2868, -13.4958, 66.5638)'), |
212 |
('Extent (projected):' |
extent, |
|
' (608873, 7.01969e+06, 1.17356e+06, 7.44735e+06)'), |
|
213 |
('Projection', |
('Projection', |
214 |
['zone=26', 'proj=utm', 'ellps=clrk66']), |
['zone=26', 'proj=utm', 'ellps=clrk66']), |
215 |
self.poly_layer, |
self.poly_layer, |