Calculate average values from observations within a distance weighted by the square of the inverse distance

7973
22
Jump to solution
06-02-2016 10:54 PM
ZHIZUO
by
Deactivated User


I have a shape file for U.S. county centroid, and another shape file for temperature point observations across the U.S.

I'd like to calculate the average temperature for each of the county centroid, from the temperature observations within a certain distance of the centroid, weighted by the square of the inverse distance. Could anyone let me know which tool(s) should I use to get this outcome? Thanks very much in advance.

Alec

0 Kudos
22 Replies
ZHIZUO
by
Deactivated User

Hi Abdullah, the computer finally completed the calculations. But it seems that only the not_weighted tool worked while the weighted tool didn't work. After the calculations, the added field (the average temperature field in the tool) is still all zero. I tried the tool in a sub-sample of my data and it still did't work. Would you mind trying it as well and let me know where I went wrong? I have attached my working files here. The log file is for the weighted tool that didn't work. Thought it might help too?

0 Kudos
AbdullahAnter
Honored Contributor

No Zhi Zuo , this is the weighted according to your Expression:

Do it manual and you will see that the zero is logical number according to previous Expression

First select  by location for temp90 that with in a distance 100 km for any Arizona centroid as the following picture:

1.png

Then, calculate a distance for a round points using Near tool as the following picture:

2.png

Now, add field (Double) and calculate the square of the inverse distance as you and Dan agree

1 /( distance * distance )

and it will be so small number close to zero , so ArcGIS write it in the field as zero

look for the picture:

3.png

so it is so logical that if you multiply Zero for Temperature value will equal zero too.

0 Kudos
ZHIZUO
by
Deactivated User
I was not expecting zeros although the results would still be quite small because of the inverse squared distance weighting. But in the weighted model, the result should be the sum of all weighted temperature within 100kms of one county centroid. I start to think this approach is not making much sense. The non-weighted model probably makes more sense. For example, for one particular county centroid, if there are 4 temperature points (89, 91, 85, 93), the average temperature is 89.5. If their distances to the county centroid is 10, 20, 50, 80km respectively. The weighted temperature for this county would be the sum of 89/(10*10), 91/(20*20), 85/(50*50), and 93/(80*80), which is 1.166. This is not making sense at all. I think I will use the non-weighted model. Thank you very much!
0 Kudos