SO, in QGIS I have several points with 1km buffers around them; some of the buffers overlap. Within the buffers are a number of ponds, which I have a shapefile for. I want to calculate the area of pond within the buffers, but if one pond is covered by overlapping buffers, I do not want the area counted multiple times, which is the issue I'm dealing with right now. Can this be done? Creating an intersect shapefile then adding geometry columns counts overlapped ponds multiple times.
[GIS] Calculating Area of Intersecting Polygons and Buffers
areaqgis
Related Solutions
Question part 1 - how do you create combined buffers, or convert existing buffers into one?
I don't know what version of QGIS you are using, or whether this feature is missing in older versions, but the Buffer tool has an option to "Dissolve buffer results". Note the pointer position in the following image:
Note that because my data are different, I've set the buffer distance to 200 m. You should set yours to 1609 m = 1 mile.
Question part 2 - How would I then find the number of ponds (onsite and offsite, not counting the pond being queried) within 1 km of each on-site pond (individually).
While you may want to dissolve buffers for visual display, you cannot use dissolved buffers to answer this question, since it sounds like you want a count for each pond separately. So even though the buffers overlap, that is OK, since a pond could fall in the search radius of more than one onsite pond, and you want it to count for each. Use Vector→Analysis Tools→Points in polygon
:
Since each buffer was constructed from a point, to get the count of ponds not including the central pond, use the Field Calculator tool to update the pond_count field to pond_count less one. Open the attribute table and click the "Toggle editing mode" button in the upper left. Then click the "Open Field Calculator" button in the upper right. Check "Update existing field", set the field to pond_count, and in the Expression box enter pond_count - 1
:
Hit OK once only, and close the dialog. Save your edits and toggle editing off.
If the ponds have some kind of unique identifier, it should propagate through each step of the process to your final shapefile, which will be a polygon layer of buffers with the count of all ponds within a 1 mile radius.
Sub-question - if one of the buffers dissects a symbol for a pond will it count the pond, or only if the centre point falls within the buffer? (i.e. could the size of the symbol affect the result?)
QGIS and other GISes treat points as a mathematical point (i.e., infinitesimally small). The size of the symbol you use to visualize your data is irrelevant to the calculation. Some spatial query operations may have different results depending on whether a point falls exactly on a polygon boundary (in general GIS terminology, the difference between "contains" and "contains completely"), but I'm pretty sure the QGIS Points-in-Polygon tool will count a point on the edge as being within the polygon. I haven't tested it though. It's unlikely to make a difference in this dataset. It's more likely to be important in a situation where points and polygons are constructed on some common base, such as a street grid, and you need to decide what to do with points that fall at the exact boundary between two neighboring polygons.
I would Intersect the buffers, turning the overlap into polygons.
Apply a Spatial Join from the original Points to assign the original ID, clear the ID's that don't have a match.
Join the two layers on the ID to compare Area. The buffers that overlapped have buffer.area > intersect.area.
Best Answer
When you run the buffer tool there is an option to "Dissolve Buffer Results". If you check this box then any buffers that overlap should be merged into one common feature. Therefore when you calculate the area of the pond that intersects the buffer it will only intersect one feature and not two overlapping features.
Update:
Hi Vito, in regards to your comment below I'm not sure why you would want to add a geometry column. To clear things up, the workflow I would use would be:
Create a buffer layer from your points as outlined above;
Find the intersect of the buffer layer and your ponds layer;
Project the intersect layer to a projected coordinate system;
For this intersect layer open the attribute table and select Toggle Edit Mode, then Field Calculator;
In the field calculator create a new decimal field called Area and from the function list choose Geometry, $area. Click OK; You should now have an an Area field showing the area for each feature in the units of the layer projection. Therefore to ensure this is square metres (or square feet), you should use a projected coordinate system (hence step 3).