ChangeDetector
Detects changes between two sets of input features.
This transformer is often used with multiple readers, to identify changed features in the two files. It can identify all features that two input files have in common, and those which are in one file and not the other, such as the additions and the deletions.
Input Ports
One set of features enters the transformer via the Original port.
Another set of features enters via the Revised port.
Output Ports
This port is only relevant when Update Detection Key Attributes are specified in the “Transformer” section of the parameters. A Revised feature is output via the Updated port when it has been prejoined on a unique key, but it differs from the Original feature that shares the same unique key.
A Revised feature with no match in the Original set is output via the Inserted port.
An Original feature is output via the Deleted port when no match for it can be found in the Revised set.
An Original feature is output via the Unchanged port when it is found to have either matching geometry, matching attribute values, or both, with a feature in the Revised set.
Parameters
Update Detection Key Attributes | This allows the features from the Original and Revised ports to be joined before they are compared. If a joined pair is identical, the feature from the Revised port will go out the Unchanged port. If a joined pair differs, the feature from the Revised port will go out the Updated port. |
Attribute Matching Strategy |
In conjunction with Selected Attributes, this parameter controls which attributes of input features must have the same value before a match is declared.
|
Selected Attributes | Applicable when Attribute Matching Strategy is set to Match Selected Attributes or Match All Except Selected Attributes, and specifies which attributes to match, or exclude from the match, depending on the matching strategy chosen. |
Differentiate Empty, Missing, and Null Attributes |
No: Empty, missing, and null attributes will be treated as equivalent. Yes: Empty, missing, and null attributes will be considered as pairwise different. |
Check Attribute Types and Encodings |
No: Attributes with different types and encodings are considered a match if their value is the same Yes: Attributes must have the same type, encoding, and value to be considered a match. |
Match Geometry |
Controls whether 2D or 3D geometry must be the same before a match is declared. FULL makes sure 3D, measures, and geometry traits all match. When comparing raster geometries:
When comparing surface and solid geometries: 2D behaves the same way as 3D, that is, Z values will also be compared. When comparing point cloud geometries:
|
Differentiate Empty, Missing, and Null Traits |
No: Empty, missing, and null traits (and names) will be treated as equivalent. Yes: Empty, missing, and null traits (and names) will be considered as pairwise different. |
Lenient Geometry Matching |
If Yes, then the order of points in line and area features will be ignored. Composition differences between paths, lines, and other curves will be ignored. The order of elements in collections, and the order of holes in Donuts will be ignored. When comparing raster geometries, only the extents are compared. |
Check Coordinate Systems |
No: The Coordinate Systems are ignored Yes: The name of the Coordinate System must be the same for both features |
Vector Tolerance | “Vector Tolerance” allows two geometries to have spatial variation and still be considered a match. It only applies to vector based geometries (points, curves, areas). It is similar to a Fréchet distance: You have a dog leash of length “vector tolerance.” You will walk along the boundary of one of the geometries, your dog will walk along the boundary of the other. If you can both complete your walk without dropping the leash, the two geometries are within tolerance. This transformer has the added constraint for curves that you and your dog must both start at one end of your curve, and end at the other. |
List Name |
When given, new attributes will be added to the Updated port that indicate why each feature is different from the feature from the Original input port with the same unique key. There are three lists: ChangeReportPrefix.ADDED{}, ChangeReportPrefix.REMOVED{}, and ChangeReportPrefix.UPDATED{}. For attributes, each element in the list will have an entry for “AttributeName,” the value of the attribute on the “Original” (if it was present), and the value on the “Revised” (if it was present). After the modified attributes are listed in the ChangeReportPrefix.UPDATED{} list, the OriginalCoordSys may be listed (if it differed), and a flag for the OriginalGeometry may be added (if it differed). |
Unchanged Output Ports | When a feature from the Original port is matched with a feature from the Revised port, a representative feature is output from the Unchanged port. This setting specifies whether the representative should be taken from the Original port, the Revised port, or both |
Match ID Attribute | If Unchanged Output Ports is set to Output Both, then filling in this field will add a unique match id to each unchanged output pair, so that they may be rematched by a single attribute in the future. |
Example
Related Transformers
The ChangeDetector may require a significant amount of processing time, depending on the number of features and/or attributes. Alternatively, consider using the CRCCalculator to calculate a CRC value for each feature, then perform a match only on the CRC value attribute.
The Matcher provides a more general approach, which may be more convenient for certain applications.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Transformer Categories
FME Community
The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.
Search for samples and information about this transformer on the FME Community.