CARIS HPD : Portrayal : Drawing Instructions : Graphic Elements : Annulus
 

Annulus

Element

<Annulus>

Description

A ring-shaped region bounded by two concentric circles. Optionally, it can be enclosed by two radii of the circle. The result is a polygon based on inner and outer arcs and an optional sector limit.

Annulus is normally used to dynamically draw a light sector band with colour fill. Child elements with fill instructions define the fill.� Child elements of LineStyle will be used to draw the boundary of the polygon.

Example

Annulus uses a fill

A reverse bearing is applied

Inner radius value is 20 and the outer radius is 23

The annulus start and end points are determined from the SECTR1 and SECTR2 attribute values.

Fill is set to 25% transparency and colour is determined by the colourToken value.

DCLIGHTS.xsl

<xsl:if test="sector/bandor">

  <xsl:element name="Annulus">

    <xsl:attribute name="reverseBearing">true</xsl:attribute>

    <xsl:if test="sector/bandir">

      <xsl:attribute name="innerRadius">

        <xsl:value-of select="sector/bandir"/>

      </xsl:attribute>

    </xsl:if>

    <xsl:attribute name="outerRadius">

      <xsl:value-of select="sector/bandor"/>

    </xsl:attribute>

    <xsl:attribute name="sectorStart">

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

    </xsl:attribute>

    <xsl:attribute name="sectorEnd">

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

    </xsl:attribute>

    <xsl:element name="Fill">

      <xsl:attribute name="transparency">0.75</xsl:attribute>

      <xsl:attribute name="colour">

        <xsl:value-of select="$colourToken"/>

    </xsl:attribute>

  </xsl:element>

  <LineStyle styleRef="SOLIDLINE" />

  <Distance parameter="innerRadius" attribute="bandir" max="38"/>

  <Distance parameter="outerRadius" attribute="bandor" max="40"/>

  </xsl:element>

</xsl:if>

Instruction Set

<Annulus reverseBearing="true" innerRadius="30" outerRadius="33" sectorStart="225" sectorEnd="325">

  <Fill transparency="0.75" colour="Lights_Sectors_Red"/>

  <LineStyle styleRef="SOLIDLINE"/>

  <Distance parameter="innerRadius" attribute="bandir" max="38"/>

  <Distance parameter="outerRadius" attribute="bandor" max="40"/>

</Annulus>

Attributes

Name

Type

Description

innerRadius

Double

Status: Optional.

If this not defined the area radiates from the centre point out to the outerRadius. Units are defined by crs.

outerRadius

Double

Status: Mandatory

The radius in mm or the outer edge of the annulus band. Units defined by crs.

sectorStart

Double

Status: Optional.

The degree bearing of the start of a sector. Based on crs. Default is 0.

sectorEnd

Double

Status: Optional.

Degree bearing for end of arc. Based on crs. Default is 0.

reverseBearing

Boolean

Status: Optional.

True means to reverse the sector bearings by 180 degrees but use Sodano calculation based on length.

This parameter is useful for light sectors which are defined using the bearing from seaward. Default is 0.