Attributes of neighboring polygons

Tom D'Avello davello at sogis.il.nrcs.usda.gov
Mon Oct 23 08:00:00 EDT 1995


This will work (uses raster, not vector):
1) Reclass to get class of interest,eg  soil map unit, land cover class etc..
2) do an r.clump on it
3) grow a one cell ring around ea clump using r.mapcalc:
     sssa.cl.grow = if(sssa.cl,sssa.cl,\
                if(sssa.cl[0,-1],sssa.cl[0,-1],\
                if(sssa.cl[0,1],sssa.cl[0,1],\
                if(sssa.cl[-1,0],sssa.cl[-1,0],\
                if(sssa.cl[1,0],sssa.cl[1,0])))))
4) do r.stats on the output of #3 with the beginning map. This will
   give area of adjacent polygons for each clump (unique poly) for
   a given class. 

You can wind up with a lot of data to sort through, but with the help of
a dbms, its not hard to find combinations that should NOT occur and then
trace those to the offending clumps(polys). Simple histograms are helpful
also. The last one I did, about 5 map units accounted for 85%+ of the 
adjacency, while another 40 or 50 map units made up the rest. Good luck.

Tom D'Avello
USDA-NRCS
Champaign,IL
davello at sogis.il.nrcs.usda.gov


----- Begin Included Message -----
We need a way in GRASS 4.1 to check for attributes of neighboring
polygons for two reasons:

David Hoover
a16dhoover at attmail.com
----- End Included Message -----







More information about the grass-user mailing list