Skip to main content
Question

VertexCounter transformer giving incorrect vertex count on line segments containing arcs.


Show first post

30 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • April 29, 2019
david_r wrote:

I think a PythonCaller with this check should work:

geom = feature.getGeometry()
if isinstance(geom, fmeobjects.FMEPath):
    # feature geometry is an FMEPath instance

I was thinking of a non-python solution. It seems strange that you can't filter out paths when there are quite a few cases where you might want to treat them differently. I can fudge it with a combination of a GeometryPropertySetter and GeometryPropertyExtractor but i'm surprised there's not a better way


david_r
Evangelist
  • April 29, 2019
ebygomm wrote:

I was thinking of a non-python solution. It seems strange that you can't filter out paths when there are quite a few cases where you might want to treat them differently. I can fudge it with a combination of a GeometryPropertySetter and GeometryPropertyExtractor but i'm surprised there's not a better way

Unfortunately I'm not aware of any non-Python solution either. I agree that it would be handy if e.g. the GeometryFilter allowed you to check for path.


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • April 29, 2019
ebygomm wrote:

I was thinking of a non-python solution. It seems strange that you can't filter out paths when there are quite a few cases where you might want to treat them differently. I can fudge it with a combination of a GeometryPropertySetter and GeometryPropertyExtractor but i'm surprised there's not a better way

That's another one I'll raise with the developers. Seems crazy there is no way to tell if a feature is a path. Not even fme_type or fme_geometry will do it.


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • April 29, 2019
ebygomm wrote:

I was thinking of a non-python solution. It seems strange that you can't filter out paths when there are quite a few cases where you might want to treat them differently. I can fudge it with a combination of a GeometryPropertySetter and GeometryPropertyExtractor but i'm surprised there's not a better way

Filed as an enhancement request. The only other way I can see is to use GeometryExtractor to output XML and then check for the <path> tag.


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • April 29, 2019
mark2atsafe wrote:

Filed as an enhancement request. The only other way I can see is to use GeometryExtractor to output XML and then check for the <path> tag.

My fudge was to set a geometry name then use the GeometryPropertyExtractor to only extract path - only paths come out the extracted port then


Reply


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