Skip to main content
Question

Multipolygons to Polygon

  • March 4, 2013
  • 18 replies
  • 1619 views

Forum|alt.badge.img
Is there any transformers to aid in  MultiPolygons to simple Polygons.

 

 

I'm going from ESRI Geodatabase to SDF.

 

 

Chris
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.

18 replies

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • March 4, 2013
how about the deaggregator?

davideagle
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 578 replies
  • March 4, 2013
You'll need to consider using the Deaggregator transformer to break your polygon groups into unique entities. Though make sure you retain your ID number or use a Counter to create one first as you may later wish to know which Multipolygon your unique polygon came from...

jnotter
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 18 replies
  • January 22, 2020

Even after using a Deaggregator and Tester I still get multiple identical polygons inside of my GeoJSON rendered multi-polygon geometries. I want them to come out as single polygons rather than multi-polygon.


oscard
Influencer
Forum|alt.badge.img+22
  • Influencer
  • 344 replies
  • January 23, 2020

Even after using a Deaggregator and Tester I still get multiple identical polygons inside of my GeoJSON rendered multi-polygon geometries. I want them to come out as single polygons rather than multi-polygon.

Could you share a sample of that GeoJSON?


jnotter
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 18 replies
  • January 23, 2020

Could you share a sample of that GeoJSON?

grid.json see attached sample. If trimmed to eliminate duplicates this 792 kB file drops to less than 20 kB.


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • January 23, 2020

grid.json see attached sample. If trimmed to eliminate duplicates this 792 kB file drops to less than 20 kB.

It looks like they're all the same. So your multipolygon consists of a lot of identical polygons. Deaggregating those will indeed give you a lot of identical polygons.

You can use a Matcher to remove duplicate geometries.


oscard
Influencer
Forum|alt.badge.img+22
  • Influencer
  • 344 replies
  • January 23, 2020

It looks like they're all the same. So your multipolygon consists of a lot of identical polygons. Deaggregating those will indeed give you a lot of identical polygons.

You can use a Matcher to remove duplicate geometries.

Yes, every feature is formed by the same polygon several times. After the Deaggregator you could also use a DuplicateFilter for "fme_feature_type"


jnotter
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 18 replies
  • January 23, 2020

It looks like they're all the same. So your multipolygon consists of a lot of identical polygons. Deaggregating those will indeed give you a lot of identical polygons.

You can use a Matcher to remove duplicate geometries.

I tried matcher for single match and unmatched and still got the multies. I have deaggregator in line but it does not remove them. Now I am curious: Duplicate Filter _after_ Deaggregator seems to be filtering them out, but not before, but even then... not all of them. Still getting multiples.


takashi
Celebrity
  • 7843 replies
  • January 23, 2020

I tried matcher for single match and unmatched and still got the multies. I have deaggregator in line but it does not remove them. Now I am curious: Duplicate Filter _after_ Deaggregator seems to be filtering them out, but not before, but even then... not all of them. Still getting multiples.

Deaggregate first, and then filter out duplicates with the Matcher.


jnotter
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 18 replies
  • January 23, 2020

Deaggregate first, and then filter out duplicates with the Matcher.

Matcher has not produced sufficient removal of identical.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • January 24, 2020

Matcher has not produced sufficient removal of identical.

If you are confident all the geometries are identical, you could use a tester after the deaggregator to test for part_number = 0.

 


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 562 replies
  • January 24, 2020

grid.json see attached sample. If trimmed to eliminate duplicates this 792 kB file drops to less than 20 kB.

@jnotter, to come at this another way: Have you considered using Dissolver? Feed it the aggregate features (ie. Don't use Deaggregator with this method). This will deaggregate the polygon aggregates within the Transformer and merge all overlapping parts into a single polygon. It is somewhat more processor intensive, but it should deal with the fact that some of your multi-polygons aren't quite equal to each other by dissolving the small differences.


takashi
Celebrity
  • 7843 replies
  • January 24, 2020

I think the combination of Deaggregator and Matcher works fine.

 

The workflow generates 20 rectangular polygons independent each other. Isn't this your desired result?


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • January 24, 2020

I think the combination of Deaggregator and Matcher works fine.

 

The workflow generates 20 rectangular polygons independent each other. Isn't this your desired result?

I agree, the solutions suggested here all give me the same 20 single polygon output


jnotter
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 18 replies
  • January 24, 2020

I think the combination of Deaggregator and Matcher works fine.

 

The workflow generates 20 rectangular polygons independent each other. Isn't this your desired result?

Key question, @takashi, in the back-end data are there duplicates or are you just getting exactly these 20 polygons without overlap of identical?


jnotter
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 18 replies
  • January 24, 2020

@jnotter, to come at this another way: Have you considered using Dissolver? Feed it the aggregate features (ie. Don't use Deaggregator with this method). This will deaggregate the polygon aggregates within the Transformer and merge all overlapping parts into a single polygon. It is somewhat more processor intensive, but it should deal with the fact that some of your multi-polygons aren't quite equal to each other by dissolving the small differences.

@bwn, For my purposes each block of the grid must be thematically independent (for color thematic application) of the others, so dissolving into single feature across multiple polygons takes away this capability. The multi-polygons each are a set of identical coordinates, so there are no small differences to tolerate/adapt.


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • 562 replies
  • January 25, 2020

@bwn, For my purposes each block of the grid must be thematically independent (for color thematic application) of the others, so dissolving into single feature across multiple polygons takes away this capability. The multi-polygons each are a set of identical coordinates, so there are no small differences to tolerate/adapt.

Dissolver is typically used with the "Group By" attribute set that ensures that it only dissolves polygon(s) that are part of that group. Since each grid block has its own Name ID, then this can be used to group them and a single polygon feature would be output for each Grid ID.

It Matcher is not removing all the duplicates, this infers that the geometries are not precisely the same, which can happen with data created outside FME due to outside applications not always creating and storing geometry data with absolute precision. Although noting that the test by @takashi on the sample data below indicated that at least in the sample data provided, Matcher works in this case.


takashi
Celebrity
  • 7843 replies
  • January 25, 2020

Key question, @takashi, in the back-end data are there duplicates or are you just getting exactly these 20 polygons without overlap of identical?

There are 20 single polygons, no duplicates. If you still have any problem even if you use the combination of Deaggregator and Matcher, please share your workspace which reproduces the problem.