[mapserver-dev] Collaborators wanted for RFC-45

Paul Spencer pspencer at dmsolutions.ca
Thu Sep 18 07:44:33 EDT 2008


Steve, I'm not sure this is directly related to what you are asking,  
but I thought I would bring it up in the context of improved  
labeling.  I really like the PROCESSING=LABEL_NO_CLIP feature but I  
have come across a couple of limitations that cause labels to get cut  
off in adjacent tiles.  I'm not sure if it is fixable but if it is, it  
would be really nice to get it in to 5.4.  I have two specific cases  
which cause problems right now.

1) if you have a polygon feature near the edge of a tile and it gets  
labelled such that the label is outside the polygon (this happens for  
smaller polygons with longer labels), and the polygon does not extend  
into the adjacent tile, the rest of the label doesn't get drawn.

2) You have a polygon feature that crosses a tile boundary and another  
polygon feature wholly in the adjacent tile. The first feature's label  
is drawn in the first tile but in the second tile the label of the  
second feature takes priority and the rest of the first feature's  
label isn't drawn, even though it's polygon extends into the second  
tile.

I'm not sure if there is an intelligent way to fix this.  The only  
thing I can think of is to expand the extent for which features are  
collected to be considered for labeling, which would have at least a  
small performance impact and possibly a large one.  Perhaps this could  
be done as some kind of buffer?  The size of the buffer doesn't need  
to be large in the vertical axis, more-or-less the spatial equivalent  
of the height of a label (about 12 pixels perhaps) although even less  
would probably yield excellent results.  Horizontally, its a bit more  
challenging because it depends on the size of the longest label I  
think, but that should be something that can be tweaked for any given  
map.

Do you think that it would be possible to specify a per-layer  
horizontal and vertical buffer in pixels for expanding the extent when  
collecting shapes for labeling?

Cheers

Paul

On 17-Sep-08, at 10:39 PM, Steve Lime wrote:

> Hi all: Version 5.4 will likely see a rash of cartographic  
> improvements (symbols, labels, etc...) and I've stared an RFC to  
> capture them as a whole (instead of 10 little ones). I invite anyone  
> with an interest in this stuff to please take a peek and join in the  
> the development of this one. The first tangible outcomes will likely  
> be doubles for styleObj SIZE/WIDTH and the label placement  
> improvements.
>
>  See http://mapserver.gis.umn.edu/development/rfc/ms-rfc-45, just  
> above Hobu's anti-Plone rant. ;-)
>
> Steve
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://www.dmsolutions.ca/



More information about the mapserver-dev mailing list