FME Hackathon was one of the highlights of this year’s FME User Conference in Vancouver, BC. Second on the Hackathon challenge list was “LRS Calibrator”; it was perhaps the most “boring” project at the time when all the buzz was about web APIs that enable social medial integration/automation and cloud processing. I hesitated for a second but decided to take on the project. After all any LRS challenges are the call of duty to me.
And I was not alone, Dan Nguyen of Southern Company Gas joined me on the journey!
LRS Route calibration is a process by which route measurements at each vertex are adjusted or assigned given measures at a set of known locations along the subject route. Our team broke the process into three steps as illustrated.
- Snap calibration points within tolerance to the end nodes of a route and transfer the measures from the calibration points to the matching nodes.
- Snap the remaining calibration points within tolerance to the line (route) and create new vertices at the snapping points. The measures from the calibration points are transferred to the corresponding new vertices.
- Assign measures to vertices in between pairs two adjacent points (nodes or vertices) with known measures through interpolation.
There were quite few transformers involved in the process. The team found two key spots that are worthy of explanations.
- Associate the end points with corresponding calibration points, and insert the non-end calibration points as news vertices to the route
AnchoredSnapper transformer was used two times – first with the “End Point Snapping” option and the second time with the “Segment Snapping” option.
- Interpolate measures at vertices between two calibratoin points with known measures
Interpolating measure was not as simple as it appeared to be. InlineQuerier was used to generate the measure list and then use the MeasureSetter to inject the measure into the route geometry.
Below are some of the major transformers used in this challenge.
VertexCreator / VertexExtractor,
MeasureSetter / MeasureGenerator,
Aggregator / Deaggregator,
While not fully tested, the LRS Calibrator workspace was designed to support bulk calibration and support multi-segment routes. The snapping tolerance is exposed as a public parameter. You may download it from here for what it’s worth.