389 |
|
|
390 |
file_contents = '''\ |
file_contents = '''\ |
391 |
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
392 |
<!DOCTYPE session SYSTEM "thuban.dtd"> |
<!DOCTYPE session SYSTEM "thuban-1.0.dtd"> |
393 |
<session title="single map&layer"> |
<session xmlns="http://thuban.intevation.org/dtds/thuban-1.0-dev.dtd" |
394 |
<map title="Test Map"> |
title="single map&layer"> |
395 |
<projection> |
<fileshapesource filetype="shapefile" id="D138389860" |
396 |
<parameter value="zone=26"/> |
filename="../../Data/iceland/political.shp"/> |
397 |
<parameter value="proj=utm"/> |
<fileshapesource filetype="shapefile" id="D138504492" |
398 |
<parameter value="ellps=clrk66"/> |
filename="../../Data/iceland/political.shp"/> |
399 |
</projection> |
<map title="Test Map"> |
400 |
<layer title="My Layer" stroke_width="1" fill="None" |
<projection name=""> |
401 |
filename="../../Data/iceland/political.shp" |
<parameter value="zone=26"/> |
402 |
stroke="#000000"> |
<parameter value="proj=utm"/> |
403 |
|
<parameter value="ellps=clrk66"/> |
404 |
|
</projection> |
405 |
|
<layer shapestore="D138389860" visible="true" stroke="#000000" |
406 |
|
title="My Layer" stroke_width="1" fill="None"> |
407 |
<classification field="POPYREG" field_type="string"> |
<classification field="POPYREG" field_type="string"> |
408 |
<clnull> |
<clnull label=""> |
409 |
<cldata stroke="#000000" stroke_width="1" fill="None"/> |
<cldata stroke="#000000" stroke_width="1" fill="None"/> |
410 |
</clnull> |
</clnull> |
411 |
<clpoint value="1"> |
<clpoint label="" value="1"> |
412 |
<cldata stroke="#000000" stroke_width="2" fill="None"/> |
<cldata stroke="#000000" stroke_width="2" fill="None"/> |
413 |
</clpoint> |
</clpoint> |
414 |
<clpoint value="1"> |
<clpoint label="" value="1"> |
415 |
<cldata stroke="#000000" stroke_width="10" fill="None"/> |
<cldata stroke="#000000" stroke_width="10" fill="None"/> |
416 |
</clpoint> |
</clpoint> |
417 |
<clpoint value="\xc3\xa4\xc3\xb6\xc3\xbc" |
<clpoint label="\xc3\x9cml\xc3\xa4uts" |
418 |
label="\xc3\x9cml\xc3\xa4uts"> |
value="\xc3\xa4\xc3\xb6\xc3\xbc"> |
419 |
<cldata fill="None" stroke="#000000" stroke_width="1"/> |
<cldata stroke="#000000" stroke_width="1" fill="None"/> |
420 |
</clpoint> |
</clpoint> |
421 |
</classification> |
</classification> |
422 |
</layer> |
</layer> |
423 |
<layer title="My Layer 2" stroke_width="1" fill="None" |
<layer shapestore="D138504492" visible="true" stroke="#000000" |
424 |
filename="../../Data/iceland/political.shp" |
title="My Layer 2" stroke_width="2" fill="None"> |
|
stroke="#000000"> |
|
425 |
<classification field="AREA" field_type="double"> |
<classification field="AREA" field_type="double"> |
426 |
<clnull> |
<clnull label=""> |
427 |
<cldata stroke="#000000" stroke_width="2" fill="None"/> |
<cldata stroke="#000000" stroke_width="2" fill="None"/> |
428 |
</clnull> |
</clnull> |
429 |
<clrange min="0" max="1"> |
<clrange label="" range="[0;1["> |
430 |
<cldata stroke="#111111" stroke_width="1" fill="None"/> |
<cldata stroke="#111111" stroke_width="1" fill="None"/> |
431 |
</clrange> |
</clrange> |
432 |
<clpoint value=".5"> |
<clpoint label="" value="0.5"> |
433 |
<cldata stroke="#000000" stroke_width="1" fill="#111111"/> |
<cldata stroke="#000000" stroke_width="1" fill="#111111"/> |
434 |
</clpoint> |
</clpoint> |
435 |
<clrange min="-1" max="0"> |
<clrange label="" range="[-1;0["> |
436 |
<cldata stroke="#000000" stroke_width="1" fill="None"/> |
<cldata stroke="#000000" stroke_width="1" fill="None"/> |
437 |
</clrange> |
</clrange> |
438 |
<clpoint value="-.5"> |
<clpoint label="" value="-0.5"> |
439 |
<cldata stroke="#000000" stroke_width="1" fill="None"/> |
<cldata stroke="#000000" stroke_width="1" fill="None"/> |
440 |
</clpoint> |
</clpoint> |
441 |
</classification> |
</classification> |
442 |
</layer> |
</layer> |
443 |
</map> |
</map> |
444 |
</session> |
</session> |
445 |
''' |
''' |
446 |
|
|
474 |
|
|
475 |
self.TestLayers(map.Layers(), expected) |
self.TestLayers(map.Layers(), expected) |
476 |
|
|
477 |
|
self.check_format() |
478 |
|
|
479 |
|
|
480 |
class TestLabels(ClassificationTest): |
class TestLabels(ClassificationTest): |
481 |
|
|