Skip to main content
Solved

Dissolve adjacent polygons along multiple tiles


jorge_rosales
Contributor
Forum|alt.badge.img+8

I describe an example or a general problem. I have six files (tiles), each one with one o more polygons that have their own (file local) id. As showed in this picture.

No common attributes values exists for each whole polygon so a grouped dissolver would not be a solution. The grid geometry (cutter) is known. The desired result would be:

Any suggestion?

Best answer by ebygomm

Use a spatial relator to find features that touch but have a different filename, assign a group to these features then use that group to dissolve

 

dissolve_different_tiles.fmwt

Although i think this sort of area will still be problematic

View original
Did this help you find an answer to your question?

17 replies

danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • March 24, 2019

Hi @j4

 

The transformer Dissolver did'nt work?

 

Thanks,

Danilo


jorge_rosales
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 24, 2019
danilo_fme wrote:

Hi @j4

 

The transformer Dissolver did'nt work?

 

Thanks,

Danilo

Dissolver removes common boundaries so the three polygons in the bottom right corner will be merged into one instead three.


danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • March 25, 2019
jorge_rosales wrote:

Dissolver removes common boundaries so the three polygons in the bottom right corner will be merged into one instead three.

Thanks your reply.

Could you share a amount of data?

 

Thanks


jorge_rosales
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 25, 2019
danilo_fme wrote:

Thanks your reply.

Could you share a amount of data?

 

Thanks

@danilo_fme a geopackage is attached.

test_data.zip


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • Best Answer
  • March 25, 2019

Use a spatial relator to find features that touch but have a different filename, assign a group to these features then use that group to dissolve

 

dissolve_different_tiles.fmwt

Although i think this sort of area will still be problematic


jorge_rosales
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 25, 2019
ebygomm wrote:

Use a spatial relator to find features that touch but have a different filename, assign a group to these features then use that group to dissolve

 

dissolve_different_tiles.fmwt

Although i think this sort of area will still be problematic

@egomm "touches" predicate mixes "point touches" and "line touches" so the feature set associated to one feature will be oversized. "Touches" is also a binary operator and there are features along multiples files (as the rotated L-shape one).


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • March 25, 2019
jorge_rosales wrote:

@egomm "touches" predicate mixes "point touches" and "line touches" so the feature set associated to one feature will be oversized. "Touches" is also a binary operator and there are features along multiples files (as the rotated L-shape one).

You can use a spatial predicate instead of touches to ignore polygons that only touch at the corners. (Although this would only be a problem if the corner also coincided with a tile boundary) The features over multiple files is handled by the list combiner


jorge_rosales
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 25, 2019
ebygomm wrote:

You can use a spatial predicate instead of touches to ignore polygons that only touch at the corners. (Although this would only be a problem if the corner also coincided with a tile boundary) The features over multiple files is handled by the list combiner

Ok, it could be a solution. Any suggestion for long polygons in multiple (more than 3) files?


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • March 25, 2019
jorge_rosales wrote:

Ok, it could be a solution. Any suggestion for long polygons in multiple (more than 3) files?

Have you tried the attached fme template file?

It should produce this output from your input data


jorge_rosales
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 25, 2019
ebygomm wrote:

Have you tried the attached fme template file?

It should produce this output from your input data

Ok, this is what I need. Thank you very much @egomm.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • March 25, 2019

@j4

 

Post_Tiler_Rebuild_out.fmwt

 

The problem Is of course the lacking information. THis should have not been removed after tiling.

One should always preserve the object ID as wel as the row and column values.

 

The dataset you provided shows the problem.

You end up with a forced iterative process which not nescesarrily has a solution.

Create lists of the touching polygons, query the list with and a bunch of the objects get re-united. But polygons split over more than one tile pose a problem. There is no way to identify which should be merged.

 

I embed a workbench, that does 1 pass. I found no way to coherently iterate and dissolve the objects cut by borders.

 

You might want to see how you can "dissolve" without dissolver.


jorge_rosales
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 25, 2019
gio wrote:

@j4

 

Post_Tiler_Rebuild_out.fmwt

 

The problem Is of course the lacking information. THis should have not been removed after tiling.

One should always preserve the object ID as wel as the row and column values.

 

The dataset you provided shows the problem.

You end up with a forced iterative process which not nescesarrily has a solution.

Create lists of the touching polygons, query the list with and a bunch of the objects get re-united. But polygons split over more than one tile pose a problem. There is no way to identify which should be merged.

 

I embed a workbench, that does 1 pass. I found no way to coherently iterate and dissolve the objects cut by borders.

 

You might want to see how you can "dissolve" without dissolver.

@gio the solution pointed out by @egomm seems to work. Try the attachment.

listcombiner.fmwt


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • March 26, 2019

@j4

I get it that it "works".

I also say that one does not actually knows (unless one has prior knowledge) whether polygons which touch on a border or borders should be dissolved.

Whether those objects were once a single object.

 

SO it seems like gambling on assumptions.


jorge_rosales
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 26, 2019
gio wrote:

@j4

I get it that it "works".

I also say that one does not actually knows (unless one has prior knowledge) whether polygons which touch on a border or borders should be dissolved.

Whether those objects were once a single object.

 

SO it seems like gambling on assumptions.

I agree. In this particular case the initial dataset could be seen as the result of a "Clipper" using a known grid. Maybe FME could have an "UnClipper" transformer that receives the clipped features (clipped input port) and the geometry used as clippers (clipper input port).


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • March 26, 2019
jorge_rosales wrote:

I agree. In this particular case the initial dataset could be seen as the result of a "Clipper" using a known grid. Maybe FME could have an "UnClipper" transformer that receives the clipped features (clipped input port) and the geometry used as clippers (clipper input port).

That option still wouldn't solve the issue that gio is concerned about, although I think looking at your input data it's unlikely to be an issue.

But if you have the scenario where two adjacent features have their shared boundary falling exactly on the grid line, they would be dissolved together in error.


jorge_rosales
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • March 26, 2019
ebygomm wrote:

That option still wouldn't solve the issue that gio is concerned about, although I think looking at your input data it's unlikely to be an issue.

But if you have the scenario where two adjacent features have their shared boundary falling exactly on the grid line, they would be dissolved together in error.

Yes, that is true.


Forum|alt.badge.img+2

@j4 If you can, I would try running your workflow in FME 2019. We have done a lot to improve both the performance and the results of the dissolve. Our testing shows that the 2019 Dissolver is between 2 to 76 times faster, depending on the input data.

You can have multiple versions of FME desktop installed, just use a different install folder, i.e. c:\\apps\\fme2019. You can find FME 2019 betas here.


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