One way to do this is to create a new point layer that contains information about overlapping forest areas. If your point layer has an attribute 'height' and each forest polygon an attribute 'forest' which is 1 for all forest areas:
- Select Vector|Data Management Tools|Join attributes by location;
- Select the point layer as the 'target vector layer' and the polygon as the 'join vector layer';
- Make sure to select 'keep all records' so you keep all your points;
Enter an output shapefile (like points_forestoverlap.shp) and click 'ok'; add to the TOC (layers).
Your new points layer will have a 'forest' attribute - forest areas will be 1 (or whatever value was in the polygon layer) and all non-overlapping points will have NULL. I have not found a way to do calculations using 'NULL' in the field calculator so you have to replace these with 0:
- Open the attribute table and click the 'forest' column heading to sort it;
- Select all the rows with NULL under 'forest';
- Start editing, then open the field calculator;
- Keep 'Only update selected features', and select 'Update existing field', and select 'forest' in the dropdown box;
- Enter 0 in the Expression text box and click OK - all the NULLS are replaced by 0.
- Open the field calculator again, deselect 'Only update selected features', and create a new field new_heights (decimal);
- Enter the expression
"height" - (("forest" = 1) * 15) then OK; this will test if it's a forest area ("forest" =1), returning 1, and multiplying by your correction factor.
You could also (in step 6) choose to update the existing heights field, and use the same expression.
I suspect you're doing this to correct for canopy height in a forest area? You could have a 'canopy' attribute in your forest polygon and use that to do your correction, thus you could have different canopy heights for different forest areas.