= The Symbology Exchange: Vector Symbols = Welcome to The Symbology Exchange. This section is for vector symbols. Post your cool symbols here. We hope you find something useful. Guidelines: * Please post a description of your symbols. While "railroad" is useful, it doesn't indicate how your railroad symbol differs from anyone else's. Is it just different? Does it handle antialiasing and transparency at the same time? Does it look good at a wide variety of sizes? * If you can post a link to see your symbol in action, that would be great. === Nice roads === Posted by HostGIS 2007-08-08 We use this styling for our roads. It gives them that nice thick effect, a la Google. The far-out roads are beige-yellow in color, giving way to grey-on-grey for the smaller roads. The classifications used here are oriented around conventions used in the USA's TIGER street data: the CFCC field indicates the street's type, and range from A1 (interstate highway) to A7 (small road). It should be easily adaptable to other road data, though. First, define a symbol for "solid": {{{ SYMBOL NAME "line_solid" TYPE ellipse POINTS 1 1 END FILLED true END }}} Now for the classes and styling: {{{ CLASSITEM "CFCC" CLASS EXPRESSION /^A[67]/ NAME "Other" MAXSCALE 30000 STYLE SYMBOL 'line_solid' COLOR 170 170 170 SIZE 1 END LABEL COLOR 0 0 0 OUTLINECOLOR 200 200 200 MINFEATURESIZE 10 FONT "Vera" TYPE truetype POSITION AUTO SIZE 8 END END CLASS EXPRESSION /^A[45]/ NAME "City" MAXSCALE 60000 STYLE SYMBOL 'line_solid' COLOR 180 180 180 SIZE 3 END STYLE SYMBOL 'line_solid' COLOR 255 255 255 SIZE 1 END LABEL COLOR 0 0 0 OUTLINECOLOR 200 200 200 MINFEATURESIZE 25 FONT "Vera" TYPE truetype POSITION AUTO ANGLE AUTO MINDISTANCE 200 BUFFER 10 OFFSET 0 -4 SIZE 9 END END CLASS EXPRESSION /^A[23]/ NAME "Highway" MAXSCALE 20000000 STYLE SYMBOL 'line_solid' COLOR 140 140 140 SIZE 5 END STYLE SYMBOL 'line_solid' COLOR 255 250 115 SIZE 3 END LABEL COLOR 0 0 0 OUTLINECOLOR 235 235 235 MINFEATURESIZE 10 FONT "Vera" TYPE truetype POSITION AUTO ANGLE AUTO PARTIALS FALSE OFFSET 0 -5 MINDISTANCE 250 BUFFER 15 SIZE 10 END END CLASS EXPRESSION /^A1/ NAME "Interstate" MAXSCALE 40000000 TEXT ([FENAME]) STYLE SYMBOL 'line_solid' COLOR 120 120 120 SIZE 6 END STYLE SYMBOL 'line_solid' COLOR 242 191 36 SIZE 4 END LABEL OUTLINECOLOR 235 235 235 COLOR 0 0 0 MINFEATURESIZE 10 FONT "Vera" TYPE truetype POSITION AUTO ANGLE AUTO OFFSET 0 -7 MINDISTANCE 300 BUFFER 15 PARTIALS FALSE SIZE 11 END END }}} === Dave Fawcett's symbols from the old Mapserver wiki === Posted by HostGIS at 2007-08-09 This defines a pair of symbols which, when overlaid on each other, creates a thick line with a dashed line down the middle. This is appropriate for highways, for example. {{{ SYMBOL name "circle" Type ELLIPSE Filled true POINTS 1 1 END END SYMBOL name "dashed" Type ELLIPSE FILLED true POINTS 1 1 END STYLE 5 3 END END CLASS NAME "Highway" STYLE SYMBOL circle SIZE 7 COLOR 0 0 0 END STYLE SYMBOL circle SIZE 5 COLOR 255 255 0 END STYLE SYMBOL dashed SIZE 1 COLOR 0 0 0 END END }}} === From Dave Fawcett's wiki page: railroad tracks === Posted by HostGIS at 2007-08-09 Here's a method for drawing railroad tracks. THis is the usual line with shorter lines ("ties") across it. {{{ SYMBOL NAME 'line' TYPE ellipse FILLED true POINTS 1 1 END END SYMBOL NAME 'tie' TYPE Ellipse FILLED TRUE POINTS 1 1 END STYLE 1 3 END END SYMBOL 'railroad' SIZE 1 OVERLAYSYMBOL 'tie' OVERLAYSIZE 3 END }}} === From Dave Fawcett's wiki page: Some fill patterns for polygons === Posted by HostGIS at 2007-08-09 {{{ # A hatch pattern tilted 45 degrees SYMBOL NAME "fill45" TYPE vector POINTS 0 1 1 0 END END # Horizontal & vertical hatching SYMBOL NAME "fillrect" TYPE vector POINTS 0 0 1 0 1 1 END END # Double cross hatching SYMBOL NAME "fillcross" TYPE vector POINTS 0 0 1 1 -1 -1 1 0 0 1 END END # wave hatching SYMBOL NAME "fillwave" TYPE vector POINTS 0 0 1 1 2 0 END END # Horizontal hatching SYMBOL NAME "fill0" TYPE vector POINTS 0 0 1 0 -1 -1 0 1 1 1 END END # Vertical hatching SYMBOL NAME "fill90" TYPE vector POINTS 0 0 0 1 -1 -1 1 0 1 1 END END }}} === Swamp/Marsh fill pattern and Railroad === Posted by Bill Thoen at 2007-08-10 This is a self contained sampler of two symbol types. The first is a polygon fill pattern for swamp land. The second is a railroad symbol and while not particularly special, it illustrates the method of combining multiple styles to build up a decorated line type. The example consists of two files: a MAP file and its associated HTML file. Copy them both and then simply run the MAP file with mapserv to see the symbology. {{{ sym_sampler.html ================