[mapserver-dev] Label positioning around points

Havard Tveite havard.tveite at umb.no
Fri Sep 21 07:26:25 PDT 2012


I have seen the discussion, and the activity on github.
However, it seems as if the "decision" that was made then
was not based on cartographical best practice, as
documented in the cartography literature.
That is why I wanted to continue the discussion.

In my opinion, the label positioning method used in
Mapserver should as much as possible be scientifically
based.  I would like to see documentation that supports
the proposed (master) method and the current (6.0) method.

Håvard

On 9/21/2012 4:02 PM, Stephen Woodbridge wrote:
> The was discussed a lot a few months ago.
>
> https://github.com/mapserver/mapserver/issues/4242
> https://github.com/mapserver/mapserver/issues/4249
> http://lists.osgeo.org/pipermail/mapserver-dev/2012-February/012003.html
>
> -Steve W
>
> On 9/21/2012 5:55 AM, Havard Tveite wrote:
>> On 7/18/2012 5:45 PM, Christy Nieman wrote:
>> > Hi all,
>> >
>> > I was just wondering if the position order around points is still
>> open for comment.
>> >
>> > I know that there was discussion about this in the spring, and that a
>> change was implemented (though, I have to admit that I just noticed the
>> difference when comparing a tile cache that I created before the change
>> to one created a couple weeks ago). I'm not sure if having UC and LC as
>> the first two positions considered preferable to how the positioning
>> worked before. In a cluttered map, I find it non-intuitive to associate
>> a point with a label that is centred above/below it. I would personally
>> expect something like UR, UL, LR, LL, CR, CL, UC, LC. Map labelling
>> convention for points based on what I remember from my schooling and my
>> experiences since then seem to prefer UR and LR as the first locations
>> to consider.
>> >
>> > If it is not desirable to implement another change to the AUTO label
>> position order, perhaps it is necessary to consider the suggestion from
>> the spring to have the option of specifying a custom "AUTO" label
>> placement order (no idea how difficult this would be to implement).
>> >
>> > I just wanted to throw this out there.
>> >
>> > Regards,
>> > Christy
>>
>> I suggest that we do something about this, and I hope that it
>> can be done before 6.2 is released.
>>
>> I have found out that the AUTO label positioning is done in
>> mapdraw.c.
>> For points the AUTO behaviour has changed from 6.0 to master.
>> If the behaviour is to be changed, it should be done in
>> accordance with cartographical literature and best practice.
>>
>> In "Thematic Cartography and Geographic Visualization", 2nd
>> edition (Slocum, et. al., 2005), the following sequence is
>> listed for point labeling (referring to Pinhas Yoeli, 1972,
>> but modified to give preference to R placement - same as
>> for legends):
>> UR,LR,UL,LL,UC,LC,CR,CL.
>> CR and CL are placed last, because those positions can result
>> in "unfavourable optical coincidence" (Imhof 1975) - the point
>> symbol could be misinterpreted as a type character in the label.
>>
>> In "Elements of Cartography" (Robinson, et.al.), the following
>> sequence is listed for point labelling:
>> UR,UL,LR,LL,UC,LC (CR and CL are not included, but some more
>> variants of upper placement are listed as 7-9).
>>
>> The way I see it, it would be useful to change the behaviour
>> of Mapserver auto labelling.
>> 1) UR must be given the highest priority.
>> 2) LL, UC, LC, CR and CL should be given lowest priority.
>> 3) Someone must decide the sequence for LR and UL.
>>
>> These are then the two possible sequences:
>> UR,LR,UL,LL,UC,LC,CR,CL
>> UR,UL,LR,LL,UC,LC,CR,CL
>>
>> I see two options for 6.2:
>> a) modify mapdraw.c to revert to 6.0 behaviour.
>> b) modify mapdraw.c by changing the sequence to one that
>> is according to cartographical practice and literature.
>>
>> Håvard
>>
>> Mapserver label placement auto:
>> 6.0 (and 5.6):
>> Polygon:
>> positions[0]=MS_CC;
>> positions[1]=MS_UC;
>> positions[2]=MS_LC;
>> positions[3]=MS_CL;
>> positions[4]=MS_CR;
>>
>> Line:
>> positions[0]=MS_UC;
>> positions[1]=MS_LC;
>> positions[2]=MS_CC;
>>
>> Point:
>> positions[0]=MS_UL;
>> positions[1]=MS_LR;
>> positions[2]=MS_UR;
>> positions[3]=MS_LL;
>> positions[4]=MS_CR;
>> positions[5]=MS_CL;
>> positions[6]=MS_UC;
>> positions[7]=MS_LC;
>>
>> master:
>> Polygon:
>> positions[0]=MS_CC;
>> positions[1]=MS_UC;
>> positions[2]=MS_LC;
>> positions[3]=MS_CL;
>> positions[4]=MS_CR;
>> Line:
>> positions[0]=MS_UC;
>> positions[1]=MS_LC;
>> positions[2]=MS_CC;
>> Point:
>> positions[0]=MS_UC;
>> positions[1]=MS_LC;
>> positions[2]=MS_CR;
>> positions[3]=MS_CL;
>> positions[4]=MS_UR;
>> positions[5]=MS_UL;
>> positions[6]=MS_LR;
>> positions[7]=MS_LL;
>>
>>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, 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