line clipping drops points so filter osm data to ensure only lines are being used in test

This commit is contained in:
Dane Springmeyer 2013-05-20 21:44:43 -07:00
parent dee252eb88
commit 866320be14
26 changed files with 119 additions and 115 deletions

View file

@ -3,5 +3,7 @@
# SEG_END=0 SEG_MOVETO = 1 SEG_LINETO = 2 SEG_CLOSE = (0x40 | 0x0f) # SEG_END=0 SEG_MOVETO = 1 SEG_LINETO = 2 SEG_CLOSE = (0x40 | 0x0f)
50,50,150,150;0 0 1,200 200 2;50 50 1,150 150 2 50,50,150,150;0 0 1,200 200 2;50 50 1,150 150 2
50,50,150,150;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2 50,50,150,150;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2
# points are dropped by line clipper
50,50,150,150;75 75 1;
# TODO - should the close path be kept after clipping? # TODO - should the close path be kept after clipping?
# 50,50,150,150;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2,0 0 79;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2 # 50,50,150,150;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2,0 0 79;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2

View file

@ -4,7 +4,6 @@
"212", "212",
"210", "210",
"208", "208",
"132",
"206", "206",
"200", "200",
"202", "202",
@ -32,25 +31,25 @@
" !! !! !! !! !! !! ", " !! !! !! !! !! !! ",
" ! ! ! ", " ! ! ! ",
" ", " ",
" ### ", " ",
" ############################################# ", " ############################################# ",
" ## ", " ",
" # $ $ ", " $ $ $ ",
" %% $$ $$ $$ $$ $$ ", " $$ $$ $$ $$ $$ $$ ",
" %%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ",
" %% $ $$ $ $$ $ ", " $$ $ $$ $ $$ $ ",
" ", " ",
" ", " ",
" ", " ",
" && ", " %% ",
" ''' &&&&&&&&&& ( (( ", " &&& %%%%%%%%%% ' '' ",
" '' ' && (( ( ( ", " && & %% '' ' ' ",
" ' '' (((( ( ", " & && '''' ' ",
" ' ''''' (( (( ", " & &&&&& '' '' ",
" ''' ''' ( ( ( ", " &&& &&& ' ' ' ",
" ' '' )) ((( ", " & && (( ''' ",
" ' )))))))))) ", " & (((((((((( ",
" )) ", " (( ",
" ", " ",
" ", " ",
" ", " ",

View file

@ -4,7 +4,6 @@
"216", "216",
"212", "212",
"210", "210",
"132",
"208", "208",
"240", "240",
"206", "206",
@ -62,35 +61,35 @@
" ", " ",
" ", " ",
" ", " ",
" % & & & & & & ", " % % % % % % ",
" %% && && && && && && && && && && && ", " %% %% %% %% %% %% %% %% %% %% %% %% ",
" %%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ", " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
" %%% && & && & && & && & && & && ", " % %% % %% % %% % %% % %% % %% ",
" ", " ",
" ' ' ' ' ' ' ", " & & & & & & ",
" ' '' ' '' ' '' ' '' ' '' ' '' ", " & && & && & && & && & && & && ",
" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ", " &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ",
" ' '' ' '' ' '' ' '' ' '' ' '' ", " & && & && & && & && & && & && ",
" ' ' ' ' ' ' ", " & & & & & & ",
" ", " ",
" ", " ",
" ", " ",
" (( ( ( )) )))) ) ", " '' ' ' (( (((( ( ",
" *** *** ((((((((((((((((((( )))) ))) ", " ))) ))) ''''''''''''''''''' (((( ((( ",
" ***** *** (( ( )) ) ", " ))))) ))) '' ' (( ( ",
" ** ** ) ))) ", " )) )) ( ((( ",
" ** *** ) ) ", " )) ))) ( ( ",
" ) ", " ( ",
" * * ", " ) ) ",
" * * ) ) ", " ) ) ( ( ",
" * )) ", " ) (( ",
" * * ) )) ", " ) ) ( (( ",
" ** ** )))) )))) ", " )) )) (((( (((( ",
" **** **** + )))) )))) ", " )))) )))) * (((( (((( ",
" * * * ** ++ + ) ", " ) ) ) )) ** * ( ",
" * * +++++++++++++++++++ ", " ) ) ******************* ",
" ++ + ", " ** * ",
" + ", " * ",
" ", " ",
" ", " ",
" ", " ",

View file

