# [postgis-users] How do you do neighborhood functions?

collin collin at socrates.Berkeley.EDU
Tue Apr 13 23:04:37 PDT 2004

```I probably should qualify my question. The datasets I will use this on
will ulitmately be larger than 2GB in size, thus, I can't use Arc/Info,
ArcGIS, MapInfo, or Fragstats for that matter, due to 32bit limits.
This is why I am trying to implement processing inside a database.

-- Collin

Craig Miller wrote:

>I would export the data out of PostGIS and use Fragstats.
>
>--Craig
>
>
>-----Original Message-----
>From: collin [mailto:collin at socrates.Berkeley.EDU]
>Sent: Tuesday, April 13, 2004 9:48 AM
>To: postgis
>Subject: [postgis-users] How do you do neighborhood functions?
>
>
>Greetings folks,
>
>Question:  I would like to find the average height (z2) of all the
>points within 10 meters of every point.  Any ideas on how to do this?
>I have point data from lidar (snippet below).  I made point geometry
>from the raw data.
>           time      |          x2         |          y2       |
>z2   |  int2 |                      geom2
>
>-------------+-----------------+----------------+---------+------+----------
>---------------------------------------
>161626.12404 | 10568414.29 |      4247026 | 388.2   |   75 |
>SRID=32610;POINT(10568414.29 4247026 388.2)
>161626.12407 | 10568414.31 |      4247026 | 388.26 |   74 |
>SRID=32610;POINT(10568414.31 4247026 388.26)
>161626.1241   | 10568414.33 | 4247026.01 | 388.33 |   75 |
>SRID=32610;POINT(10568414.33 4247026.01 388.33)
>
>I tried
>    UPDATE napatest SET z2avg10 = avg(z2)
>    WHERE point_inside_circle(geom_point_first, xf, yf, 10);
>but this only updated a single row.  z2avg10 is a new field I had added.
>
>Is there a standard method for performing neighborhood functions? i.e.
>any set of statistics for each and every row about their neighboring points.
>
>
>Collin
>GIS informatics researcher, UC Berkeley
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>

```