Question

split shapes at self intersections

  • 24 February 2016
  • 3 replies
  • 8 views

Badge

Hi i have a roads layer - polygon. I want merge all the roads parts into single parts that don't have donuts.

so far i've been using the Aggregator and Dissolver and finally the DonutBridgeBuilder which gets me almost to the right point however (as its supposed to do) the features aren't split just rather linked by tiny slithers (bridges). it would be really good if i could find some other transformer to split these into separate features rather than there current state where they are almost like virtual multipart polygons (but joined by the "bridges" rather than being separate)

i've had a play in MapInfo and found the check regions tool which can create points at self intersections - can't find anything similar in FME (2016) because i was thinking i could use these self intersection points to maybe chop the layer into separate features.


3 replies

Badge

Using a combination of the Intersector(Intersected) and AreaBuilder(Incomplete) transformers i've manged to create polylines at the "bridge" locations. now just struggling to find a way to chop my roads to these lines.

Userlevel 4
Badge +25

So, just to be clear... if you have a road like the top image (say it's a traffic island) you want to chop it into pieces like the bottom image (where there is no donut)

I'll have a think about that. but you might find the Chopper transformer will do that for you.

Userlevel 4
Badge +25

OK, I don't have a full dataset (just made up a feature or two) but try this:

1) Count coordinates in each feature with a CoordinateCounter

2) Chop the data with a Chopper, setting Maximum Vertices to <coordinate count>

3) Use a Deaggregator to drop the result into their component pieces

For me that seemed OK, but if you can supply a sample of data I might be able to do better

Reply