CARIS Bathy DataBASE Server : Support Files : Mapping : Mapping DGN Objects : Object Mapping
 

Object Mapping

The object mapping parameters are contained between the <ObjectMappings> tags. Each DGN level in this section is mapped to a feature. There must be at least one object mapping in this section.

The structure and syntax of the object mapping section is similar to other mapping files. To find out more about how object mapping works, see Object Mapping.

This is an example of object mapping.

<Object DGNLevel="2" Description="Underwater rock (cell 4004)">

  <Filter>

    <And>

      <PrimitiveIsEqualTo Primitive="Symbol"/>

      <DGNCellNameIsEqualTo Value="4004"/>

    </And>

  </Filter>

  <MapObject>

    <MapObjectAcronym Acronym="UWTROC"/>

    <SetAttributeValue Acronym="WATLEV" Value="3"/>

    <SetAttributeValue Acronym="NATSUR" Value="9"/>

    <SetAttributeValue Acronym="QUASOU" Value="2"/>

  </MapObject>

</Object>

In the above example, the <Object> tag contains the information required to map a DGN to feature to an S-57 feature. The tag must contain a set of mapping rules within the <MapObject> tags, but the filtering rules are optional. The Description attribute contains a brief description of what feature is being mapped. This attribute is also optional.

The following table describes the filters for mapping DGN files. Any of these filters can be applied within the <Filter> tags.

Filter

Attribute

Attribute Value

PrimitiveIsEqualTo

PrimitiveIsNotEqualTo

Primitive

Point
Line
Area
Symbol
Text

DGNLineWeightIsEqualTo

DGNLineWeightIsNotEqualTo

Value

Integer value between 0-31.

DGNLineStyleIsEqualTo

DGNLineStyleIsNotEqualTo

Value

Integer value between 0-7. The values represent the following lines styles:

0 - solid
1 - dotted
2 - medium dashed
3 - long dashed
4 - dot dashed
5 -short dashed
6 - dash double-dot
7 - long dash, short-dash

DGNColourNumberIsEqualTo

DGNColourNumberIsNotEqualTo

Value

Integer value between 0-255.

DGNCellNameIsEqualTo

DGNCellNameIsNotEqualTo

Value

String value that cannot be empty.

ZValueIsEqualTo

Value

Any valid double value

ZValueIsGreaterThan

Value

Any valid double value

ZValueIsGreaterThanOrEqualTo

Value

Any valid double value

ZValueIsLessThan

Value

Any valid double value

ZValueIsLessThanOrEqualTo

Value

Any valid double value

The following table describes the object mapping functions. These must be placed between the <MapObject> tags.

Mapping Function

Attribute

Attribute Value

MapObjectAcronym

Acronym

A string value for the S-57 object acronym. The string value cannot be empty.

SetAttributeValue

Acronym

A string value containing the attribute to be assigned. The string value cannot be empty.

Value

A string value containing the value to be assigned to the attribute. The string cannot be empty.

Append

True if values will be appended to the attribute (if attribute already has a value). False if value will be assigned to the attribute. False will be assumed if not explicitly set to True.

Separator

String to delimit values. This attribute is only valid if Append is set to True.

SetAttributeValueUndefined

Acronym

A string value containing the attribute to be set to undefined.

SetAttributeValueUnknown

Acronym

A string value containing the attribute to be set to unknown.

AssignZValueToAttribute

Acronym

A string value containing the attribute acronym to be set to unknown. The string value cannot be empty.

Negate

True if the Z value is to be negated. False if the value is not to be negated. Default is false.

PositiveValuesOnly

True sets the Z value to be assigned only if the value is positive. False sets the Z value to be assigned whether or not the value is positive or negative.

AssignCurrentDateToAttribute

Acronym

A string value containing the attribute acronym that contains the current data. The date must be in CCYYMMDD format.

AssignDataSetNameToAttribute

Acronym

A string value containing the attribute acronym to which the dataset name is assigned.

AssignSourceTypeToAttribute

Acronym

A string value containing the attribute acronym to which the source type will be assigned.

CreateAreaFromClosedShape

N/A

N/A

CreateLinesFromClosedShape

N/A

N/A

AssignDGNLabelToAttribute

Acronym

Attribute acronym to which the DGN label will be assigned.

AssignDGNCellNameToAttribute

Acronym

Attribute acronym to which the DGN cell name will be assigned.