[mapserver-dev] RFC81: offset labels with leader lines

Stephen Woodbridge woodbri at swoodbridge.com
Mon Dec 19 09:25:11 EST 2011


Thomas,

The r at the front of the right labels were just for r=right, I got lazy 
trying to make up labels :)

I don't have a specific need for multiple leader lines at the moment but 
you project background was very helpful.

Thanks,
   -Steve

On 12/19/2011 5:01 AM, thomas bonfort wrote:
> Steve,
>
> First off, a bit of context on why this RFC and RFC77 have been
> implemented: meteo/forecast symbols are standardised complex symbols,
> an example of which can be seen here:
> http://astrosurf.com/luxorion/Documents/synop-obs-legende.gif
>
> Such a symbol would be defined by multiple label blocks inside a
> class, each having a fixed offset from the center of the symbol. As
> such, to answer your first question, the leader code will offset the
> classObj labels as a whole, i.e. an individual label's offset will be
> kept relatively to the newly computed leader-offsetted position. A
> side effect of this is that there will be a single leader line
> whatever the number of labels that are defined in the classObj.
>
>
> more inline...
>
>
> On Sun, Dec 18, 2011 at 18:14, Stephen Woodbridge
> <woodbri at swoodbridge.com>  wrote:
>> On 12/18/2011 11:40 AM, Stephen Woodbridge wrote:
>>>
>>> On 12/16/2011 11:41 AM, thomas bonfort wrote:
>>>>
>>>> devs,
>>>>
>>>> please have a look and comment on
>>>> http://mapserver.org/trunk/development/rfc/ms-rfc-81.html
>>>
>>>
>>> Thomas,
>>>
>>> This looks like an awesome addition to mapserver. I like that this
>>> automatically searches for a location.
>>>
>>> How does this interact with OFFSET X Y, and would it be possible
>>> (optionally?) to draw a leader between the object point and the offset x
>>> y label point using this same tools set?
>>
>>
>> As a follow on to this, and this might work for Mike Smith also.
>>
>> If there was an option like LEADERONOFFSET that used you label and leader
>> line detection, then it would be possible to have multiple labels on an
>> object (ref: RCF 77) with leader lines and to explicitly place them to the
>> right or left using OFFSET X Y to manual position the labels relative to the
>> object label point.
>>
>>                     A
>>                     |
>>                     |
>>         label1\    /  /r label1
>>   longer label2----o----r label2
>>   other label3/  /    \r label3
>>                  |
>>                  /
>>                 B
>
>
> I don't understand what the "r" means in front of the right labels....
>>
>> Where A-B is a line for example. And this would require 6 label blocks each
>> with an appropriate OFFSET X Y value to position and ALIGN to align the
>> text.
>>
>> Or in the more simple case of labeling the state of Maryland and New Jersey,
>> having OFFSET X Y to position the names out in the Atlantic Ocean. This
>> might be a case where you would want east coast names only offset to the
>> right and west coast names offset to the left as a separate use case to
>> Mike's dual scenario labeling.
>
> Limiting the leader offsets to specific directions might be a
> subsequent evolution to this RFC. Along with another evolution to
> RFC77 that would allow to decouple the classObj's multiple labels
> (i.e. check the labelcache and render each label individually instead
> of as a whole) I imagine that it will be possible to attain the result
> you are looking for. In that case you would have:
>   - each individual label can be leader-offseted on its own (possibly
> limiting the leader-offseted to (a) specific direction(s).
>   - each leader-offseted label would have its own leader line
>   - To be determined: should an individual label's OFFSET be taken into
> account once the leader offset has been applied.
>
> All in all, your and Mike's proposal are reasonable and feasible with
> the changes of RFC 77 and 81, but require subsequent work and funding.
>
> best regards,
>
> thomas
>
>
>
>
>>
>>
>> -Steve W
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list