Does anyone know how to calculate the area in km² for each altitudinal band (between 100 and 200, 200 and 300...) based on a DEM? I added the contour lines with a distance of 100 metres but could not find a way to modify them in order to allow area calculation. I am working with qgis 1.8.0. DEM is taken from ASTER.
My initial answer was wrong so im providing a new one:
As wuber said the best way to calculate the area to reclassify the parts of your dem you want measure, polygonize (raster to vector) then add the $area attribute. Here's a step-by-step example.
For the purpose of this example im using a DEM which can be downloaded from here.
- Open your DEM with QGIS. For the example DEM the upper and lower limits are approximately from elevation 3300 to 3550 m.
- You want measure the area which is between eg. 3400 and 3500.
- First you need to mark those area. You can use the
Raster Calculatorfrom the
- At the
Raster Calculatoruse the following formula :
(O44121a1@1 >= 3400 and O44121a1@1 <= 3500). This will create a mask marking with
1all the areas we're interested in.
Rastermenu again, Select the
Conversion->Polygonizetool. Select the Raster map you created in step 4 as input and also tick the
Field Nameoption. You can use whatever name you want.
- We only want two polygons. One polygon to mark the ares we are intrested in at the other to mark the polygons we are not intrested in. To group all the polygons to those two categories from
Geometry Tools -> Singleparts to MultipartsTool. Choose the polygon you created at step 5, and use the Field Name you chose.
- Open the attribute table of the shapefile you created in step 6, and click at the
field calculatorbutton (you need to be in edit mode first). choose to create a new column define the precision , and in the expression box bellow type
$area(or you can double click it from the list), and click OK.
- The new field should contain the area in MapUnits² with the choosen presision.