Skip to main content
Question

Determining minimum attribute of another nearby feature


mickael
Forum|alt.badge.img+1

Hello,

Here is my issue : I have a feature containing buildings, with a height value. By merging the buildings and extracting holes, I get another feature which represents inner courtyards. Courtyards have a unique ID. I want to get the minimum height of buildings touching each courtyard.

 

I tried to use a SpatialRelator combined with a StatisticsCalculator (grouping by courtyard ID) :

(not the real workbench, which is quite a mess, but this is close enough)

 

 

But I get an issue : the SpatialRelator only seems to compute an output for one building and one courtyard. So when a buildling touches several courtyards, it is only used once to determine minimum heights. Here is an exemple, height are displayed on buildings, and computed min height on courtyards :

As you can see, the building north-west to the wrong courtyard min value is not taken into account, as it migth be used for the elongated courtyard which also is adjacent to the building.

 

Am I being clear enough ? And do you think of any solution that might solve this issue ?

Thanks in advance !

2 replies

takashi
Influencer
  • August 1, 2018

Hi @mickael, I think the SpatialRelator helps you definitely.

Send the courtyard features to the Requestor port, send the building features to the Supplier port, and check the Generate List option in the SpecialRelator.

The resulting features (courtyard) will have a list attribute which contains attribute values transferred from spatially related buildings. You can then sort the list elements by building height ascending with the ListSorter, and extract the first element (minimum height) with the ListIndexer.


mickael
Forum|alt.badge.img+1
  • Author
  • August 1, 2018
takashi wrote:

Hi @mickael, I think the SpatialRelator helps you definitely.

Send the courtyard features to the Requestor port, send the building features to the Supplier port, and check the Generate List option in the SpecialRelator.

The resulting features (courtyard) will have a list attribute which contains attribute values transferred from spatially related buildings. You can then sort the list elements by building height ascending with the ListSorter, and extract the first element (minimum height) with the ListIndexer.

Well ... it works !

 

Thank you very much takashi, this was driving me crazy !

 

 


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