Opened 18 years ago

Closed 16 years ago

Last modified 15 years ago

#1853 closed defect (fixed)

Unable to apply width to outline of filled symbols

Reported by: mgleahy@… Owned by: sdlime
Priority: high Milestone: 5.0 release
Component: MapServer C Library Version: 5.0
Severity: normal Keywords:
Cc:

Description (last modified by sdlime)

As discussed in the MapServer-Users mailing list (below), there appears to be an
issue of applying width to the outline of filled vector symbols for styles in a
mapfile.

------------------------------

Date:    Fri, 4 Aug 2006 15:51:29 -0500
From:    Steve Lime <Steve.Lime@DNR.STATE.MN.US>
Subject: Re: width property for points?

Mike: First, please file a quick bug on not saving width or antialias
and I'll fix
ASAP. Might also want to file one for applying width to the outline of
filled 
symbols.

Second, you'll probably need 2 symbols: one with FILLED TRUE and the
other
without it (e.g. tent and tent-outline). I just looked at the code and
it respects
width for non-filled VECTOR symbols. 

Steve

>>> >>> Mike Leahy <mgleahy@GOLDEN.NET> 8/4/2006 3:24:49 PM >>>
Hello List,

I've been trying to see if I can style points with an outline that is 
thicker than one pixel.  Firstly, I've found that I am not able to set

the WIDTH property of a style element using MapScript - is this a Bug?

The MapServer FAQ suggest the following for Polygons:

STYLE # solid fill
   COLOR 255 0 0
END
STYLE # thick outline (could use a circle symbol with size too)
   OUTLINECOLOR 0 0 0
   WIDTH 3
   ANTIALIAS TRUE
END

This works if I manually edit the mapfile, but since MapScript won't 
save the width property for me (or ANTIALIAS for that matter), I had to

use the following approach:

STYLE
   ANGLE 360
   COLOR 210 247 247
   SYMBOL 0
END
STYLE
   ANGLE 360
   OUTLINECOLOR 0 0 255
   SIZE 3
   SYMBOL "circle"
END

I've tried similar methods for point symbols:

STYLE
   COLOR 0 163 240
   SIZE 9
   SYMBOL "tent"
END
STYLE
   SYMBOL "tent"
   SIZE 9
   OUTLINECOLOR 0 255 0
   WIDTH 5
END

I've also tried:

STYLE
   COLOR 0 163 240
   SIZE 9
   SYMBOL "tent"
   OUTLINECOLOR 0 255 0
   WIDTH 5
END

Unfortunately, nothing I do makes the outline around the point any 
thicker than one pixel.  Has anyone else encountered this?  I know I 
could just put a smaller symbol on top of another, but that only works

if a relatively symmetrical symbol is used (like a circle or star).

Thanks in advance for any suggestions,
Mike

------------------------------

Change History (4)

comment:1 by mgleahy@…, 18 years ago

Version: unspecified4.8

comment:2 by sdlime, 18 years ago

Status: newassigned
Version: 4.85.0
Mike: Unfortunately this one's going to have to wait until 5.0. I might get it
in place this fall but it's not a trivial fix so there's not enough time before
the feature freeze for 4.10 (which is like today)...

Steve

comment:3 by sdlime, 16 years ago

Description: modified (diff)
Milestone: 5.0 release
Resolution: fixed
Status: assignedclosed

I believe this does work. I know it does for circles and probably others. Closing as fixed for now.

Steve

comment:4 by the1after909, 15 years ago

My solution for this problem is to create 2 symbols in the symbols file. One FILLED true , the other FILLED false. Then add a STYLE for each one in the MAP file.

symbol file example...

	SYMBOL
		NAME "triangle"
		TYPE vector
		FILLED true
		POINTS
			0 4
			2 0
			4 4
			0 4
		END
	END
	
	SYMBOL
		NAME "triangle-outline"
		TYPE vector
		FILLED false
		POINTS
			0 4
			2 0
			4 4
			0 4
		END
	END

map file example...

		CLASS
			STYLE
				SYMBOL "triangle"
				SIZE 20
				COLOR 0 0 255
				
			END
			
			STYLE
				SYMBOL "triangle-outline"
				OUTLINECOLOR 0 0 0
				SIZE 20
				WIDTH 3
			END
		END

Works for me :-)

Note: See TracTickets for help on using tickets.