Skip to main content

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.

Hi @jdh

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


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.

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.

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.

 

 

 


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.