CARIS Bathy DataBASE Server : Support Files : Mapping : Mapping Functions
 

Mapping Functions

 
Many-to-One Mapping
One-to-Many Mapping

A set of functions are used to map from one object to another. These functions may simply create part of the new object (that is, set the acronym), or use information from the object being mapped to create the mapping.

The following table lists the available mapping functions.

Function

Attributes

MapObjectAcronym

Acronym="Acronym"

Acronym is mandatory.

UpdateObject

Acronym="Acronym"

Create="True"

Acronym is mandatory

Create is used to indicate that the object should be created if it does not yet exist. Default is Create=True.

ConvertGeometry

Primitve="Feature Type"

Value="text"

Acronym="attribute"

Primitive is the geometry type to which the feature is being converted (area, line, point or text)

Value is the text string that is displayed in the chart (for conversion to text features only)

Acronym is the attribute that contains the text string for the text feature (for conversion to text features only).

Geometry mapping is supported only by the Import Selected Objects command.

SetAttributeValue

Acronym="Acronym"

Value="Value"

Append="True/False"

Separator="Separator"

Acronym is mandatory.

Value is mandatory.

Append is used to indicate if the value should be appended to an existing value. This lets attribute values be constructed from multiple sources. If not defined, append=False.

Separator is used in conjunction with Append. The separator is added between attribute values that are being concatenated. If not defined, a comma is the default for list-type attributes and a space for text-type attributes. If no separator is used, then the value is set to Separator="None".

AssignCurrentDateToAttribute

Acronym="Acronym"

AdjustDayBy="Value"

Acronym is mandatory.

AdjustDayBy is used to add or subtract days from the current date. If value = 0 or if AdjustDayBy is not used, the current date will be used.

CopyAttributeValue

FromAcronym="acronym"

ToAcronym="acronym"

Round="Round/Truncate"

Precision="number of decimal places"

Append="True/False"

Separator="Separator"

Negate=”True/False”

Add="addend"

Subtract="subtrahend"

Multiply="multiplier"

Divide="divisor"

FromAcronym is mandatory.

ToAcronym is mandatory.

Round applies to conversions to integer or floating point numbers. If it is not specified, Round is assumed.

Precision determines the number of decimal places for conversions to floating point numbers. It is used with Round to convert the values.

Negate multiplies the floating point or integer number by –1 to negate. If it is not specified then Negate=False. Negate is used when converting S-57 soundings into VPF soundings, for example.

Add, Subtract, Multiply and Divide use mathematical operators to change a numeric value to a new one:

Add="10.0" adds 10 to the attribute value.

Subtract="10.0" subtracts 10 from the value.

Multiply="10.0" multiply the value by 10

Divide="10.0" divides the value by 10

The operator can use the value of an attribute instead of a numeric value. For example:

<CopyAttributeValue Attribute="HEIGHT" Subtract="DRVAL1"/>

CopyConvertibleAttributes

All attributes in the first feature are copied to the second feature.

ApplyAttributeMapping

Name="AttributeMappingName"

Name is mandatory.

SetSpatialAttributeValue

Acronym="acronym

Value="value"

Acronym is the acronym of the spatial attribute

Value is the numeric value of the attribute

AssignZValueToAttribute

Acronym="acronym"

Negate="True/False"

PositiveValuesOnly="True/false"

ApplySoundingRounding=”rule”

Add="addend"

Subtract="subtrahend"

Multiply="multiplier"

Divide="divisor"

Acronym is mandatory.

Negate multiplies the floating point or integer number by –1 to negate. If not specified, Negate=False. Negate is used when converting S-57 soundings to VPF soundings, for example.

PositiveValuesOnly means only positive floating point or integer attributes are converted. If not specified, PositiveValuesOnly=False. This is used when converting S-57 soundings to VPF soundings, for example.

ApplySoundingRounding applies a sounding rounding rule to a sounding or a depth attribute. The rule must be in SoundingRounding.xml.

Add, Subtract, Multiply and Divide use mathematical operators to change a numeric value to a new one:

Add="10.0" adds 10 to the attribute value.

Subtract="10.0" subtracts 10 from the value.

Multiply="10.0" multiply the value by 10

Divide="10.0" divides the value by 10

The operator can use the value of an attribute instead of a numeric value. For example:

<AssignZValueToAttribute Attribute="HEIGHT" Subtract="DRVAL1"/>

MapAttribute

Entry tag

The MapAttribute tag must contain one or more Entry tags. Each entry tag is made up of zero or one <Filter> tags and one or more attribute mapping tags.

SetAttributeValueUnknown

Acronym="Acronym"

This is available for all feature types.

Acronym is mandatory.

SetAttributeValueUndefined

Acronym="Acronym"

If the attribute exists in the object being mapped, it will be set to undefined in the new object.

AssignScaminByStep

Steps = “Value”

The value is mandatory

AssignScaminFromMaster

The feature is assigned the SCAMIN value of the master. This is only applicable to slave features.