Add full set of tests for text placement.
BIN
tests/data/placement/list-100-reference.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
tests/data/placement/list-150-reference.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
tests/data/placement/list-200-reference.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
tests/data/placement/list-250-reference.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
tests/data/placement/list-300-reference.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
tests/data/placement/list-400-reference.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
tests/data/placement/list-600-reference.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
tests/data/placement/list-800-reference.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
27
tests/data/placement/list.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map>
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84">
|
||||
|
||||
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||
<StyleName>My Style</StyleName>
|
||||
<Datasource>
|
||||
<!--
|
||||
<Parameter name="type">osm</Parameter>
|
||||
<Parameter name="file">points.osm</Parameter>-->
|
||||
<Parameter name="type">shape</Parameter>
|
||||
<Parameter name="file">points.shp</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
<Style name="My Style">
|
||||
<Rule>
|
||||
<PointSymbolizer/>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dy="8" fill="blue" placement-type="list">[name]
|
||||
<Placement size="10" dy="-8" fill="red"/>
|
||||
<Placement fill="green">'S'+[nr]</Placement>
|
||||
<Placement fill="orange" dy="8">[nr]</Placement>
|
||||
</TextSymbolizer>
|
||||
</Rule>
|
||||
</Style>
|
||||
|
||||
</Map>
|
BIN
tests/data/placement/points.dbf
Normal file
43
tests/data/placement/points.osm
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<osm version='0.6' generator='JOSM'>
|
||||
<node id='-1' lat='0' lon='0'>
|
||||
<tag k='name' v='Test one' />
|
||||
<tag k='nr' v='1' />
|
||||
</node>
|
||||
<node id='-2' lat='0' lon='0.1'>
|
||||
<tag k='name' v='Test two' />
|
||||
<tag k='nr' v='2' />
|
||||
</node>
|
||||
<node id='-3' lat='0' lon='0.2'>
|
||||
<tag k='name' v='Test three' />
|
||||
<tag k='nr' v='3' />
|
||||
</node>
|
||||
<node id='-4' lat='0' lon='0.3'>
|
||||
<tag k='name' v='Test four' />
|
||||
<tag k='nr' v='4' />
|
||||
</node>
|
||||
<node id='-5' lat='0' lon='0.4'>
|
||||
<tag k='name' v='Test five' />
|
||||
<tag k='nr' v='5' />
|
||||
</node>
|
||||
<node id='-6' lat='0' lon='0.5'>
|
||||
<tag k='name' v='Test six' />
|
||||
<tag k='nr' v='6' />
|
||||
</node>
|
||||
<node id='-7' lat='0' lon='0.6'>
|
||||
<tag k='name' v='Test seven' />
|
||||
<tag k='nr' v='7' />
|
||||
</node>
|
||||
<node id='-8' lat='0' lon='0.7'>
|
||||
<tag k='name' v='Test eight' />
|
||||
<tag k='nr' v='8' />
|
||||
</node>
|
||||
<node id='-9' lat='0' lon='0.8'>
|
||||
<tag k='name' v='Test nine' />
|
||||
<tag k='nr' v='9' />
|
||||
</node>
|
||||
<node id='-10' lat='0' lon='0.9'>
|
||||
<tag k='name' v='Test ten' />
|
||||
<tag k='nr' v='10' />
|
||||
</node>
|
||||
</osm>
|
BIN
tests/data/placement/points.shp
Normal file
BIN
tests/data/placement/simple-100-reference.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
tests/data/placement/simple-150-reference.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
tests/data/placement/simple-200-reference.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
tests/data/placement/simple-250-reference.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
tests/data/placement/simple-300-reference.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
tests/data/placement/simple-400-reference.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
tests/data/placement/simple-600-reference.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
tests/data/placement/simple-800-reference.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
24
tests/data/placement/simple.xml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE Map>
|
||||
<Map background-color="white" srs="+proj=latlong +datum=WGS84">
|
||||
|
||||
<Layer name="layer" srs="+proj=latlong +datum=WGS84">
|
||||
<StyleName>My Style</StyleName>
|
||||
<Datasource>
|
||||
<!--
|
||||
<Parameter name="type">osm</Parameter>
|
||||
<Parameter name="file">points.osm</Parameter>
|
||||
-->
|
||||
<Parameter name="type">shape</Parameter>
|
||||
<Parameter name="file">points.shp</Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
<Style name="My Style">
|
||||
<Rule>
|
||||
<PointSymbolizer/>
|
||||
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="point" dx="5" dy="16" placement-type="simple" placements="N,S,E,W,SW,10,5">[name]</TextSymbolizer>
|
||||
</Rule>
|
||||
</Style>
|
||||
|
||||
</Map>
|