style size vs width?

Steve Lime steve.lime at DNR.STATE.MN.US
Fri Jan 13 10:53:49 EST 2006


I promise to deal with this shortly in 4.9/10... People are used to the +1
in the older versions. I doubt this is a GD issue.

Steve

>>> Havard Tveite <havard.tveite at umb.no> 01/13/06 4:09 AM >>>
I used the occation to recheck the implementation of size
for vector symbols.

I have tried to use the size parameter for the following
vector symbols and have checked the size of the rendered
symbols.

Vector box
(SYMBOL NAME "box" TYPE vector FILLED true
POINTS 0 0 1 0 1 1 0 1 0 0 END
END)
Rendering:
symbol size 0 gives a symbol of 2x2 pixels
symbol size 1 gives a symbol of 2x2 pixels
symbol size 2 gives a symbol of 3x3 pixels
symbol size 3 gives a symbol of 4x4 pixels

Vector circle
(SYMBOL NAME "circle" TYPE ellipse FILLED true
POINTS 1 1 END
END)
Rendering:
symbol size 0 gives a symbol of 1x1 pixels
symbol size 1 gives a symbol of 1x1 pixels
symbol size 2 gives a symbol of 2x2 pixels
symbol size 3 gives a symbol of 3x3 pixels

Vector triangle
(SYMBOL NAME "lrtriangle" TYPE vector FILLED true
POINTS 0 1 1 1 1 0 0 1 END
END)
Rendering:
symbol size 0 gives a symbol of 2x2 pixels
symbol size 1 gives a symbol of 2x2 pixels
symbol size 2 gives a symbol of 3x3 pixels
symbol size 3 gives a symbol of 4x4 pixels


The +1 pixel behaviour (that can be observed for the box and
triangle) is reported in the unresolved bug:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=305 

This behaviour is still observed on Mapserver 4.6.1 and
4.8.1 (GD2.0.28).
I don't know whether this is a GD or Mapserver bug, and I
have not tested using the latest versions of GD.

Håvard



Steve Lime wrote:
> It's a bit convoluted to be sure, but that lies more in the history of MapServer than anything else. In
> general:
> 
>   - SIZE refers to the maximum dimension of a marker, tile or brush (image, truetype or vector)
>   - WIDTH refers to the thickness of simple lines (typcially no symbol is defined)
> 
> Both are necessary (and used differently) for things like hatching symbols where SIZE controls the
> spacing of the hatching and WIDTH controls the thickness of the lines used in the hatching. Another
> example where you might use both is with vector symbols are markers where SIZE refers to the overall
> size of the marker and width the thickness of the line used to render the symbol.
> 
> Steve
> 
> 
> 
>>>>Sean Gillies <sgillies at FRII.COM> 01/11/06 5:49 PM >>>
> 
> Steve,
> 
> In which cases do they apply, and how are they to be used? Size is  
> both marker size and brush width, right? Where does width fit in?
> 
> Sean
> 

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 14, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt



More information about the mapserver-dev mailing list