Hi All,
I have a file that has spatial objects that are irregular polygons. I am trying to write a workflow that iteratively goes through all the spatial objects and combines those that are within a certain distance of one another while summing or doing other operations on fields in other columns (e.g. population).
Here are the top 1000 rows of my file.
Any suggestions would be very much appreciated!
Thanks!
TD
Solved! Go to Solution.
Can you try this WF?
First, calculate all of distance between every combination of 2 points.
Second, filter the combination out of range you specify(in attached WF, I set 5 miles)
Third, make a group by Grouping tool
Finally, summarize by group and combine spatial objects(+ summarize some numeric value together in the same Summarize tool)
@ThibaultDucellier
I am not sure your final goal but if want to check the nearest distance between two spatial objects, we can use Find Nearest Tool as below.
Hello Gawa,
Thank you very much for your insights. The workflow appears to work well.
Just a simple question why is the population at the end different than the population at the beginning ?
Best regards,
TD
I'm glad to hear that.
It is because population is sum up in Summarize tool to calculate total population within the group. I understand that you want to not only make group of spatial object but also calculate some statistics metrics.
Hi Gawa
Thanks for your quick reply.
I meant that the total population in the file should not change (not per field but in aggregate). There seem to be some leakage in population whereby the aggregate population at the end of the workflow is smaller than that of the original input file.
Any ideas why?
Thanks!!
I used "pop_wp" as a sum up field, but it is decimal value like 42.058357 that is quite unusual to number of population. It should be integer value in general.
I'm sorry as I'm not familiar with the context of your provided data, I cannot find out what it should be. Can you guess what is issue?
Just to verify, your workflow will exclude rows where the nearest distance does not have at least 1 hit where it has a neighbour right? Which might be what is causing the population leakage.
I see. I modified my WF so as to union "ungrouped nodes" to keep all of input nodes in the result.