Skip to main content
Question

How can I test if a feature has measures before I use the MeasureExtractor transformer?


Forum|alt.badge.img+1

Is there a way to test if my incoming lines/polylines have measures attached before I use the MeasureExtractor? If the incoming feature does not have measures - MeasureExtractor fails. I tried GeometryValidator, but this lets the features pass if all vertices do not have a measure.

4 replies

david_r
Celebrity
  • August 27, 2021

If you have a fairly recent version of FME (I just checked with 2018), the MeasureExtractor has a <Rejected> port. All incoming lines without measures will be output there.


nielsgerrits
VIP
Forum|alt.badge.img+54
david_r wrote:

If you have a fairly recent version of FME (I just checked with 2018), the MeasureExtractor has a <Rejected> port. All incoming lines without measures will be output there.

This. And to prevent your workspace to stop when a rejected feature is detected you need to change the setting "Rejected Feature Handling" from "Terminate Translation" to "Continue Translation". You can find this in the "Navigator" pane on the left, "Workspace Parameters", "Translation".


david_r
Celebrity
  • August 27, 2021
nielsgerrits wrote:

This. And to prevent your workspace to stop when a rejected feature is detected you need to change the setting "Rejected Feature Handling" from "Terminate Translation" to "Continue Translation". You can find this in the "Navigator" pane on the left, "Workspace Parameters", "Translation".

Agree, or simply connect something to the <Rejected> port, e.g. a Logger so that you can see what is being rejected. That way the other <Rejected> ports in your workspace continue to behave as expected.


Forum|alt.badge.img+1

Thank you for pointing this out. I did see the rejected port being connected to a logger pass by in one of the webinars but disregarded it for desktop only development. The reject port I now connect a MeasureGenerator, which is what I wanted.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings