Tests for PointSymbolizer.allow-overlap and .ignore-placement with expr

This commit is contained in:
Stephan Bösch-Plepelits 2014-08-11 15:55:38 +02:00
parent 7815d9c6f0
commit ec3a2dd08b
7 changed files with 233 additions and 0 deletions

View file

@ -0,0 +1,157 @@
{
"keys": [
"",
"1",
"2",
"3",
"5",
"7",
"8",
"9",
"10",
"11",
"13",
"15",
"16",
"17",
"18",
"19",
"21",
"22",
"23",
"25",
"26",
"27",
"29",
"30",
"31"
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" !!!### $$$ %%% &&''' ",
" !!!##### $$$$$ %%%%% &&''''' ",
" !!!##### $$$$$ %%%%% &&''''' ",
" !!!##### $$$$$ %%%%% &&''''' ",
" !!!### $$$ %%% &&'''' ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" (()))) **** ++++ ,,,---- ",
" ((())))) ***** +++++ ,,----- ",
" ((())))) ***** +++++ ,,----- ",
" (())))) ***** +++++ ,,,---- ",
" (())) *** +++ ,,,-- ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .../// 000 11222 333 ",
" ...///// 00000 1122222 33333 ",
" ...///// 00000 1122222 33333 ",
" ...///// 00000 1122222 33333 ",
" .../// 000 112222 333 ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" 445555 6666 7778888 9999 ",
" 44455555 66666 7788888 99999 ",
" 44455555 66666 7788888 99999 ",
" 4455555 66666 7778888 99999 ",
" 44555 666 77788 999 ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map background-color="white" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<FontSet name="book">
<Font face-name="DejaVu Sans Book"/>
</FontSet>
<Layer name="layer" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>My Style</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="inline">
lat,long,overlap,placement
0.33,-0.36,noexpr-true,noexpr-false
0.33,-0.34,noexpr-true,noexpr-false
0.33,-0.13,noexpr-false,noexpr-false
0.33,-0.11,noexpr-false,noexpr-false
0.33, 0.10,noexpr-true,noexpr-false
0.33, 0.12,noexpr-false,noexpr-false
0.33, 0.34,noexpr-false,noexpr-false
0.33, 0.36,noexpr-true,noexpr-false
0.11,-0.36,true,false
0.11,-0.34,true,false
0.11,-0.13,false,false
0.11,-0.11,false,false
0.11, 0.10,true,false
0.11, 0.12,false,false
0.11, 0.34,false,false
0.11, 0.36,true,false
-0.11,-0.36,noexpr-false,noexpr-true
-0.11,-0.34,noexpr-false,noexpr-true
-0.11,-0.13,noexpr-false,noexpr-false
-0.11,-0.11,noexpr-false,noexpr-false
-0.11, 0.10,noexpr-false,noexpr-true
-0.11, 0.12,noexpr-false,noexpr-false
-0.11, 0.34,noexpr-false,noexpr-false
-0.11, 0.36,noexpr-false,noexpr-true
-0.33,-0.36,false,true
-0.33,-0.34,false,true
-0.33,-0.13,false,false
-0.33,-0.11,false,false
-0.33, 0.10,false,true
-0.33, 0.12,false,false
-0.33, 0.34,false,false
-0.33, 0.36,false,true
</Parameter>
</Datasource>
</Layer>
<Style name="My Style" filter-mode="first">
<Rule>
<Filter>[overlap] = "noexpr-true" and [placement] = "noexpr-true"</Filter>
<PointSymbolizer allow-overlap="true" ignore-placement="true" file="../../data/svg/point_sm.svg" />
</Rule>
<Rule>
<Filter>[overlap] = "noexpr-true" and [placement] = "noexpr-false"</Filter>
<PointSymbolizer allow-overlap="true" ignore-placement="false" file="../../data/svg/point_sm.svg" />
</Rule>
<Rule>
<Filter>[overlap] = "noexpr-false" and [placement] = "noexpr-false"</Filter>
<PointSymbolizer allow-overlap="false" ignore-placement="false" file="../../data/svg/point_sm.svg" />
</Rule>
<Rule>
<Filter>[overlap] = "noexpr-false" and [placement] = "noexpr-true"</Filter>
<PointSymbolizer allow-overlap="false" ignore-placement="true" file="../../data/svg/point_sm.svg" />
</Rule>
<Rule>
<PointSymbolizer allow-overlap="[overlap]" ignore-placement="[placement]" file="../../data/svg/point_sm.svg" />
</Rule>
</Style>
</Map>

View file

@ -247,6 +247,7 @@ files = {
'line-symbolizer-expressions-all':{'sizes':[(256,256)]},
'point-symbolizer-expressions':{'sizes':[(256,256)]},
'point-symbolizer-expressions-all':{'sizes':[(256,256)]},
'point-symbolizer-overlap-placement-expr': {'bbox':large_text_box, 'sizes': [(500, 500)]},
'marker-symbolizer-expressions-all':{'sizes':[(256,256)]},
'polygon-symbolizer-expressions':{'sizes':[(256,256)]},
'polygon-symbolizer-expressions-all':{'sizes':[(256,256)]},