I have a polygon layer of territory and point layer with values from measurements. I must to add sum values from points layer to polygon layer . How to do this in PostGIS?
Supplemented:
Point layer is:
id|name |value
1 |first |547051
2 |second |539949
3 |third |539864
4 |fourth |539724
5 |fifth |500208
Pattern layer:
and result must be
id|name|sum
55|I5 |1619037
61|H7 |1047259
point_id|location|value
1|<A>|42
2|<A>|23
3|<B>|99
? If location <A> lies inside the polygon <P1> you want asum
field of polygon <P1> to read 65 (42+23)?