ChangeDetector
Detects changes between two sets of input features.
这个变压器 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 theOriginalport.
Another set of features enters via theRevisedport.
Output Ports
This port is only relevant whenUpdate Detection Key Attributesare specified in the “Transformer” section of the parameters.ARevisedfeature is output via theUpdatedport when it has been prejoined on a unique key, but it differs from theOriginalfeature that shares the same unique key.
ARevisedfeature with no match in theOriginalset is output via theInsertedport.
AnOriginalfeature is output via theDeletedport when no match for it can be found in theRevisedset.
AnOriginalfeature is output via theUnchangedport when it is found to have either matching geometry, matching attribute values, or both, with a feature in theRevisedset.
Parameters
Update Detection Key Attributes | This allows the features from theOriginalandRevisedports to be joined before they are compared.如果 a joined pair is identical, the feature from theRevisedport will go out theUnchangedport.如果 a joined pair differs, the feature from theRevisedport will go out theUpdatedport. |
Attribute Matching Strategy | In conjunction withSelected Attributes, this parameter controls which attributes of input features must have the same value before a match is declared.
|
Selected Attributes | Applicable whenAttribute Matching Strategyis set toMatch Selected AttributesorMatch 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 whether2Dor3Dgeometry must be the same before a match is declared.FULLmakes sure 3D, measures, andgeometry traitsall match. When comparing raster geometries:
When comparing surface and solid geometries:2Dbehaves the same way as3D, 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. |
仁慈的几何匹配 | 如果Yes,那么p的顺序oints 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.如果 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 theUpdatedport that indicate why each feature is different from the feature from theOriginalinput 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 theOriginalport is matched with a feature from theRevisedport, a representative feature is output from theUnchangedport.This setting specifies whether the representative should be taken from theOriginalport, theRevisedport, or both |
Match ID Attribute | 如果Unchanged Output Portsis set toOutput 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 theCRCCalculatorto calculate a CRC value for each feature, then perform a match only on the CRC value attribute.
TheMatcherprovides 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, clickbeside the applicable parameter.For more information, seeTransformer 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 theFME Community.