Element | <Ray> | |
Description | A line radiating outward at a given bearing. Child elements of | |
Example | This example contains both line and coordinate reference system elements. • The ray is set in a reversed direction (by180°) • Direction is the value of SECTR1 attribute. • Length is based on the value of limit1 • If the lenone attribute has a value then the PortrayalCRS is applied, otherwise the GeographicCRS is used. • If the limpat attribute is set to 2 (dashed) then the line is drawn according NALST1 feature code, other wise no line is drawn. | |
DCLIGHTS.xsl | <xsl:element name="Ray"> <xsl:attribute name="reverseBearing">true</xsl:attribute> <xsl:attribute name="direction"> <xsl:value-of select="SECTR1"/> </xsl:attribute> <xsl:attribute name="length"> <xsl:value-of select="$limit1"/> </xsl:attribute> <xsl:attribute name="crs"> <xsl:text>PortrayalCRS</xsl:text> </xsl:attribute> <xsl:element name="LineStyle"> <xsl:if test="not(sector) or sector/limpat = 2"> <xsl:attribute name="styleRef">NALTSL</xsl:attribute> </xsl:if> </xsl:element> <xsl:if test="sector/lim1hi"> <xsl:call-template name="limitHighlight"> <xsl:with-param name="hilightPattern" select="sector/lim1hi"/> <xsl:with-param name="side" select="'right'"/> <xsl:with-param name="colour" select="$colourToken"/> <xsl:with-param name="length" select="$limit1"/> </xsl:call-template> </xsl:if> <Distance attribute="lenone" max="40"/> </xsl:element> | |
Instruction Set | <Ray reverseBearing="true" direction="325" length="40" crs="PortrayalCRS"> <LineStyle styleRef="NALTSL"/> <Distance attribute="lentwo" max="40"/> </Ray> | |
Attributes | ||
Name | Type | Description |
direction | Double | Status: Mandatory The direction/bearing that the Ray is pointing. Defaults to 0 of |
length | Double | Length of the Ray. Status: Mandatory if the Ray is being drawn as a line, but optional if the Ray is only being used as a reference. Length units are defined by |
reverseBearing | Boolean | Status: Optional.
This is useful for light sectors which are defined using the bearing from seaward. Default is false or 0. |