add visual test for expressions function length(<expr>)
This commit is contained in:
parent
97dcd2fd59
commit
c322655cc6
8 changed files with 561 additions and 160 deletions
|
@ -0,0 +1,142 @@
|
|||
{
|
||||
"keys": [
|
||||
"",
|
||||
"1",
|
||||
"5",
|
||||
"4",
|
||||
"2",
|
||||
"6",
|
||||
"3"
|
||||
],
|
||||
"data": {},
|
||||
"grid": [
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" ##### !! ",
|
||||
" ##### !! $$$$ ",
|
||||
" ###### !! $$$$ ",
|
||||
" # ##### !! $$$$$$ ",
|
||||
" # ## !! $$$ ",
|
||||
" ### !! $$$$ ",
|
||||
" ##### !! $$ ",
|
||||
" ##### !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" %%%% %%%%!! ",
|
||||
" %%%%%%% %%%%%%%% %%%%%%! ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" % %%%%%%%%%%%%%%%%%%%%%%%%%% %% ",
|
||||
" %%% %%%%%%%%%%%%%%%%%%%%%%%%% %% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%% ",
|
||||
" %%% !! %%%%%%%%%%% ",
|
||||
" %%!! %%%%%%%%% ",
|
||||
" % %% %%%%%%%%%%% ",
|
||||
" !%%%% %%%%%%%%%%%% ",
|
||||
" !! %%%%%%%% %% %%%%% ",
|
||||
" !! %%%%%%% %% %% %% ",
|
||||
" !! %% %% %% %% %% ",
|
||||
" !! %% %% %% %% ",
|
||||
" !! %% %% %% %% ",
|
||||
" !! %% %% %% %% ",
|
||||
" !! %%%%%%%%%%%%%%%%% ",
|
||||
" !! %%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !! %%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !! %%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !! %%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !! %%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !! %%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !! %%%%%%%%%%%%%%%%% ",
|
||||
" !! %%%%%%% ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! &&&& ",
|
||||
" !! ''' &&&&&& ",
|
||||
" !! '''' &&&&&& ",
|
||||
" !! '''''' &&&&&&&&&& ",
|
||||
" !! '' & &&& ",
|
||||
" !! '' &&& ",
|
||||
" !! ''' &&&& ",
|
||||
" !! &&&&&& ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
" !! ",
|
||||
"!! ",
|
||||
"! ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
]
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
{
|
||||
"keys": [
|
||||
"",
|
||||
"1",
|
||||
"5",
|
||||
"4",
|
||||
"2",
|
||||
"3"
|
||||
],
|
||||
"data": {},
|
||||
"grid": [
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" !!!! ",
|
||||
" ######### !!!! ",
|
||||
" ######### !!!! ",
|
||||
" ########## !!!! $ $ ",
|
||||
" ########### !!!! $$$$$$ ",
|
||||
" ########### !!!! $$$$$$$$ ",
|
||||
" ########### !!!! $$$$$$$$ ",
|
||||
" ### ########### ## !!!! $$$$$$$$ ",
|
||||
" ######### !!!! $$$$$$ ",
|
||||
" # ###### !!!! $ $$ ",
|
||||
" # ##### !!!! $$$$$ ",
|
||||
" ####### !!!! $$$$ ",
|
||||
" ##### %%%% %%%%% !!!! $$$$$$$ ",
|
||||
" ###### %%%%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%%%%%%%%%%%%%%%%%%%% %%%% ",
|
||||
" %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% ",
|
||||
" % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%% !!!!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%% !!!! %%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" %%%%% !!!! %%%%%%%%%%%%%%%%% ",
|
||||
" % %%%%!!!! %%%%%%%%%%%%%%%%%% ",
|
||||
" % %%%%%!! %%%%%%%%%%%%%%%%%%% ",
|
||||
" %% %%%%% %%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !%%%%% %%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!%%%%%% %%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!!%%%%%%%%%%%%%%%%% %%%%% %%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%% %%%%% %%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%%%%%%%%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%% %%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%% %%%%% %%%%% %%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! &&&&&&& %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! &&&&&&& %%%%%%%%%%%%%%%%%%%%%%%%%%% ",
|
||||
" !!!! &&&&&&& %%%%%%%%%%%%%% ",
|
||||
" !!!! &&&&&&& ",
|
||||
" !!!! &&&&&&&&&&& ",
|
||||
" !!!! &&&&&& ",
|
||||
" !!!! &&&&& ",
|
||||
" !!!! &&& ",
|
||||
" !!!! &&&&&& ",
|
||||
" !!!! &&&&&&& ",
|
||||
"!!!! &&& ",
|
||||
"!!! ",
|
||||
"!! ",
|
||||
"! ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
]
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
117
tests/visual_tests/styles/functional-expressions-length.xml
Normal file
117
tests/visual_tests/styles/functional-expressions-length.xml
Normal file
|
@ -0,0 +1,117 @@
|
|||
<Map background-color="#eee" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
|
||||
<FontSet name="book-fonts">
|
||||
<Font face-name="DejaVu Sans Book"/>
|
||||
<Font face-name="unifont Medium"/>
|
||||
</FontSet>
|
||||
<Style name="frame" filter-mode="first">
|
||||
<Rule>
|
||||
<Filter>[mapnik::geometry_type]=linestring</Filter>
|
||||
<LineSymbolizer
|
||||
stroke="[color]"
|
||||
stroke-width="[width]"
|
||||
offset="abs([offset]*2.0)"/>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[mapnik::geometry_type]=point</Filter>
|
||||
<MarkersSymbolizer
|
||||
file="../../../[base-path]/[filetype]/[filename].[filetype]"
|
||||
width="exp(0.4*length([name]))"
|
||||
/>
|
||||
</Rule>
|
||||
</Style>
|
||||
|
||||
<Layer name="frame" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
|
||||
<StyleName>frame</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="type">ogr</Parameter>
|
||||
<Parameter name="layer_by_index">0</Parameter>
|
||||
<Parameter name="inline"><![CDATA[
|
||||
{
|
||||
"type" : "FeatureCollection",
|
||||
"features" : [
|
||||
{
|
||||
"properties" : {
|
||||
"width":"5",
|
||||
"color" : "red",
|
||||
"offset": 10
|
||||
},
|
||||
"geometry" : {
|
||||
"coordinates" : [[-15,-15],[15,15]],
|
||||
"type" : "LineString"
|
||||
},
|
||||
"type" : "Feature",
|
||||
},
|
||||
{
|
||||
"geometry" : {
|
||||
"coordinates" : [ 0,0 ],
|
||||
"type" : "Point"
|
||||
},
|
||||
"properties" : {
|
||||
"base-path":"./tests/data",
|
||||
"filetype":"svg",
|
||||
"filename":"octocat",
|
||||
"width":"5",
|
||||
"name": "Large octocat",
|
||||
"color" : "#ace"
|
||||
},
|
||||
"type" : "Feature",
|
||||
},
|
||||
{
|
||||
"geometry" : {
|
||||
"coordinates" : [ -10,-10 ],
|
||||
"type" : "Point"
|
||||
},
|
||||
"properties" : {
|
||||
"base-path":"./tests/data",
|
||||
"filetype":"svg",
|
||||
"filename":"octocat",
|
||||
"width":"5",
|
||||
"name": "tiny cat",
|
||||
"color" : "#ace"
|
||||
},
|
||||
"type" : "Feature",
|
||||
},
|
||||
{
|
||||
"geometry" : {
|
||||
"coordinates" : [ 10,10 ],
|
||||
"type" : "Point"
|
||||
},
|
||||
"properties" : {
|
||||
"base-path":"./tests/data",
|
||||
"filetype":"svg",
|
||||
"filename":"octocat",
|
||||
"name": "tiny cat"
|
||||
},
|
||||
"type" : "Feature",
|
||||
},
|
||||
{
|
||||
"geometry" : {
|
||||
"coordinates" : [ -10,10 ],
|
||||
"type" : "Point"
|
||||
},
|
||||
"properties" : {
|
||||
"base-path":"./tests/data",
|
||||
"filetype":"svg",
|
||||
"filename":"octocat",
|
||||
"name": "small cat"
|
||||
},
|
||||
"type" : "Feature",
|
||||
},
|
||||
{
|
||||
"geometry" : {
|
||||
"coordinates" : [ 10,-10 ],
|
||||
"type" : "Point"
|
||||
},
|
||||
"properties" : {
|
||||
"base-path":"./tests/data",
|
||||
"filetype":"svg",
|
||||
"filename":"octocat",
|
||||
"name": "small cat"
|
||||
},
|
||||
"type" : "Feature",
|
||||
}
|
||||
]
|
||||
}]]></Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
</Map>
|
|
@ -281,6 +281,7 @@ files = {
|
|||
'marker-on-line-and-avoid-edges':{'sizes':[(512,512)]},
|
||||
'text-typographic':{'sizes':[(512,512)]},
|
||||
'functional-expressions':{'sizes':[(256,256)], 'bbox':mapnik.Box2d(-10,-10,10,10)},
|
||||
'functional-expressions-length':{'sizes':[(512,512)], 'bbox':mapnik.Box2d(-15,-15,15,15)},
|
||||
'marker-collide':{'sizes':[(512,512)]},
|
||||
'postgis-inline':{'sizes':[(512,512)]},
|
||||
'text-line-wrap':{'sizes':[(512,512)]},
|
||||
|
|
Loading…
Reference in a new issue