Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Working Mapserver map file
- MAP
- ################
- # Map attributes
- ################
- IMAGETYPE PNG
- # Extent options
- # epsg:26915
- SIZE 700 700
- IMAGECOLOR 255 255 254
- TRANSPARENT ON
- FONTSET "/home/matt/votevis/mapserver-files/fonts/fonts.list"
- EXTENT -10879406.34 5308456.81 -9951631.67 6344157.39
- PROJECTION
- "init=epsg:900913"
- END
- ################
- # Symbol Defs
- ################
- SYMBOL
- NAME "circle"
- FILLED true
- TYPE ellipse
- POINTS 1 1 END
- END
- ########################################################################
- # Layers
- ########################################################################
- #...................................................................
- # VTD / Precinct Color
- #...................................................................
- LAYER
- NAME "vtd_color"
- DATA "/var/www/votevis/MN/2012-election/stsen/vtd2012general"
- STATUS default
- TYPE polygon
- PROJECTION
- "init=epsg:26915"
- END
- CLASS
- # Precinct is unreported
- # V_O_N := Votes for Office (N, or Count)
- NAME "Unreported"
- EXPRESSION ( [V_O_N] = 0 )
- COLOR 0 255 0
- END
- CLASS
- # Expression: is tied if margin of win is 0, but total votes for office is > 0
- # V_M_N := Votes, Margin of Win (N, or count)
- NAME "Tied"
- EXPRESSION ( ( [V_M_N] = 0 ) && ([V_O_N] > 0) )
- COLOR 255 255 0
- END
- CLASS
- # Expression : Winning party is DFL and margin of win is greater than 20%
- # V_M_P := Votes, Margin of Win (Percent of winner - percent of 2nd place finisher)
- # PARTY := Winning party
- NAME "DFL > 20% Win"
- EXPRESSION ( ("[PARTY]" = "DFL") && ([V_M_P] >= 20) )
- COLOR 0 34 102
- END
- CLASS
- # Expression : Winning party is DFL and margin of win is greater than 10%
- NAME "DFL > 10% Win"
- EXPRESSION ( ("[PARTY]" = "DFL") && ([V_M_P] >= 10) )
- COLOR 65 105 225
- END
- CLASS
- # Expression : Winning party is DFL and margin of win is less than 10%
- NAME "DFL Win"
- EXPRESSION ("[PARTY]" = "DFL")
- COLOR 135 206 235
- END
- CLASS
- # Expression : Winning party is R and margin of win is greater than 20%
- NAME "R > 20% Win"
- EXPRESSION ( ("[PARTY]" = "R") && ([V_M_P] >= 20) )
- COLOR 139 0 0
- END
- CLASS
- # Expression : Winning party is R and margin of win is greater than 10%
- NAME "R > 10% Win"
- EXPRESSION ( ("[PARTY]" = "R") && ([V_M_P] >= 10) )
- COLOR 255 0 0
- END
- CLASS
- # Expression : Winning party is R and margin of win is less than 10%
- NAME "R Win"
- EXPRESSION ("[PARTY]" = "R")
- COLOR 255 192 203
- END
- END # layer prct_color
- #...................................................................
- # VTD / Precinct Border
- #...................................................................
- LAYER
- NAME "prct_border"
- DATA "/var/www/votevis/MN/2012-election/stsen/vtd2012general"
- STATUS default
- TYPE line
- PROJECTION
- "init=epsg:26915"
- END
- CLASS
- NAME "prct_border_1"
- MAXSCALEDENOM 700000
- MINSCALEDENOM 200001
- STYLE
- COLOR 0 0 0
- WIDTH 2.0
- LINECAP BUTT
- #PATTERN 8 12 END
- #PATTERN 2 5 END
- END # STYLE
- END # Class
- CLASS
- NAME "prct_border_2"
- MAXSCALEDENOM 200000
- STYLE
- COLOR 0 0 0
- WIDTH 3.0
- LINECAP BUTT
- #PATTERN 8 12 END
- #PATTERN 2 5 END
- END # STYLE
- END # Class
- END # layer prct_border
- #---------------------------------------------------------------
- # Precinct Annotation
- #---------------------------------------------------------------
- LAYER
- NAME "prct_anno"
- DATA "/var/www/votevis/MN/2012-election/stsen/vtd2012general"
- STATUS default
- TYPE annotation
- MAXSCALEDENOM 200000
- LABELITEM "PCT_NM"
- PROJECTION
- "init=epsg:26915"
- END
- CLASS
- NAME "prct_anno"
- LABEL
- FONT "vera_sans"
- TYPE truetype
- SIZE 7
- COLOR 0 0 0
- POSITION cc
- MINFEATURESIZE 100
- STYLE
- GEOMTRANSFORM 'labelpoly' #bbox
- COLOR 255 255 255
- END
- BUFFER 10
- WRAP " "
- END
- END
- END # layer prct_border
- #...................................................................
- # Senate District Border
- #...................................................................
- LAYER
- NAME "sendist_border"
- DATA "/var/www/votevis/MN/2012-election/stsen/S2012"
- STATUS default
- TYPE line
- PROJECTION
- "init=epsg:26915"
- END
- CLASS
- NAME "sd_border_1"
- STYLE
- COLOR 102 102 102
- WIDTH 3.0
- END # STYLE
- STYLE
- COLOR 255 255 255
- WIDTH 1.0
- LINECAP BUTT
- PATTERN 8 12 END
- END # STYLE
- END # CLASS
- END # layer sendist_border
- #---------------------------------------------------------------
- # Senate District Annotation
- #---------------------------------------------------------------
- LAYER
- NAME "sd_anno"
- DATA "/var/www/votevis/MN/2012-election/stsen/S2012"
- STATUS default
- TYPE annotation
- # MAXSCALEDENOM 200000
- LABELITEM "DISTRICT"
- PROJECTION
- "init=epsg:26915"
- END
- CLASS
- NAME "sd_anno"
- LABEL
- FONT "vera_sans"
- TYPE truetype
- SIZE 11
- COLOR 0 0 0
- POSITION cc
- MINFEATURESIZE 100
- STYLE
- GEOMTRANSFORM 'labelpoly' #bbox
- # COLOR 255 255 255
- COLOR 255 222 173
- END
- BUFFER 10
- WRAP " "
- END
- END
- END # layer sd_anno
- END # MAP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement