This task is fairly easy if you use spatial databases. You can use Spatialite database for your needs. Use spatialite_gui to create spatialite database and import your shp-files into it (there is a 'Load shapefile' button at the toolbar).
Once you have your data inside spatialite database you just need to run a query to get needed information. Assuming that you have 2 tables:
points
with fields: pkuid
- primary key (id); grass_area
- field to be populated with the area of grassland that is covered by buffer from this point; geometry
- the geometry (points) is stored here;
grassland
with fields: pkuid
- primary key (id); geometry` - the geometry (polygons or myltipoligons) is stored here;
and you don't concern that same parts of grassland will be counted in several buffers (if I understood your question correctly) run the code below.
At first we need to create buffers and store them in temporary table buff
(if buffers are needed only for calculations there is no point in permanent table for them).
CREATE TEMPORARY TABLE buff AS
SELECT pkuid, ST_Buffer(geometry, 50) AS geom FROM points; /* 50 - is your buffer radius */
ST_Buffer
is the function that creates buffers. If grassland table
consists only of grassland polygons and has fairly small amount of objects in it we (for simplicity of query) can just merge them with each other to get single multipolygon to work with. Run following querry to populate grass_area
field with area of intersection of the given buffer
UPDATE points
SET grass_area = (SELECT ST_Area(
(SELECT ST_Intersection(
(SELECT ST_Union(geometry) FROM grassland),
(SELECT geom FROM buff WHERE points.pkuid == buff.pkuid)
)
)
)
);
The main function that was used here are ST_Area
(calculates area of the given geometry), ST_Intersection
(return intersection of given geometries), ST_Union
(return a union of given geometries). Functions are described here.
Now we can get rid of buffers:
DROP TABLE buff;
You can run these queries either from Spatialite_GUI or from DB Manager in QGIS (hit SQL Window button in DB Manager).