Question

Find Gaps/Overlap in Begin/End Measures... Reverse Snipper?


I have a job that takes a polyline feature and dynamically segments it based on begin/end measure values provided by a merged table. This tool is built to work as a custom transformer that loops through multiple tables, utilizing the snipper tool, and outputs a heavily segmented line. Example of the measures below:

 

 

ROUTE_IDBEGIN_MEASUREEND_MEASURE1010110201253013040

 

This all works fine, except when gaps exist in the sequence of begin/end measures (see the gap between the end measure and begin measure of row 2-3). The snipper will only pass the snipped segment through the output. I need to keep the segments of the line that are not snipped.

 

The remnants are useless as I would need to run a line on line overlay on all the remnants which is slow and not practical when I have 5000+ lines and hundreds of segments for each line. Unless someone can suggest another way of using remnants to find gaps, and overlaps if possible, but I've largely abandoned this approach. I've also attempted using fmeobject and FMELine.Snip but I'm not very good with python and am unable to get an output geometry.

 

Does anyone know of a way that I can essentially create a reverse snipper that would remove all the segments I put in and leave the "gaps" as the only output? Or a way of analyzing the input table begin/end measures to find gap/overlap measures?


2 replies

Userlevel 2
Badge +12

After sorting on ROUTE_ID and BEGIN (if needed), you can add a new attribute for the previous end measure, this way:

Then you would be able to test records (using the Tester transformer, with test clause BEGIN_MEASURE = prev_end).

This should only fail at the start of a new ROUTE (where BEGIN_MEASURE = 0).

Hope this helps.

 

After sorting on ROUTE_ID and BEGIN (if needed), you can add a new attribute for the previous end measure, this way:

Then you would be able to test records (using the Tester transformer, with test clause BEGIN_MEASURE = prev_end).

This should only fail at the start of a new ROUTE (where BEGIN_MEASURE = 0).

Hope this helps.

 

Thanks for the reply. Unfortunately, I've tried this method. There are too many inconsistencies in the data, too many possible errors to account for. I wrote nearly a dozen different tests in the conditional value section, for both gaps and overlaps, and was still getting false positives or missing gaps in certain scenarios.

Reply