CARIS HPD : Portrayal : Masking : Masking Rules
 

Masking Rules

Masking rule files define how masking is applied. Two masking rule files are available in the installation:

maskingrules.xml for raster dynamic masking

prioritymaskingrules.xml for vector dynamic masking

Both files are located in C:\Program Files\CARIS\HPD\<version>\system\PCEConfig.

This is a sample raster dynamic masking rule.

<cmr:Rule Name="250Mask_Black_and_BathyContours_Outline">

  <cmr:Masking>

    <cmr:Style>outline</cmr:Style>

    <cmr:Width uom="mm">2.5</cmr:Width>

    <cmr:Target>

      <cmr:Token>Bathymetric_Contour</cmr:Token>

      <cmr:Token>Black</cmr:Token>

    </cmr:Target>

  </cmr:Masking>

</cmr:Rule>

For 250Mask_Black_and_BathyContours_Outline:

Masking is applied to all features within a 2.5 millimetre (at map scale) buffer of the feature (<Width/>).

The masking style that is applied is outline (<Style/>).

Masking will affect any feature segments within the masking buffer that are drawn with the “Bathymetric_Contour” and “Black” colours (<Token/>).

A sample vector dynamic masking rule is show below.

<pmr:Rule name="Soundings_ContoursandCoastline">

  <pmr:Masking>

    <pmr:Style>fill</pmr:Style>

    <pmr:Width uom="mm">0.10</pmr:Width>

    <pmr:Target>

      <pmr:Priority>200</pmr:Priority>

      <pmr:Priority>180</pmr:Priority>

      <pmr:Priority>150</pmr:Priority>

    </pmr:Target>

  </pmr:Masking>

</pmr:Rule>

For Soundings_ContoursandCoastline:

Masking is applied to all features within 0.10 millimetres (at map scale) of the feature to which the mapping rule is associated (<Width/>).

The mapping style that is applied is fill (<Style/>).

Masking will affect any feature segments within the masking buffer that have priority levels set at 100, 180, or 150 (<Priority/>).

You can create your own masking rules but these must follow the structure and syntax of existing rules.

Two important points must be remembered when creating custom masking rules:

First: Masking rule names are case-sensitive.

Second: All colour tokens must exactly match token names in the colour palette (ih_colour.xml) otherwise masking cannot be applied.

For example, “Black” is a recognized token and masking is applied; “black” is not a recognized token and masking is not applied.

This table describes the parameters in both the raster and vector masking rule files.

Raster

Vector

Attribute

Description

<cmr: Rules>

<pmr: Rules>

 

The prolog tag for all other tags in the file.

<cmr: Rule>

<pmr: Rule>

Name

The <Rule> tag is the root tag for all other tags related to the masking rule.

The Name attribute is the name of a specific masking rule. The rule name is also used in the lookup table if masking is to be activated.

<cmr: Masking>

<pmr: Masking>

 

The <Masking> tag contains instructions related to specific masking parameters (masking width, colour tokens, priority style)

<cmr: Style>

<pmr: Style>

 

The masking style that is to be applied. There are three styles:

Fill

Outline

Box

convex_hull

convex_hull_string

For more information on styles, see Masking Styles

<cmr: Width>

<pmr: Width>

uom

The area around to the feature to which masking is applied. The uom (unit of measurement) attribute is always set to millimetres at map scale.

<cmr: Target>

<pmr: Target>

 

This tag contains a list of colour tokens (names) or priorities to which masking is applied.

<pmr: Priority>

 

The priority level(s) to which masking is to be applied.

<cmr: Token>

 

The colour to which dynamic masking is to be applied. The names are taken from the various colour files that are contained in the installation.

Any custom masking rules have to be assigned to the appropriate feature in one of the lookup tables to be applied. Make sure that the you add the custom masking rule to the lookup table.