@ -5,7 +5,6 @@
"212", "212",
"210", "210",
"208", "208",
"132",
"240", "240",
"202", "202",
"200", "200",
@ -87,47 +86,47 @@
" ", " ",
" ", " ",
" ", " ",
" % % % % % % % % ", " % % % % % % % % % ",
" && %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% ", " %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% ",
" &&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
" && % %% % %% % %% % %% % %% % %% % %% % %% % ", " %% % %% % %% % %% % %% % %% % %% % %% % %% % ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" '' ' ' '' ' ' '' ' ' '' ' ' '' ' ' '' ' ' '' ' ' '' ' ' '' ' ' ", " && & & && & & && & & && & & && & & && & & && & & && & & && & & ",
" '' ' '' ' '' ' '' ' '' ' '' ' '' ' '' ' '' ' ", " && & && & && & && & && & && & && & && & && & ",
" '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ", " && && && && && && && && && && && && && && && && && && ",
" ''' ' ' ''' ' ' ''' ' ' ''' ' ' ''' ' ' ''' ' ' ''' ' ' ''' ' ' ''' ' ' ", " &&& & & &&& & & &&& & & &&& & & &&& & & &&& & & &&& & & &&& & & &&& & & ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ( ( (( ( ", " ' ' '' ' ",
" ) ** * *** (( ((( ", " ( )) ) ))) '' ''' ",
" )) ) )) )) **************************** (((( (( ", " (( ( (( (( )))))))))))))))))))))))))))) '''' '' ",
" )))) )))) ** ** ** ((( ( ", " (((( (((( )) )) )) ''' ' ",
" ) ))) ))) * * ( ( ", " ( ((( ((( ) ) ' ' ",
" ) ) ", " ( ( ",
" ) (( ( ", " ( '' ' ",
" ))) ) (((( (( ", " ((( ( '''' '' ",
" ) ) ( ( (( ", " ( ( ' ' '' ",
" ) )))) ( (( ", " ( (((( ' '' ",
" ))) )) ( ", " ((( (( ' ",
" ) ) ( ", " ( ( ' ",
" ) ( ( ", " ( ' ' ",
" ) ((( ", " ( ''' ",
" ) ) ( (( ", " ( ( ' '' ",
" )) ) ) ( (((( ", " (( ( ( ' '''' ",
" ))))) ) ( ( ( ", " ((((( ( ' ' ' ",
" ))) ) ( ( ( (( ", " ((( ( ' ' ' '' ",
" ) ) ))) ) + + ((( ", " ( ( ((( ( * * ''' ",
" )) ) ++ ++ ++ (( ", " (( ( ** ** ** '' ",
" )))) ++++++++++++++++++++++++++++ ", " (((( **************************** ",
" ) ) ++ ++ +++ ", " ( ( ** ** *** ",
" + + ", " * * ",
" ", " ",
" ", " ",
" ", " ",

View file

