Skip to main content
Solved

Make list "ID" of touching building footprints within an area.

  • November 18, 2019
  • 8 replies
  • 12 views

kidega
Contributor
Forum|alt.badge.img+8

 

Hello,

I am trying to find a soultion of workflow in FME, as to the attached image.

My first attempt was to use the "NeighborFinder" and check if a footprint touches another. Then group/ list those (light blue circle). Then perhaps do another "NeighborFinder" check within a i.e. distance of 15, and make that a merged list (dark blue circle).

I appreciate any idéas. Thank you!

Best answer by ebygomm

There is a custom transformer on the hub - ListCombiner - that may help you to create your groups once you have lists.

 

So if you use a spatial relator and send your buildings in as both requestor and supplier and build a list of related ids, you can then use list combiner which would assign the same group id to all buildings that touch

 

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

8 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • November 18, 2019

I've done something similar where I've used the SpatialRelator (Intersects) and then a pythonCaller to do a connected component analysis of the resulting lists, and assign the resulting group id to each feature.

 

 

 

Avoiding Python, you could use a dissolver (Drop Incoming Attributes_, counter (to get a unique id per group) and then a spatialFilter (Merge Attributes) with the dissolved features as filters and original features as candidates.

 

 

A bufferer before the dissolver would give you the dark blue result.

kidega
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 20, 2019

Hello @jdh

Thanks alot for trying to point me to the right direction. I am not familiar with python so I will try your suggestion with the disslover, spatialFilter and bufferer.


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • Best Answer
  • November 20, 2019

There is a custom transformer on the hub - ListCombiner - that may help you to create your groups once you have lists.

 

So if you use a spatial relator and send your buildings in as both requestor and supplier and build a list of related ids, you can then use list combiner which would assign the same group id to all buildings that touch

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • November 20, 2019
ebygomm wrote:

There is a custom transformer on the hub - ListCombiner - that may help you to create your groups once you have lists.

 

So if you use a spatial relator and send your buildings in as both requestor and supplier and build a list of related ids, you can then use list combiner which would assign the same group id to all buildings that touch

 

Why am I not surprised that @takashi has a custom transformer that does exactly what's needed.

 

 

This is a generalized case of the connected component analysis I mentioned in my answer.

kidega
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 20, 2019
ebygomm wrote:

There is a custom transformer on the hub - ListCombiner - that may help you to create your groups once you have lists.

 

So if you use a spatial relator and send your buildings in as both requestor and supplier and build a list of related ids, you can then use list combiner which would assign the same group id to all buildings that touch

 

Thanks alot @ebygomm ! This looks exactly what I am after. Do you think adding a bufferer @jdh was talkiing about would determine No. of group id:s?


kidega
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • December 10, 2019
ebygomm wrote:

There is a custom transformer on the hub - ListCombiner - that may help you to create your groups once you have lists.

 

So if you use a spatial relator and send your buildings in as both requestor and supplier and build a list of related ids, you can then use list combiner which would assign the same group id to all buildings that touch

 

Hello, I wounder what type of parameter settings you used in the SpatialRelator and ListCombiner transformers to get the sorted _group_id:s?


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • December 11, 2019
kidega wrote:

Hello, I wounder what type of parameter settings you used in the SpatialRelator and ListCombiner transformers to get the sorted _group_id:s?

Hi @kidega I created a unique ID on every input feature with a Counter, then used the Spatial Predicates "Requestor Intersects Supplier" and "Requestor Touches Supplier" in the SpatialRelator, and in the ListCombiner I set the Source List to that unique ID from the list.


kidega
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • December 11, 2019
fmelizard wrote:

Hi @kidega I created a unique ID on every input feature with a Counter, then used the Spatial Predicates "Requestor Intersects Supplier" and "Requestor Touches Supplier" in the SpatialRelator, and in the ListCombiner I set the Source List to that unique ID from the list.

Hi @danatsafe Thanks for explaining, now I got it working!


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