Skip to main content
Released

Transformer to split a polygon by line

siennaatsafe
fmelizard
david_r
ebygomm
takashi
+77
  • siennaatsafe
    siennaatsafe
  • fmelizard
    fmelizard
  • david_r
    david_r
  • ebygomm
    ebygomm
  • takashi
    takashi
  • danilo_fme
    danilo_fme
  • caracadrian
    caracadrian
  • jdh
    jdh
  • tomfriedl
    tomfriedl
  • warrendev
    warrendev
  • tcrossman
    tcrossman
  • thijsknapen
    thijsknapen
  • jkr_wrk
    jkr_wrk
  • carmijo
    carmijo
  • muzhnasto
    muzhnasto
  • jelle
    jelle
  • kennyo
    kennyo
  • chriswilson
    chriswilson
  • canerakin
    canerakin
  • anamanvil
    anamanvil
  • thdrg
    thdrg
  • juanmahere
    juanmahere
  • koenterralytics
    koenterralytics
  • gbj1717
    gbj1717
  • revesz
    revesz
  • hellenic1994
    hellenic1994
  • jerez
  • pwan
  • tomtoni109
    tomtoni109
  • cww7
  • julie.houba
  • mrtihon
  • elliotst
  • mikegresham1
    mikegresham1
  • ml56067
    ml56067
  • jonathan
  • r5
    r5
  • nmatton
    nmatton
  • travg
    travg
  • geolassi
    geolassi
  • jarrydhunter
    jarrydhunter
  • tomhhnk
  • esietinga
    esietinga
  • cwarren
    cwarren
  • simonl
    simonl
  • meijer
    meijer
  • danielloov
  • iew
    iew
  • susannebell
    susannebell
  • mbz
    mbz
  • ifitch
  • pat_uow
    pat_uow
  • paulbader
    paulbader
  • anderstgd
    anderstgd
  • tvl
  • sean_kurash
  • hansp
    hansp
  • ecthelion
    ecthelion
  • freddy17
    freddy17
  • ekkischeffler
    ekkischeffler
  • samuel.wsp
  • marnickcle
    marnickcle
  • roland.martin
    roland.martin
  • mhab
    mhab
  • dos_gis
    dos_gis
  • chau
    chau
  • jeroen
    jeroen
  • ostoja
    ostoja
  • barrett_h
    barrett_h
  • tfsrichard
  • hansh
    hansh
  • jpvo
    jpvo
  • hectormg
  • jecollins
  • billt43
  • haanjohan
  • jasperb
  • gnrevolution75
  • maptopixel
  • mandersson1991
  • DanAtSafe
    DanAtSafe
  • krismajury
    krismajury

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+39
  • 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