[mapserver-users] PHP, OGR, Labeling Features

Hankley, Chip Chip.Hankley at GASAI.Com
Thu Apr 18 13:56:03 PDT 2002


I want to render labels out of a DGN file, using OGR.

I can get the labels to show up if I simply define an annotation layer,
however, they are not rotated or scaled at all (they are in the original
DGN).

I get lost in the documentation if I try to use any of the following:

  LABELITEM "string"
  LABELSIZEITEM "size"
  LABELANGLEITEM "angle"

The HOW-TO (http://mapserver.gis.umn.edu/doc/ogr-howto.html#d41e528) says
the following:

  The text string is mapped to CLASS.TEXT
  Text color is mapped to CLASS.LABEL.COLOR
  Text background color is mapped to CLASS.LABEL.BACKGROUNDCOLOR
  Text height is mapped to CLASS.LABEL.SIZE
  Text angle is mapped to CLASS.LABEL.ANGLE

What does this translate to in a map file? Here's a snippet of OGRINFO for
one of the features I want to label:

OGRFeature(elements):28877
  DGNId (Integer) = 28877
  Type (Integer) = 17
  Level (Integer) = 5
  GraphicGroup (Integer) = 0
  ColorIndex (Integer) = 3
  Weight (Integer) = 2
  Style (Integer) = 0
  _gv_color (String) = 1.000000 0.000000 0.000000 1.0
  _gv_ogrfs (String) = LABEL(t:"AP141")
  POINT (-1045674.733 -93744.598)

TIA

Chip Hankley




More information about the MapServer-users mailing list