/[thuban]/branches/WIP-pyshapelib-bramz/test/test_map.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/test/test_map.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 332 by bh, Fri Sep 20 15:45:59 2002 UTC revision 343 by bh, Fri Oct 18 17:28:56 2002 UTC
# Line 186  class TestMapWithContents(TestMapBase, s Line 186  class TestMapWithContents(TestMapBase, s
186          self.map.SetProjection(proj)          self.map.SetProjection(proj)
187          self.assertFloatSeqEqual(self.map.ProjectedBoundingBox(),          self.assertFloatSeqEqual(self.map.ProjectedBoundingBox(),
188                                   (608873.03380603762, 7019694.6517963577,                                   (608873.03380603762, 7019694.6517963577,
189                                    1173560.0288053728, 7447353.2203218574))                                    1173560.0288053728, 7447353.2203218574),
190                                     epsilon = 1e-5)
191    
192      def test_set_projection(self):      def test_set_projection(self):
193          """Test Map.SetProjection"""          """Test Map.SetProjection"""
# Line 199  class TestMapWithContents(TestMapBase, s Line 200  class TestMapWithContents(TestMapBase, s
200          """Test Map.TreeInfo"""          """Test Map.TreeInfo"""
201          proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"])          proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"])
202          self.map.SetProjection(proj)          self.map.SetProjection(proj)
203            # compute the extent string because there are platform
204            # differences in the way %g is handled:
205            # glibc: "%g" % 7.01969e+06 == "7.01969e+06"
206            # w32/VC: "%g" % 7.01969e+06 == "7.01969e+006"
207            extent = 'Extent (projected): (%g, %g, %g, %g)'\
208                     % (608873, 7.01969e+06, 1.17356e+06, 7.44735e+06)
209          self.assertEquals(self.map.TreeInfo(),          self.assertEquals(self.map.TreeInfo(),
210                            ('Map: Test Map',                            ('Map: Test Map',
211                             [('Extent (lat-lon):'                             [('Extent (lat-lon):'
212                               ' (-24.5465, 63.2868, -13.4958, 66.5638)'),                               ' (-24.5465, 63.2868, -13.4958, 66.5638)'),
213                              ('Extent (projected):'                              extent,
                           ' (608873, 7.01969e+06, 1.17356e+06, 7.44735e+06)'),  
214                              ('Projection',                              ('Projection',
215                               ['zone=26', 'proj=utm', 'ellps=clrk66']),                               ['zone=26', 'proj=utm', 'ellps=clrk66']),
216                              self.poly_layer,                              self.poly_layer,

Legend:
Removed from v.332  
changed lines
  Added in v.343

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26