FME Transformers: 2024.2

Categories
Calculated Values
Data Quality

CRCCalculator

Calculates a CRC (Cyclic Redundancy Check) value for a feature and places the calculated CRC value into the attribute specified.

If a CRC is calculated for both coordinates and attributes, it is returned as a hexadecimal string representing an integer of double the bit-length of the chosen algorithm. If a CRC is calculated for only coordinates, only attributes, or a file, it is returned as a hexadecimal string representing an integer equal to the algorithm bit-length.

In the case where the CRC of both coordinates and attributes is being calculated, the format of the CRC attribute string is xxxxxxxxyyyyyyyy, where the x's represent the CRC calculated for the coordinates, and the y's represent the CRC calculated for the combination of the coordinates and attributes. The first half of the CRC (the x's) in this case will match the entire CRC of calculating only the geometry coordinates. The second half of the CRC (the y's) will not match the entire CRC of calculating only attributes.

MD5 checksums do not follow this pattern and are instead returned as a 32 digit hex-string which is calculated based on the entire input.

Usage Notes

You can use this CRC value to check data at a later date - to make sure it hasn't been changed, corrupted, deleted etc. It can also be used as a form of ChangeDetection (instead of using the ChangeDetector to compare geometry, use the Matcher to compare CRC values).

Like all popular CRC algorithms, different features could produce the same CRC value with minimal probability.

Example

This FME Support Center example shows an advantage to using the CRCCalculator over the ChangeDetector.

Configuration

Input Ports

Output Ports

Note  Feature order may change in relation to other output ports. Feature order per port is maintained.

Parameters

Editing Transformer Parameters

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

FME Community

The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.

Search for all results about the CRCCalculator on the FME Community.