CARIS HPD : Portrayal : Drawing Instructions : Graphic Elements : Point Text
 

Point Text

Element

<PointText>

Description

Text position around a single reference point. This element applies to the geometry of the associated feature or dynamic graphic element (e.g. ray, arc). The position of the text extent is defined using offsets and placement information. Sub elements allow text to include multiple styles and strings.

Example

Add point text to a RECTRC line. The default position of the text is the middle of the line. The text is read from the OBJNAM attribute. The following style attributes are applied:

Font: Arial

Colour: Black

Size: Value of txtsiz attribute in namloc (10 points)

DCRECTRC.xsl

<PointText xPlacement="Middle" yPlacement="Middle" >

  <xsl:element name="Style">

    <xsl:attribute name="font">Arial</xsl:attribute>

    <xsl:attribute name="colour">Black</xsl:attribute>

    <xsl:attribute name="size">

      <xsl:choose>

        <xsl:when test="txtsiz">

          <xsl:value-of select="txtsiz"/>

        </xsl:when>

        <xsl:otherwise>

          <xsl:text>7</xsl:text>

        </xsl:otherwise>

      </xsl:choose>

    </xsl:attribute>

    <String>

      <xsl:value-of select="../OBJNAM"/>

    </String>

  </xsl:element>

</PointText>

Instruction Set

<PointText xPlacement="Middle" yPlacement="Middle">

  <Style font="Arial" colour="Black" size="10">

    <String>090° - 270°</String>

  </Style>

</PointText>

Attributes

Name

Type

Description

xPlacement

Enumerated

Status: Optional.

Text placement with respect to the positive Y-axis. These options are available:

Right is the right-most side of the text frame with regards to the positive y-axis.

Left is the left-most side of the text frame with regards to the positive Y-axis.

Middle is the default value.

Text may be reversed or flipped to keep the it readable. When placed on a line, the positive Y-axis is the left side of the line. When the rotation parameter is used it rotates the positive Y-axis.

yPlacement

Enumerated

Status: Optional.

These values are available:

Bottom (default): Position text using the bottom edge of the text frame with respect to the positive Y-axis.

Middle: Position text using the middle of the text frame.

Top: Position text using the top edge of the text frame with respect to the positive Y-axis.

Baseline: Position text using the baseline of the text. For multi-line text, this is the baseline of the last line.

BaselineFirstLine: Position text using the baseline of the text. For multi-line text, this is the baseline of the first line.

The baseline is the imaginary line upon which a line of text rests.

If text orientation is along a line and keepUpright is True, western-bearing text will be reversed and the Y-offset direction flipped to keep text readable. Bottom text changes direction when placed along a line or the text is rotated.

rotation

Floating Point

Status: Optional.

Clockwise rotation bearing in degrees starting with 0 degrees being north or display up depending on the rotationCRS. The default is 0.

xOffset

Floating Point

Status: Optional.

The offset along the X-axis of the xyCRS.

Units are defined by xyCRS and xLineUnits. If these are not defined the feature point or centre is used.

yOffset

Floating Point

Status: Optional.

The offset along the Y-axis of the xyCRS. Units are mm at display scale. If not defined the feature point or centre is used.

xLineUnits

Enumerated

Status: Optional.

Three options are available:

mmdisplay means that The xOffset is mm at display scale.

mGeographic means that X is measured in metres on the ground. percent means that xOffset is a percentage. 0 = beginning, 1= end.

mmdisplay is the default.

flipYWest

Boolean

Status: Optional.

Y-offset direction flipped so as to keep the text above the line in the Western hemisphere.

Default is false.

Style

String

A container of strings which will be represented using a style definition:

font: font or typeface name

colour: colour token

size: text size in points

bold: optional boolean set to True or False (default)

italic: optional boolean set to True or False (default)

underline: optional boolean set True or False (default)

verticalDirection

Enumerated

Specify how text is displayed along lines that are parallel to the y-axis of the portrayal coordinate reference system.

PositiveY: Text starts at the bottom end of the line and extends upwards.

NegativeY: Text starts at the top end of the line and extends downwards.

Line: Text is displayed based on the line direction.

Line is the default.