CARIS HIPS and SIPS Help : Support Files Guide : Filters : Filter Examples
 

Filter Examples

The following examples show how comparison and logical operators are used in the mapping file.

Example 1

The object is depth area.

<Filter>

  <ObjectAcronymIsEqualTo Acronym="DEPARE"/>

</Filter>

Example 2

The object is not a depth area.

<Filter>

  <ObjectAcronymIsNotEqualTo Acronym="DEPARE"/>

</Filter>

or

<Filter>

  <Not>

    < ObjectAcronymIsEqualTo Acronym="DEPARE"/>

  </Not>

</Filter>

Example 3

The object is a depth area of type line.

<Filter>

  <And>

    <ObjectAcronymIsEqualTo Acronym="DEPARE"/>

    <PrimitiveIsEqualTo Primitive="Line"/>

  </And>

</Filter>

Example 4

The object is a depth area of type area or point.

<Filter>

  <And>

    <ObjectAcronymIsEqualTo Acronym="DEPARE"/>

    <Or>

      <PrimitiveIsEqualTo Primitive="Area"/>

      <PrimitiveIsEqualTo Primitive="Point"/>

    </Or>

  </And>

</Filter>

Example 5

The category of light attribute list for a light object cannot contain 6, 8, or 9.

<Filter>

  <And>

    <ObjectAcronymIsEqualTo Acronym="LIGHTS" />

    <Not>

      <AttributeValueContains Acronym="CATLIT" Value="6" />

    </Not>

    <Not>

      <AttributeValueContains Acronym="CATLIT" Value="8" />

    </Not>

    <Not>

      <AttributeValueContains Acronym="CATLIT" Value="9" />

    </Not>

  </And>

</Filter>

Example 6

The enumerated list for the vertical datum attribute contains a value of 30 (highest astronomical tide) and the Information attribute does not contain the string value, "highest astronomical tide (HAT)".

<Filter>

  <And>

    <AttributeValueContains Acronym="VERDAT" Value="30" />

    <Not>

      <AttributeValueContains Acronym="INFORM" Value="highest astronomical tide (HAT)" />

    </Not>

  </And>

</Filter>

Example 7

The text description attribute does not have .TXT appended.

The string "[A-Z0-9]{2}" represents two characters, in any order, one a letter from A-Z and the second a number from 0-9.

The string "[A-Z0-9_]{6}" represents 6 characters, in any order, and can include letters, numbers and the underscore.

MatchCase="True" means the text identifier must be .TXT.

<Filter>

  <And>

    <AttributeHasValue Acronym="TXTDSC"/>

    <Not>

      <AttributeValueIsLike Acronym="TXTDSC"

Value="[A-Z0-9]{2}[A-Z0-9_]{6}\.TXT" MatchCase="True"/>

    </Not>

  </And>

</Filter>