Skip to main content
Question

Filling in holes in a polygon dataset

  • December 5, 2024
  • 6 replies
  • 86 views

scarter
Contributor
Forum|alt.badge.img+9

Hello Forum,

 

I have a polygon dataset of railway land, but it contain holes where items such as buildings, tracks and signal boxes would be. I need to fill in these holes to form a continuous polygon. The image below shows a sample of the data. I’d want to fill in holes like those marked in red. But I do not need to close spaces such as those marked in gold.

 

I’ve seen…. 

https://community.safe.com/transformers-9/filling-in-holes-in-polygon-8381?tid=8381&fid=9

 

… but I don’t think that’s suitable for the task.

 

I’ve also looked at Dissolver, but I’m not sure if that's the right way to go.

 

Any ideas, please.

 

 

Thanks,

Stuart

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

If they are proper holes, rather than gaps, I would actually try the DonutHoleExtractor.

Otherwise, the AreaAmalgamator set to Self Amalgamation, although that would also potentially generalize the outer hull and you may not want that.


nielsgerrits
VIP
Forum|alt.badge.img+54

Or maybe the HullAccumulator? This is my go to tool if I try to generate a boundary out of data like this.


scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • December 5, 2024

Thanks ​@gio and ​@takashi,

 

I’ve tried donutHoleExtractor. I get two results, through two ports: Outershell, Hole.

 

Outershell is exactly the same as the input. So, that one doesn’t do the job.

 

Hole port shows the cut out holes polygons like this example….

 

I can see how I could use these ‘hole’ polygons to merge with Outershell to give me the continuous polygon. However that wouldn’t work because the Hole polygons do not capture all of the holes, like this example…

 

I wonder if it that’s because some of the Holes contain small polygons, like a small island in a lake….

 

I’d need to capture holes like that those too. 

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • December 5, 2024

Did you not filter objects with holes prior to de HoleExtractor?

You can use the HoleCounter. 

 

Donut in donut also works.

 

Hye, can we no loinger upload workspaces?

 

 

 


scarter
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • December 5, 2024

@gio I did not filter objects with holes prior to the HoleCounter. I’ll try that.


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • December 5, 2024
gio wrote:

Hye, can we no loinger upload workspaces?

💡Tip: On the new forum we can only upload zipped workspaces.


Reply


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