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

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

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

revision 1787 by bh, Wed Oct 8 10:39:18 2003 UTC revision 1793 by bh, Wed Oct 8 16:04:01 2003 UTC
# Line 21  import support Line 21  import support
21  support.initthuban()  support.initthuban()
22    
23  from Thuban import _  from Thuban import _
24  from Thuban.Model.proj import Projection, ProjFile  from Thuban.Model.proj import Projection, ProjFile, \
25         PROJ_UNITS_METERS, PROJ_UNITS_DEGREES
26    
27  import Thuban.Model.resource as resource  import Thuban.Model.resource as resource
28    
# Line 70  class TestProjection(unittest.TestCase, Line 71  class TestProjection(unittest.TestCase,
71          proj = Projection(params, "MyName")          proj = Projection(params, "MyName")
72          self.assertEquals(proj.GetName(), "MyName")          self.assertEquals(proj.GetName(), "MyName")
73    
74        def test_get_projection_units_geo(self):
75            """Test Projection.GetProjectedUnits() for geographic projection"""
76            proj = Projection(["proj=latlong", "to_meter=0.017453292519943295",
77                               "ellps=clrk66"])
78            self.assertEquals(proj.GetProjectedUnits(), PROJ_UNITS_DEGREES)
79    
80        def test_get_projection_units_normal(self):
81            """Test Projection.GetProjectedUnits() for normal projection"""
82            proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"])
83            self.assertEquals(proj.GetProjectedUnits(), PROJ_UNITS_METERS)
84    
85    
86  sample_projfile = '''\  sample_projfile = '''\
87  <?xml version="1.0" encoding="UTF-8"?>  <?xml version="1.0" encoding="UTF-8"?>

Legend:
Removed from v.1787  
changed lines
  Added in v.1793

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26