Opened 13 years ago

Last modified 13 years ago

#3806 closed defect

OGR STYLEITEM AUTO error in position handling — at Initial Version

Reported by: dmorissette Owned by: dmorissette
Priority: normal Milestone: 6.0 release
Component: OGR Support Version: unspecified
Severity: normal Keywords:
Cc: tamas, aboudreault

Description

While looking at ticket #3784, I noticed that the implementation of label position in mapogr.cpp (SVN trunk / 6.0.0-beta4) seems to contain an error for label positions 10, 11 and 12.

Fortunately this was added only in 5.7-dev, so there are no stable releases with this error.

Instead of

                case 10: c->label.position = MS_LR; break; /*approximate*/
                case 11: c->label.position = MS_LC; break;
                case 12: c->label.position = MS_LL; break;

we should have:

                case 10: c->label.position = MS_UR; break; /*approximate*/
                case 11: c->label.position = MS_UC; break;
                case 12: c->label.position = MS_UL; break;

(Keep in mind that OGR position codes define the position of the label anchor point relative to the label itself, and in MapServer the codes correspond to the position of the label relative to the geometry, so the meaning are reversed, i.e. LL in OGR means UR of point in MapServer)

Change History (1)

by dmorissette, 13 years ago

Attachment: style_textanchor.gif added

OGR label text anhor codes

Note: See TracTickets for help on using tickets.