Question

Create a list/featureclass of unique values (with a total count) of a point attribute for each polygon those points overlay.

  • 6 October 2021
  • 8 replies
  • 26 views

So I have written out the points into each featureclass that overlay a polygon... but now I want to get a list of unique values of one particular attribute (with a total count value of each), for each polygon. So that means the unique list (and count) will be different for each polygon.

 

I've tried this workflow using StatisticsCalculator to get total count of point attribute (that I want unique values for) and grouped by the same attribute. Then passed to AttributeCreator to create a new attribute with this value. Then passed to Aggregator and then fanned out to a writer. However, the values are the same. I need to calculate the total count of the unique values for each polygon. Please help.


8 replies

Userlevel 5
Badge +25

If you've created a list on the polygons you can use a ListHistogrammer to get those unique values and their counts.

Apologies, I need to get unique values of an attribute from the point layer, not the polygon, but write out the point attributes for each polygon. If that makes sense?

Userlevel 5
Badge +25

Apologies, I need to get unique values of an attribute from the point layer, not the polygon, but write out the point attributes for each polygon. If that makes sense?

Not really. Do you want a list of unique point attribute values and their counts per polygon? Or the other way around?

Yes, the first.

Userlevel 5
Badge +25

Yes, the first.

Okay, so if you let the PointOnAreaOverlayer generate a list on the polygons and then run that list through the ListHistogrammer you'll get a (sorted) list of unique values for the list attribute you picked and the number of times they occur.

Thanks for the suggestion, but it didn't work... it says no list attributes available. My workbench looks like this.... I really appreciate your help.

FMEworkbench

The ListExploder is because the polygons overlap in places and so points can be in 1-3 polygons, and I wanted to write the point to each polygon that it falls in.

Reply