Skip to main content

The scenario is as follows: We are able to get the dynamic segmentation done using Feature Merger & Snipper transformers based on event table and routes, but we also want to capture "LocationError" field values like similar to "Make Route Event Layer tool in ArcGIS" Any thoughts are suggestions like how do we achieve it in FME? 

Here is what I did:

Directed the route features to 2 MeasureExtractor transformers. The first one has the Index value of 0 to extract the Measure value at the beginning of the line. The other has the Index value of -1 to extract the Measure value at the end. The resulting new fields were each directed to an AttributeRenamer transformer to rename the fields to something more meaningful and then to AttributeRounder to keep the values to 2 decimals. The features were then merged back together on a unique id, resulting in the original route feature with FROM_M and TO_M along with the FROM_MEASURE and TO_MEASURE fields. Checks could then be added to verify the geometry matches the initial attributes.

The event records were the directed to a FeatureMerger transformer as the Requester and the Routes (described above) to the Supplier (be sure to set the Feature Merge Type to Attributes and Geometry).

Output from the “UnmergedRequester” port from the FeatureMerger can be directed to AttributeCreator transformer to add “LOC_ERROR” and populated with “ROUTE NOT FOUND”.

Output from the “Merged” port from the FeatureMerger can also be directed to an AttributeCreator (or AttributeManager) where “LOC_ERROR” is added and populated with a conditional value where the MEASURE field from the events are compared to the FROM_M and TO_M fields. If less than FROM_M or greater than TO_M, then populate LOC_ERROR with “MEASURE OUT OF RANGE”. 

For my purposes, this was all that was needed but I know ESRI can give other errors as well. If you haven’t already gotten it to work, hopefully this can give you some ideas. Cheers.


Reply