Opened 17 years ago

Closed 14 years ago

#258 closed defect (wontfix)

cut-off labels problem

Reported by: traianstanev Owned by: traianstanev
Priority: medium Milestone:
Component: Rendering Service Version:
Severity: minor Keywords:
Cc: External ID:

Description

Here is a description by Martin Miller who submitted the patch:

For polygons that span at least 3 tiles in either the horizontal or vertical direction, the code attempts to cover them with labels by placing them in regular intervals, one label each1.5 tiles in both the X and Y directions.

An offset is applied in the X direction to every second row of labels (I guess to enhance the appearance of the spacing). However, before placing the labels a check is made to "reject labels that are far outside the current tile and also make sure the point is inside the polygon". When a label falls on a tile border, that label position may be an odd number in the sequence of tested labels for one tile, but an even number in the sequence of tested labels for the neighboring tile, resulting in the offset being applied only to one of them and thus one part of the label being shifted by the offset from the other part. When a number of tiles are displayed together (as is usually the case), it looks like the labels that fall on the (invisible) tile boundary are cut off.

I have applied and tested a simple fix - disabling the offset of every second row of labels.

Comment out line 264:

offset = !offset;

in LabelRendererLocal::ProcessLabelGroup() in file Common\Stylization\LabelRendererLocal.cpp

Note that this is just a simple fix to disable the alternating X-offset. If we do need the 'enhanced spacing' - which applies the offset to every other row of labels, the code will need to be enhanced to ensure that the offset is the same for each part of an actual placement of the label.

Change History (2)

comment:1 by jbirch, 16 years ago

Traian, is this still an issue, or can this ticket be closed?

comment:2 by jbirch, 14 years ago

Resolution: wontfix
Status: newclosed

Closing old unversioned ticket. Please re-open if still required.

Note: See TracTickets for help on using tickets.