Hi,
How could I assign a value to a polygon based on the value of most of the overlapping points?
Thanks in advance.
Hi,
How could I assign a value to a polygon based on the value of most of the overlapping points?
Thanks in advance.
Best answer by takashi
Hi @ortegago , a possible way I can think of is:
Counter: Add sequential number attribute (say "polygon ID") as unique ID to every polygon.
SpatialFilter (polygons->Filter, points->Candidate): Transfer polygon ID to every point within the polygon.
StatisticsCalculator (Group By: polygon ID, point No): Count the number of points for each group consisting of points having the same polygon ID and the same point No.
Sorter (Group By: polygon ID, Sort By: number of points, numeric descending): Sort the features output from Summary port of the StatisticsCalculator.
DuplicateFilter (Key Attributes: polygon ID): Select the first feature for each polygon ID. Selected feature will have your desired point No for the polygon.
FeatureMerger (Join On: polygon ID): Merge the point No to the original polygon feature.
See the attached screenshot to learn more.
Note the workflow has to be a little more complex, if there are two or more input polygons and those could overlap each other.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.