Merge pull request #2330 from MapQuest/jh-min-distance-test

Test case for minimum distance
This commit is contained in:
Dane Springmeyer 2014-08-03 12:39:40 -07:00
commit a7586b28a0
14 changed files with 256 additions and 0 deletions

View file

@ -0,0 +1,10 @@
wkt,type,name,ref
"POINT(-3 -0.40)",poi,,
"POINT(3 -0.40)",poi,,
"POINT(-3 -3.6)",poi,,
"POINT(3 -3.6)",poi,,
"LINESTRING(-12 2, 12 2)",motorway,First Hwy,1
"LINESTRING(-12 1, 12 1)",motorway,First Hwy,1
"LINESTRING(-12 3, 12 3)",motorway,Second Hwy,2
"LINESTRING(-12 -1, 8 -1, 8 -2, -8 -2, -8 -3, 12 -3)",secondary,Main Street,
1 wkt type name ref
2 POINT(-3 -0.40) poi
3 POINT(3 -0.40) poi
4 POINT(-3 -3.6) poi
5 POINT(3 -3.6) poi
6 LINESTRING(-12 2, 12 2) motorway First Hwy 1
7 LINESTRING(-12 1, 12 1) motorway First Hwy 1
8 LINESTRING(-12 3, 12 3) motorway Second Hwy 2
9 LINESTRING(-12 -1, 8 -1, 8 -2, -8 -2, -8 -3, 12 -3) secondary Main Street

View file

@ -0,0 +1,79 @@
{
"keys": [
"",
"7",
"5",
"6",
"1",
"2",
"8",
"3",
"4"
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
" !!!! ! !!!! ! !!!!! ! !!!! !!!! !!!!! ",
" ",
" ",
" ",
" ",
" #### #### ##### #### #### #### ",
"############################################################################################################################################################################################",
"############################################################################################################################################################################################",
" #### # #### # ##### # #### # #### #### ",
" ",
" ",
" ",
" ",
" $$$$ $$$$ $ $$$$$ $$$$ $ $$$$ $ $$$$ ",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
" $ $ $ $ ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" % & ",
" %%% &&& ",
" %%% &&& ",
" ",
" ",
"'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
"'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
"'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
" '' ",
" '' ",
" '' ",
" '' ",
" '' ",
" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
" '' ",
" '' ",
" '' ",
" '' ",
" '' ",
" '' ",
" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''",
" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''",
" ",
" ",
" ( ) ",
" ((( ))) ",
" ((( ))) ",
" ",
" "
]
}

View file

@ -0,0 +1,79 @@
{
"keys": [
"",
"7",
"5",
"6",
"1",
"2",
"8",
"3",
"4"
],
"data": {},
"grid": [
" ",
" ",
" ",
" ",
" ",
" ",
" ",
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
" ",
" ",
" ",
" ",
" ",
" #### #### ##### #### #### #### ",
"############################################################################################################################################################################################",
"############################################################################################################################################################################################",
" #### #### ##### #### #### #### ",
" ",
" ",
" ",
" ",
" ",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" % & ",
" %%% &&& ",
" %%% &&& ",
" ",
" ",
"'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
"'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
"'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
" '' ",
" '' ",
" '' ",
" '' ",
" '' ",
" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ",
" '' ",
" '' ",
" '' ",
" '' ",
" '' ",
" '' ",
" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''",
" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''",
" ",
" ",
" ( ) ",
" ((( ))) ",
" ((( ))) ",
" ",
" "
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map background-color="white" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<Style name="line">
<Rule>
<LineSymbolizer stroke-width="8" stroke="orange"/>
</Rule>
</Style>
<Style name="marker">
<Rule>
<Filter>[type] = 'poi'</Filter>
<MarkersSymbolizer />
</Rule>
</Style>
<Style name="shield">
<Rule>
<Filter>[type] = 'motorway'</Filter>
<ShieldSymbolizer minimum-distance="0" spacing="120" placement="line" face-name="DejaVu Sans Book" size="10" fill="white" file="../../data/svg/rect.svg" transform="scale(0.75)">[ref]</ShieldSymbolizer>
</Rule>
</Style>
<Style name="text">
<Rule>
<Filter>[type] != 'poi'</Filter>
<TextSymbolizer minimum-distance="0" spacing="70" placement="line" face-name="DejaVu Sans Book" size="12">[name]</TextSymbolizer>
</Rule>
</Style>
<Layer name="layer" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>line</StyleName>
<StyleName>marker</StyleName>
<StyleName>shield</StyleName>
<StyleName>text</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="file">../data/repeat-labels.csv</Parameter>
</Datasource>
</Layer>
</Map>

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<Map background-color="white" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<Style name="line">
<Rule>
<LineSymbolizer stroke-width="8" stroke="orange"/>
</Rule>
</Style>
<Style name="marker">
<Rule>
<Filter>[type] = 'poi'</Filter>
<MarkersSymbolizer />
</Rule>
</Style>
<Style name="shield">
<Rule>
<Filter>[type] = 'motorway'</Filter>
<ShieldSymbolizer minimum-distance="60" spacing="120" placement="line" face-name="DejaVu Sans Book" size="10" fill="white" file="../../data/svg/rect.svg" transform="scale(0.75)">[ref]</ShieldSymbolizer>
</Rule>
</Style>
<Style name="text">
<Rule>
<Filter>[type] != 'poi'</Filter>
<TextSymbolizer minimum-distance="50" spacing="70" placement="line" face-name="DejaVu Sans Book" size="12">[name]</TextSymbolizer>
</Rule>
</Style>
<Layer name="layer" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">
<StyleName>line</StyleName>
<StyleName>marker</StyleName>
<StyleName>shield</StyleName>
<StyleName>text</StyleName>
<Datasource>
<Parameter name="type">csv</Parameter>
<Parameter name="file">../data/repeat-labels.csv</Parameter>
</Datasource>
</Layer>
</Map>

View file

@ -159,6 +159,8 @@ files = {
'rtl-point': {'sizes': [(200, 200)],'bbox':default_text_box},
'jalign-auto': {'sizes': [(200, 200)],'bbox':default_text_box},
'line-offset': {'sizes':[(900, 250)],'bbox': mapnik.Box2d(-5.192, 50.189, -5.174, 50.195)},
'repeat-labels-1': {'sizes': [(750,250)],'bbox':mapnik.Box2d(-12, -4, 12, 4)},
'repeat-labels-2': {'sizes': [(750,250)],'bbox':mapnik.Box2d(-12, -4, 12, 4)},
'text-bug1532': {'sizes': [(600, 165)]},
'text-bug1533': {'sizes': [(600, 600)]},
'text-bug1820-1': {'sizes': [(600, 300)], 'bbox': default_text_box},