Skip to main content
Released

Transformer to split a polygon by line

Related products:Transformers
  • June 28, 2017
  • 11 replies
  • 174 views

Forum|alt.badge.img

There seems to be a notable hole in the geometry handling of FME.

There's no easy way to split a polygon by a line. This is something even kindergarten kids can do ("if you cut the pie here, how many pieces do you have?"), but FME can't.

So can we please have a transformer that splits a polygon by a line. If you search these boards you'll see it's a commonly requested question (how to).

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.

11 replies

ebygomm
Evangelist
Forum|alt.badge.img+49
  • Evangelist
  • June 28, 2017

FME can, just not in one transformer :-)


nmatton
Contributor
Forum|alt.badge.img+4
  • Contributor
  • June 29, 2017

What do you mean by "line" ? Did you gave a try on the Chopper (by 2 vertex) ?


lars_de_vries
Forum|alt.badge.img+10

@Jonathan I just created a custom transformer with the name PolygonCutter. You can find on the FME HUB. Just click here


mark2atsafe
Safer
Forum|alt.badge.img+59
fyi PR#62406

 

 


roland.martin
Contributor
Forum|alt.badge.img+11

Also, FME doesn't draw all over the walls with crayons - this functionality must be added immediately.

Anyway, I'm not clear from your description why you can't use a LineOnAreaOverlayer?


roland.martin
Contributor
Forum|alt.badge.img+11
OK, just saw your other post. I'm pretty sure the LineOnAreaOverlayer used to handle this.

 

 

My point about crayons stands...

 


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • June 30, 2017

It would make sense that LineOnAreaOverlayer would do this, and that is where we'd put this functionality. It is true that we are a bit lacking in this area. I'm impressed with the # of votes this already achieved in such a short time. Vote early and vote often! :-)


  • February 20, 2020

I put all the line and polygon features into a TopologyBuilder, then used the AreaBuilder to build the 'cut' polygons. I had to use a Snapper on the lines prior to the TopologyBuilder. I only had one polygon to cut, so perhaps this doesn't work in more complex cases.


ekkischeffler
Contributor
Forum|alt.badge.img+7
  • Contributor
  • February 11, 2022

Hi Lars,

 

Thanks for helping with that. But there's a few flaws in your transformer still. First one I spotted is that you're losing your _temp_id attribute along the way (check Intersector and AreaBuilder) and even if you retain it there, you'll have to assign it to all the new parts...


hansp
Contributor
Forum|alt.badge.img+1
  • Contributor
  • June 29, 2022

Hi All, any news on this basic but new to be made functionality within FME, from the Safe side?

Cheers,

Hans


koenterralytics
Contributor
Forum|alt.badge.img+10

I just tested the transformer. Works great for the geometry, but it does something strange with the merged attributes. It seems to merge values from random other objects.