226 |
layer = RasterLayer("My RasterLayer", imgfile) |
layer = RasterLayer("My RasterLayer", imgfile) |
227 |
map.AddLayer(layer) |
map.AddLayer(layer) |
228 |
|
|
229 |
filename = self.temp_file_name("save_singlemap.thuban") |
filename = self.temp_file_name("%s.thuban" % self.id()) |
230 |
save_session(session, filename) |
save_session(session, filename) |
231 |
session.Destroy() |
session.Destroy() |
232 |
|
|
242 |
visible="true"> |
visible="true"> |
243 |
</rasterlayer> |
</rasterlayer> |
244 |
</map> |
</map> |
245 |
</session>''' % os.path.join(os.path.dirname(__file__), |
</session>''' % os.path.join(os.pardir, os.pardir, "Data", "iceland", |
|
os.pardir, "Data", "iceland", |
|
246 |
"island.tif") |
"island.tif") |
247 |
#print written_contents |
#print written_contents |
248 |
#print "********************************************" |
#print "********************************************" |
268 |
|
|
269 |
clazz = layer.GetClassification() |
clazz = layer.GetClassification() |
270 |
|
|
271 |
clazz.SetFieldInfo("AREA", None) |
layer.SetClassificationColumn("AREA") |
272 |
|
|
273 |
clazz.AppendGroup(ClassGroupSingleton(42, ClassGroupProperties(), |
clazz.AppendGroup(ClassGroupSingleton(42, ClassGroupProperties(), |
274 |
"single")) |
"single")) |
286 |
|
|
287 |
|
|
288 |
clazz = layer2.GetClassification() |
clazz = layer2.GetClassification() |
289 |
clazz.SetFieldInfo("POPYCOUN", None) |
layer2.SetClassificationColumn("POPYCOUN") |
290 |
|
|
291 |
# Classification with Latin 1 text |
# Classification with Latin 1 text |
292 |
clazz.AppendGroup(ClassGroupSingleton('\xe4\xf6\xfc', # ae, oe, ue |
clazz.AppendGroup(ClassGroupSingleton('\xe4\xf6\xfc', # ae, oe, ue |
380 |
<filetable id="D1" filename="%s" filetype="DBF" title="political"/> |
<filetable id="D1" filename="%s" filetype="DBF" title="political"/> |
381 |
</session>''' |
</session>''' |
382 |
|
|
383 |
expected_contents = expected_template % dbffile |
expected_contents = (expected_template |
384 |
|
% os.path.join(os.pardir, os.pardir, "Data", |
385 |
|
"iceland", "political.dbf")) |
386 |
self.compare_xml(written_contents, expected_contents) |
self.compare_xml(written_contents, expected_contents) |
387 |
|
|
388 |
def test_joined_table(self): |
def test_joined_table(self): |