@ -4,7 +4,6 @@
"216", "216",
"212", "212",
"210", "210",
"132",
"208", "208",
"240", "240",
"202", "202",
@ -112,21 +111,21 @@
" ", " ",
" ", " ",
" ", " ",
" % & & & & & & & & & & & & ", " % % % % % % % % % % % % ",
" %% && && && && && && && && && && && && && && && && && && && && && && && ", " %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% ",
" %%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ", " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
" %%% && & && & && & && & && & && & && & && & && & && & && & && ", " % %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %% ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ' ' ' ' ' ' ' ' ' ' ' ' ", " & & & & & & & & & & & & ",
" ' '' ' '' ' '' ' '' ' '' ' '' ' '' ' '' ' '' ' '' ' '' ' '' ", " & && & && & && & && & && & && & && & && & && & && & && & && ",
" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ", " &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ",
" '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' ", " && && && && && && && && && && && && && && && && && && && && && && && && ",
" ' ' ' ' ' ' ' ' ' ' ' ' ", " & & & & & & & & & & & & ",
" ", " ",
" ", " ",
" ", " ",
@ -135,36 +134,36 @@
" ", " ",
" ", " ",
" ", " ",
" ( ", " ' ",
" (((( ( (( ", " '''' ' '' ",
" ) *** * * ** * * * ((( ((((( ", " ( ))) ) ) )) ) ) ) ''' ''''' ",
" ) ) ) ) * * * * ** ( ( ((( ", " ( ( ( ( ) ) ) ) )) ' ' ''' ",
" )))) )))) ** ** ** ** ** ( ( ( ", " (((( (((( )) )) )) )) )) ' ' ' ",
" )) ))) )))) * * (( ( ", " (( ((( (((( ) ) '' ' ",
" ) )) ( ((( ", " ( (( ' ''' ",
" ))) (( ((((( ", " ((( '' ''''' ",
" ) )) ( ( ", " ( (( ' ' ",
" )) )) ( ( ", " (( (( ' ' ",
" ) )) ( ", " ( (( ' ",
" ) ( ( ", " ( ' ' ",
" ) ", " ( ",
" (( (( ", " '' '' ",
" ) ) (((( (( ", " ( ( '''' '' ",
" ) (( (((( ", " ( '' '''' ",
" )))) )) ( (( ", " (((( (( ' '' ",
" )) )))) (( ", " (( (((( '' ",
" )) ( ( ", " (( ' ' ",
" ) ( ( ", " ( ' ' ",
" ) ) ( ( ( ( ", " ( ( ' ' ' ' ",
" ) (((( (( ", " ( '''' '' ",
" ))) ) ((( ((((( ", " ((( ( ''' ''''' ",
" )) ))) (( ( ( (( ", " (( ((( '' ' ' '' ",
" ))) )))) (((((( ( ", " ((( (((( '''''' ' ",
" ) ) )) )) + + + (((( ", " ( ( (( (( * * * '''' ",
" ))) ) ++ ++ ++ ++ ++ (( ", " ((( ( ** ** ** ** ** '' ",
" )))) ++++++++++++++++++++++++++++++++++++++ ", " (((( ************************************** ",
" ) +++ ++ ++ + ++ ", " ( *** ** ** * ** ",
" + + + ", " * * * ",
" ", " ",
" ", " ",
" ", " ",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -12,6 +12,7 @@
<Style name="My Style"> <Style name="My Style">
<Rule> <Rule>
<Filter>[mapnik::geometry_type]=linestring</Filter>
<LineSymbolizer stroke-width="12" stroke="red"/> <LineSymbolizer stroke-width="12" stroke="red"/>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="line">[name]</TextSymbolizer> <TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="line">[name]</TextSymbolizer>
</Rule> </Rule>

View file

@ -12,6 +12,7 @@
<Style name="My Style"> <Style name="My Style">
<Rule> <Rule>
<Filter>[mapnik::geometry_type]=linestring</Filter>
<LineSymbolizer stroke-width="12" stroke="red"/> <LineSymbolizer stroke-width="12" stroke="red"/>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="line">[name]<Format size="8" fill="blue">[name]</Format></TextSymbolizer> <TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="line">[name]<Format size="8" fill="blue">[name]</Format></TextSymbolizer>
</Rule> </Rule>

View file

@ -12,6 +12,7 @@
<Style name="My Style"> <Style name="My Style">
<Rule> <Rule>
<Filter>[mapnik::geometry_type]=linestring</Filter>
<LineSymbolizer stroke-width="12" stroke="red"/> <LineSymbolizer stroke-width="12" stroke="red"/>
<TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="line" spacing="20">[name]</TextSymbolizer> <TextSymbolizer face-name="DejaVu Sans Book" size="16" placement="line" spacing="20">[name]</TextSymbolizer>
</Rule> </Rule>

View file

@ -12,6 +12,7 @@
<Style name="My Style"> <Style name="My Style">
<Rule> <Rule>
<Filter>[mapnik::geometry_type]=linestring</Filter>
<LineSymbolizer stroke-width="1" stroke="blue"/> <LineSymbolizer stroke-width="1" stroke="blue"/>
<ShieldSymbolizer face-name="DejaVu Sans Book" size="16" placement="line" file="../../data/svg/crosshair16x16.svg" spacing="30">'X'</ShieldSymbolizer> <ShieldSymbolizer face-name="DejaVu Sans Book" size="16" placement="line" file="../../data/svg/crosshair16x16.svg" spacing="30">'X'</ShieldSymbolizer>
</Rule> </Rule>

View file

@ -20,7 +20,9 @@ defaults = {
'sizes': [(500, 100)], 'sizes': [(500, 100)],
'scales':[1.0,2.0], 'scales':[1.0,2.0],
'agg': True, 'agg': True,
'cairo': mapnik.has_cairo(), 'cairo': True,
# disabled for 2.2.x since cairo tests are unstable (springmeyer)
#'cairo': mapnik.has_cairo(),
'grid': True 'grid': True
} }