# How to calculate percentage of selected area from DEM?

I am working with elevation data and performed a local operation to convert it from meters to feet.

I am interested in finding the area (expressed in percentage) that is above 4,000 feet, but I am having difficulty recalling how to do this.

• possible duplicate of Measuring area of raster classes? – Chris W Nov 26 '14 at 19:30
• @ChrisW This relates to floating point elevation data, which is different than integer raster data in your possible duplicate example. I recommend keeping this open. – Aaron Nov 26 '14 at 19:39
• @Aaron Actually the original data in that question (KD raster output) was floating point (see Fezter's answer and comments on it). A couple of the solutions specifically mention reclassifying it, which is pretty much the same thing both answers here do (albeit with different methods). In my opinion, it's still a duplicate. The primary difference is there's only two classes here - above and below target elevation. – Chris W Nov 26 '14 at 20:02
• @ChrisW Good call, KDE output is floating point. However, we cannot be certain that the KDE was not converted to integer based on the title of the post "measuring area of raster classes". Best to keep both posts and play it safe in my opinion; – Aaron Nov 26 '14 at 20:20
• @Aaron Um, I'm the one that edited the title of that question in order generalize it specifically so that it could be used as a canonical question for in the future, like this one. The original title specified direct KDE output, as does the current question body. Your own answer's first step is to Reclassify. Not every duplicate has to be closed, and if we want both that's fine. But the methods outlined in either question will solve the problem. Actually with the question itself (raster area) and my answer there (possibly the Python one too) integer or floating point is irrelevant. – Chris W Nov 26 '14 at 20:33

You can use the Con (Spatial Analyst) tool to calculate the area of specified elevation values. In this example, I stated that I wanted all elevation values of a floating point DEM > 400 = 1, else = 0. The black and yellow image is the result (Figure 1). Then, simply open the attribute table and look at the count next to the Value = 1 row (Figure 2). These units will be in map units, so in this case 350,850 m^2 or 0.35 km^2. As a percentage, elevation values >400m make up 39% of the area.

Figure 1 Figure 2 If your elevation raster is integer, Build Raster Attribute Table. Then, select the rows in the table of interest, and look at the Statistics for the Count field (right-click 'Count' -> Statistics). The SUM value is the number of pixels selected. Multiply this value by the area of one pixel (raster layer properties -> Source tab -> cell size). Repeat with no selection to get total area, or extract from raster properties (Source tab -> Columns and Rows). Divide to get percentage.

If your elevation raster is not integer, make it so, perhaps using Int or Reclassify.