Skip to main content
Solved

Extract Grouped Points based on highest attribute values count


Forum|alt.badge.img+1

Hello,

I have a point dataset, and the attributes within can be summarised as per below:

Point_IDArea_IDCategory1

 

AAZ2AAZ3AAX4BBZ5BBX6BBX

 

I want to extract one point per Area_ID (I don't mid which), but it must assigned the the category attribute with the highest count within that Area_ID.

Therefore, form the table above for Area_ID 'A' I would want to extract points 1 or 2, and for AREA_ID 'B' points 5 or 6.

 

Any ideas?

 

Thanks,

RB

Best answer by robinb

Thanks for your response @danullen. i'm not quite sure that would work for me. I should have stated that the category values are not unique to each Area_ID, so the expanded dataset scenario would be as follows:

Point_IDArea_IDCategory1AZZ2AZZ3AYY4BXX5BXX6BYY7CVV8CXX9CVV

 

I want to extract the following Point_IDs:

- 1 or 2

- 4 or 5

- 7 or 9

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

3 replies

Forum|alt.badge.img
  • December 19, 2019

You can use a Sorter on Category and Group by on Area_ID, followed by a Sampler with Group by Area_ID with Sampling Rate 1 and Sampling Type First N Features. (If I understood your sorting preferences correctly.)


Forum|alt.badge.img+1
  • Author
  • Best Answer
  • December 19, 2019

Thanks for your response @danullen. i'm not quite sure that would work for me. I should have stated that the category values are not unique to each Area_ID, so the expanded dataset scenario would be as follows:

Point_IDArea_IDCategory1AZZ2AZZ3AYY4BXX5BXX6BYY7CVV8CXX9CVV

 

I want to extract the following Point_IDs:

- 1 or 2

- 4 or 5

- 7 or 9


Forum|alt.badge.img
  • December 19, 2019
robinb wrote:

Thanks for your response @danullen. i'm not quite sure that would work for me. I should have stated that the category values are not unique to each Area_ID, so the expanded dataset scenario would be as follows:

Point_IDArea_IDCategory1AZZ2AZZ3AYY4BXX5BXX6BYY7CVV8CXX9CVV

 

I want to extract the following Point_IDs:

- 1 or 2

- 4 or 5

- 7 or 9

Then I think I understand what you meant. You want to select one of the Point_IDs for the Category with the highest number of occurances per Area_ID.

 

Then you just put a StatisticsCalculator in front of it all, Group by Area_ID and Category and analyze Category. That will give you a count that you can sort and sample.

 

groupedpoints.fmw


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