Skip to main content
Question

Transformer equivalent to hasMeasures()

  • August 16, 2018
  • 5 replies
  • 15 views

jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies

The python api has a method for checking whether or not any part of a feature's geometry contains measures. http://docs.safe.com/fme/html/fmepython/api/fmeobjects/geometry/_general/fmeobjects.FMEGeometry.hasMeasures.html#fmeobjects.FMEGeometry.hasMeasures

Is there a non python transformer equivalent? I don't need to extract any measure values, just check whether or not they exist.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

Forum|alt.badge.img+2
  • 719 replies
  • August 16, 2018

Hi @jdh

The GeometryValidator may work here, with the Issue to Detect set to 'Missing Measures and elevations'


nathanatsafe
Safer
Forum|alt.badge.img+9
  • Safer
  • 284 replies
  • August 16, 2018

Hi @jdh,

 

Is there a reason you need a non-python equivalent? I don't believe we have a dedicated transformer, however with @hollyatsafe's suggestion or a combination of MeasureExtractor/Tester you could likely achieve a proper result.

 

In case anyone else is interested I've published a custom transformer to the hub that harnesses the hasMeasures() method - the MeasureChecker.

jdh
Contributor
Forum|alt.badge.img+37
  • Author
  • Contributor
  • 2002 replies
  • August 17, 2018

Hi @jdh

The GeometryValidator may work here, with the Issue to Detect set to 'Missing Measures and elevations'

Nice, that looks to be new in 2018.Do you have any information for the parameters associated with that test. The documentation still reflects version 4 of the transformer.

jdh
Contributor
Forum|alt.badge.img+37
  • Author
  • Contributor
  • 2002 replies
  • August 17, 2018

Hi @jdh,

 

Is there a reason you need a non-python equivalent? I don't believe we have a dedicated transformer, however with @hollyatsafe's suggestion or a combination of MeasureExtractor/Tester you could likely achieve a proper result.

 

In case anyone else is interested I've published a custom transformer to the hub that harnesses the hasMeasures() method - the MeasureChecker.
Client would prefer a non python solution if possible, presumably for ease in maintaining the workspace.

 

I didn't want to use the MeasureExtractor, as this is a heavy dataset, and doing so would slow things down considerably, for little gain.

 

 

 


Forum|alt.badge.img+2
  • 719 replies
  • August 17, 2018
Nice, that looks to be new in 2018.Do you have any information for the parameters associated with that test. The documentation still reflects version 4 of the transformer.
Hi @jdh,

 

Thank you for pointing this out - I've put in a request for the Doc to be updated. In the meantime here is a run down of the parameters.

 

Measures/Z Conflict Mode - The "conflict" refers to corrupt data that has valid values at some vertices, and invalid "NaN" values at others. There are three options on how to handle incoming conflicts:

 

  1. Use Default Value - this will replace any "NaN" value with the value you specify.
  2. Drop - the measure will be entirely dropped from the geometry
  3. Compute - FME will make a calculated guess on what the measure/elevation should be.
For your case since it seems you are only interested in whether a features Geometry has measures or not you can just set 'Attempt Repair' to No under the Output and then if there are any measures recorded as NaN these will come out of the Failed port.