Skip to main content
Released

Transformer to split a polygon by line


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 a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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
Influencer
Forum|alt.badge.img+34
  • Influencer
  • 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+44
fyi PR#62406

 

 


roland.martin
Forum|alt.badge.img+9

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
Forum|alt.badge.img+9
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+18
  • 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+5

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

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.


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