Opened 16 years ago

Closed 15 years ago

#2719 closed defect (fixed)

Accessing OGR STYLEITEMAUTO Labels from mapscript

Reported by: aboudreault Owned by: jmckenna
Priority: normal Milestone: 5.4 release
Component: Documentation - MapServer Version: unspecified
Severity: normal Keywords:
Cc: dmorissette

Description

We should be able to retrieve label styles from mapscript (getShape()/getValue) when using OGR STYLEITEMAUTO. This work can be done in mapogr.cpp. For this requirement, the following processing key will be added: "GETSHAPE_STYLE_ITEMS". If the user needs to retrieve the ogr label styles, he can simply add this line in it mapfile in the desired layer section:

  • PROCESSING "GETSHAPE_STYLE_ITEMS=all"

Processing key values

  • all : Return all the styles supported by mapogr.cpp.

Label Styles supported

  • OGR:LabelText : the label text string.
  • OGR:LabelAngle : the label angle.
  • OGR:LabelSize : the label size.
  • OGR:LabelColor : the label foreground color.

Attachments (1)

bug2719.patch (3.9 KB ) - added by aboudreault 16 years ago.

Download all attachments as: .zip

Change History (5)

by aboudreault, 16 years ago

Attachment: bug2719.patch added

comment:1 by dmorissette, 16 years ago

Component: MapServer C LibraryMapServer Documentation
Owner: changed from aboudreault to jmckenna

Patch committed in r7835.

Moving to doc component to add mention of new PROCESSING "GETSHAPE_STYLE_ITEMS=all" directive in OGR HOWTO.

comment:2 by aboudreault, 15 years ago

Update: Label Styles supported

  • OGR:LabelFont
  • OGR:LabelSize
  • OGR:LabelText : label text string
  • OGR:LabelAngle
  • OGR:LabelFColor : Foreground Color
  • OGR:LabelBColor : Background Color
  • OGR:LabelPlacement
  • OGR:LabelAnchor
  • OGR:LabelDx
  • OGR:LabelDy
  • OGR:LabelPerp : Perpendicular Offset
  • OGR:LabelBold
  • OGR:LabelItalic
  • OGR:LabelUnderline
  • OGR:LabelPriority
  • OGR:LabelStrikeout
  • OGR:LabelStretch
  • OGR:LabelAdjHor
  • OGR:LabelAdjVert
  • OGR:LabelHColor : Shadow Color (gdal > 1.4.0)
  • OGR:LabelOColor : Outline Color (gdal > 1.6.0)

(See http://www.gdal.org/ogr/ogr_feature_style.html for more details)

comment:3 by jmckenna, 15 years ago

Status: newassigned

comment:4 by jmckenna, 15 years ago

Resolution: fixed
Status: assignedclosed
  • added section in OGR document
  • updated the mapfile reference's LAYER PROCESSSING section
Note: See TracTickets for help on using tickets.