CARIS HPD : Portrayal : Masking : Vector Dynamic Masking
 

Vector Dynamic Masking

Vector dynamic masking combines feature priority levels with masking rules to automatically apply masking. No user intervention is required after a chart is opened.

Vector dynamic masking is applied through an interrelated set of files:

Portrayal control file

Lookup tables

Masking rule files.

The relationship between these files and masking is demonstrated below.

Portrayal Control

The portrayal that supports vector dynamic masking is Sample INT1 Dynamic Cartography. This portrayal contains the <VectorMaskingRulesFile/> tag that points to the priority rules file. See example below: the <VectorMaskingRulesFile/> tag points to the prioritymaskingrules.xml file in PCEConfig.

<PresentationOptions Type="Paper" Name="Sample INT1 Dynamic Cartography" Description="Sample INT1_Dynamic_Cartography">

  <LookupTables>

    <AreaLookup File="%PCEConfig%\lookup_VDM\asymrefs_VDM.dic" />

    <LineLookup File="%PCEConfig%\lookup_VDM\lsymrefs_VDM.dic" />

    <PointLookup File="%PCEConfig%\lookup_VDM\psymrefs_VDM.dic" />

    <TextLookup File="%PCEConfig%\lookup_VDM\tsymrefs_VDM.dic" />

  </LookupTables>

  <MasterFile File="%uslXmaster%" />

  <SymbolFile File="%uslXsymbol_5%" />

  <ColourFile File="%PCEConfig%\ih_colour.xml" />

  <FeatureCodeColourMapFile File="%PCEConfig%\fcmap.txt" />

  <!--<SymbolOrientation>NorthUp</SymbolOrientation>-->

  <Annotations>

    <AnnotationControlFile File="%PCEConfig%\..\annotationcontrol.xml" />

    <AnnotationRules Id="Annotations" />

  </Annotations>

  <PatternFile File="%PCEConfig%\Annotations\pattern_definitions.xml" />

  <ConditionalProcedureAnnotationFiles Directory="%PCEConfig%\ConditionalAnnotations"/>

  <XSLTRules Profile="%PCEConfig%\xslconfig\dynamicfeatures.xml"    Rulefile="%PCEConfig%\xslconfig\dynamicmain.xsl"/>

  <CartoEditTemplate File="%PCEConfig%\xslconfig\edittemplates.xml"/>

  <VectorMaskingRulesFile File="%PCEConfig%\prioritymaskingrules.xml" />

</PresentationOptions>

Vector masking rules

The masking rules file contains rules that define masking parameters. Below is the Soundings_ContoursandCoastline rule from prioritymaskingrules.xml.

<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>

In this rule, any feature that has a priority level of 200, 180 or 150 and is within 0.10 millimetres of the feature to which this rule is associated is masked.

Lookup tables

Features are associated with rules through lookup tables.

This example is from psymrefs_VDM.dic for point and sounding features.

"SOUNDG","","CS(SOUNDG02,,SGSL1)","205","O","OTHER","33010","Soundings_ContoursandCoastline"

The SOUNDG entry includes the Soundings_ContoursandCoastline rule. This rule is applied to features that overlap the SOUNDG feature.

Priority levels

Priority levels determine what features are masked. These levels are also read from the lookup tables. For example, the DEPCNT feature has a default priority level of 150 in lsymrefs_VDM.dic.

"DEPCNT","VALDCO0","LC(CLLW)","150","S","DISPLAYBASE","0"

In the Soundings_ContoursandCoastline masking rule, masking is applied to features with a priority level of 150. This means that any segment of DEPCNT feature that overlaps a SOUNDG feature is masked according to the value in the <Width> tags.

Masking preview

You can preview the masking by selecting Tools > Options > Display > General > Draw Vector Dynamic Masks. When this option is set to true, the masking is applied with 75% transparency so that the underlying features are still visible. If multiple masks are drawn on the same location, the preview masking becomes darker because the multiple masks are overlaid. The default is false.

The preview mask uses the Masked Data colour selected in the Options window.