179 |
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
180 |
<!DOCTYPE session SYSTEM "thuban-1.0.dtd"> |
<!DOCTYPE session SYSTEM "thuban-1.0.dtd"> |
181 |
<session xmlns="http://thuban.intevation.org/dtds/thuban-1.0-dev.dtd" |
<session xmlns="http://thuban.intevation.org/dtds/thuban-1.0-dev.dtd" |
182 |
title="single map&layer"> |
title="Stra\xc3\x9fen & Landmarken"> |
183 |
<fileshapesource filetype="shapefile" id="D1" |
<fileshapesource filetype="shapefile" id="D1" |
184 |
filename="../../Data/iceland/political.shp"/> |
filename="../../Data/iceland/political.shp"/> |
185 |
<map title="Test Map"> |
<map title="\xc3\x9cbersicht"> |
186 |
<projection epsg="32627" name="WGS 84 / UTM zone 27N"> |
<projection epsg="32627" name="WGS 84 / UTM zone 27N"> |
187 |
<parameter value="datum=WGS84"/> |
<parameter value="datum=WGS84"/> |
188 |
<parameter value="ellps=WGS84"/> |
<parameter value="ellps=WGS84"/> |
191 |
<parameter value="zone=27"/> |
<parameter value="zone=27"/> |
192 |
</projection> |
</projection> |
193 |
<layer shapestore="D1" visible="true" |
<layer shapestore="D1" visible="true" |
194 |
stroke="#000000" title="My Layer" stroke_width="1" |
stroke="#000000" title="K\xc3\xbcste" stroke_width="1" |
195 |
fill="None"/> |
fill="None"/> |
196 |
</map> |
</map> |
197 |
</session> |
</session> |
204 |
self.session = session |
self.session = session |
205 |
|
|
206 |
# Check the title |
# Check the title |
207 |
eq(session.Title(), "single map&layer") |
eq(session.Title(), "Stra\xdfen & Landmarken") |
208 |
|
|
209 |
# the session has one map. |
# the session has one map. |
210 |
maps = session.Maps() |
maps = session.Maps() |
212 |
|
|
213 |
# Check the map's attributes |
# Check the map's attributes |
214 |
map = maps[0] |
map = maps[0] |
215 |
eq(map.Title(), "Test Map") |
eq(map.Title(), "\xdcbersicht") |
216 |
proj = map.GetProjection() |
proj = map.GetProjection() |
217 |
eq(proj.GetName(), "WGS 84 / UTM zone 27N") |
eq(proj.GetName(), "WGS 84 / UTM zone 27N") |
218 |
eq(proj.EPSGCode(), "32627") |
eq(proj.EPSGCode(), "32627") |
227 |
|
|
228 |
# Check the layer attributes |
# Check the layer attributes |
229 |
layer = layers[0] |
layer = layers[0] |
230 |
eq(layer.Title(), "My Layer") |
eq(layer.Title(), "K\xfcste") |
231 |
self.failUnless(filenames_equal(layer.ShapeStore().FileName(), |
self.failUnless(filenames_equal(layer.ShapeStore().FileName(), |
232 |
os.path.join(self.temp_dir(), |
os.path.join(self.temp_dir(), |
233 |
os.pardir, os.pardir, |
os.pardir, os.pardir, |