[winGRASS] average slope for a polygon?

Jeff D. Hamann jeff_hamann at hamanndonald.com
Fri Jan 3 13:59:20 EST 2003


I have been trying to get the average slope for a polygon (actually all the
polygons) for a vector file created from r.poly from a classified satellite
image and I've just run out of steam. I've exported the slope file
(generated from r.slope.aspect) into arc/info and converted the grid to
points and exported the points (of course you have to export the ungenerate
file and the attribute file as two separate files then link them together
after importing them into access! ugh). It's the same process as simply:

r.to.sites -z input=slp30.testshed.rast output=slp30.testshed.site
s.out.ascii -di sites=slp30.testshed.site fs=, >slope.points.out

which would have been much better (expect for the ERROR: G_malloc: out of
memory message I kept getting with GRASS 5.0.0.pre3 on cygwin). I then have
to read this file in and compute the average slope for each of polygons. Is
there a way to do this in GRASS?

And more questions...

1) has anyone found decent docs on getting odbc to work with grass under
cygwin (do we have to use unixodbc or win32 odbc?)
2) what's the story on getting "native" multiple attribute support on any
version of grass 5.0/5.1?
3) is there a version of grass5.0.0 for cygwin yet? not one of the
pre-release version.

I would really love to turn arc/info all together but can't just yet. keep
up the great work.

Jeff.




More information about the grass-windows mailing list