Solved

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

  • 18 November 2019
  • 8 replies
  • 3 views

Badge +7

 

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!

icon

Best answer by ebygomm 20 November 2019, 20:05

View original

8 replies

Badge +22

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.
Badge +7

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.

Userlevel 1
Badge +21

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

 

Badge +22

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.
Badge +7

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?

Badge +7

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?

Userlevel 4
Badge +13

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.

Badge +7

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