[mapserver-dev] Need Better highway labeling for multiple names and labels

Alan Boudreault aboudreault at mapgears.com
Thu Feb 24 10:01:28 EST 2011


Steve, 

Yes it would be feasible to add a repeatoffset to do so. I think it would be 
relatively simple.

Alan

On February 14, 2011 11:36:32 am Lime, Steve D (DNR) wrote:
> Steve: I’m assuming on the data side you have multiple road name attributes
> for each road segment.
> 
> Thinking about this I would approach this by augmenting the REPEATDISTANCE
> operations with a new REPEATOFFSET (default is 0). That way you could add
> a second set of labels to the same set of geometries with some hope that
> labels would not collide. I would think this would work best with labels
> that are of a consistent size, like road shields.
> 
> Then from a mapfile perspective you’d draw things twice, in 6.0 it would
> look like:
> 
> LAYER
>   NAME ‘highway1’
>   TYPE LINE
>   LABELITEM ‘road_name1’
>   # classes follow using label styles to draw the shields and class styles
> to draw the linework and no repeat offset END
> 
> LAYER
>   NAME ‘highway2’
>   TYPE ANNOTATION
>   LABELITEM ‘road_name2’
>   # classes follow using class styles to draw the shields with a repeat
> offset END
> 
> So, highway1 would lay down the line work and one set of shields and
> highway2 would draw a second set of shields offset from the first.
> 
> Another idea might be to allow multiple class expression matches. It might
> be possible to do what you want using one layer definition if a feature
> could match multiple classes. So you’d have one set for road_name1, one
> for road_name2, one for road_name3. The set for road_name1 would always
> draw line work and a first set of shields, the subsequent would do only
> shields. I’ve never used CLASSGROUPs so perhaps this concept is already
> supported.
> 
> In either case you’d need REPEATOFFSET. Alan could comment on the
> feasibility of adding that.
> 
> Doing things like multiple labels or label items is too disruptive IMHO…
> 
> Steve
> 
> 
> From: mapserver-dev-bounces at lists.osgeo.org
> [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Tamas Szekeres
> Sent: Saturday, February 12, 2011 4:20 PM
> To: Stephen Woodbridge
> Cc: mapserver-dev
> Subject: Re: [mapserver-dev] Need Better highway labeling for multiple
> names and labels
> 
> Steve,
> 
> Wouldn't that be feasible to utilize the REPEATDISTANCE as per
> MS-RFC-57<http://mapserver.org/development/rfc/ms-rfc-57.html> to define
> the positions? In this case we could define some special character as a
> separator to split the labeltext into fragments that could be alternated
> in the subsequent positions.
> 
> Best regards,
> 
> Tamas
> 
> 
> 2011/2/12 Stephen Woodbridge
> <woodbri at swoodbridge.com<mailto:woodbri at swoodbridge.com>> Hi all,
> 
> I just wrote and enhancement request:
> 
> http://trac.osgeo.org/mapserver/ticket/3675
> 
> I would be interested in some feedback on this and if anyone has ways to
> work around these limitations.
> 
> Best regards,
>  -Steve W
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev

-- 
Alan Boudreault
Mapgears
http://www.mapgears.com


More information about the mapserver-dev mailing list