Question

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

  • 27 August 2021
  • 4 replies
  • 6 views

Badge +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

Userlevel 4

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.

Userlevel 6
Badge +32

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".

Userlevel 4

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.

Badge +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.

Reply