5.0: change in PIXMAP SIZE?

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Tue Sep 11 11:19:11 EDT 2007


Bart,

  I have entered a bug on this 2305.  I think the default pixel size for 
Markers is 6 and I assumed that it was the same for external symbols.  I 
will update the code so that if size is omitted, the image size is used 
(I think that even just setting the size to -1 would force the rendering 
to get the image size before drawing).
BTW there was no change in this regard in the SLD code for quite some time.

Later,

Bart van den Eijnden wrote:
> Something additional, Mapserver does not comply with the SLD spec if you 
> omit the Size in the SLD. The SLD 1.0 spec says:
> 
> "The default size of an image format (such as GIF) is the inherent size 
> of the image."
> 
> but Mapserver seems to use a default of 6 pixels ...
> 
>             if (psSize && psSize->psChild && psSize->psChild->pszValue)
>               psStyle->size = atoi(psSize->psChild->pszValue);
>             else
>               psStyle->size = 6; /* defualt value */
> 
> Best regards,
> Bart
> 
> On 9/11/07, *Bart van den Eijnden* < bartvde at gmail.com 
> <mailto:bartvde at gmail.com>> wrote:
> 
>     Hi list,
> 
>     I just spent half of my day finding out why an SLD with external
>     graphics did not work anymore with 5.0, something like:
> 
>     <PointSymbolizer><Geometry><PropertyName>msGeometry</PropertyName></Geometry><Graphic><ExternalGraphic><OnlineResource
>     '.
>           'xmlns:xlink="http://www.w3.org/1999/xlink"
>     xlink:type="simple"
>     xlink:href="'.$this->externalgraphic.'"/><Format>GIF</Format>'.
>          
>     '</ExternalGraphic><Size>1.0</Size></Graphic></PointSymbolizer></Rule>
> 
>     I used a PointSymbolizer with Size 1 and this results in something like:
> 
>           STYLE
>             ANGLE 360
>             COLOR 0 0 0
>             SIZE 1
>             SYMBOL "....."
>           END
> 
>     In Mapserver 4.10 this used to draw the symbol in its native
>     size/dimension, but in 5.0 this does not work anymore, i.e. I do not
>     see anything in the map.
> 
>     If I change Size to 17 (the size in pixels of the image used), the
>     SLD works fine again.
> 
>     Was this change intentional? Anyways, I guess this should be
>     documented in the migration guide :-) ?
> 
>     Best regards,
>     Bart
> 
> 


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list