178 |
def testLayerProjection(self): |
def testLayerProjection(self): |
179 |
"""Test saving layers with projections""" |
"""Test saving layers with projections""" |
180 |
# deliberately put an apersand in the title :) |
# deliberately put an apersand in the title :) |
181 |
session = Session("single map&layer") |
session = self.session = Session("single map&layer") |
182 |
proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"]) |
proj = Projection(["zone=26", "proj=utm", "ellps=clrk66"]) |
183 |
map = Map("Test Map", projection = proj) |
map = Map("Test Map", projection = proj) |
184 |
session.AddMap(map) |
session.AddMap(map) |
192 |
|
|
193 |
filename = self.temp_file_name("save_layerproj.thuban") |
filename = self.temp_file_name("save_layerproj.thuban") |
194 |
save_session(session, filename) |
save_session(session, filename) |
|
session.Destroy() |
|
195 |
|
|
196 |
file = open(filename) |
file = open(filename) |
197 |
written_contents = file.read() |
written_contents = file.read() |