I am working with QGIS 3.22.4 and want to analyse the output of MaxEnt. Therefore, I have a raster layer showing the habitat suitability for my species in the whole oceans as .asc-data type. I have already classified the raster using the raster calculator: ("a@1" < 0.25)*1 + (( "a@1" >= 0.25) AND ("a@1" < 0.5))*2 + (("a@1" >=0.5) AND ("a@1" <0.75))*3 + ("a@1" >=0.75)*4

This generated a raster layer where every pixel has a value of 1, 2, 3 or 4. So far so good.

Now I want to calculate the area of every class in a metric unit. But either I try calculating the area with CRS: 4326 - WGS 84 and the area is not calculated in a unit I can work with (it is a superscript 02) or I try calculating the area with different projected CRS (e.g. 54004 - World Mercator; 3857 - WGS 84 Pseudo Mercator) and get orders of magnitude that can not be correct. Like for the whole ocean I get a total of somewhat around 42.500m²:

enter image description here

  • 1
    What tool/process are you using to calculate the area? Commented May 27, 2023 at 7:05
  • I classify the raster (orignal CRS: 4326) as explained in my question. Afterwards, I reproject the output to CRS: 54034 and use unique raster values for the reprojected layer. As result, I get the outcome I searched for (area for all 4 classes in m2).
    – Ben
    Commented May 30, 2023 at 13:56

1 Answer 1


You have to use a CRS that

  • 1 is a projected (ot geographic) CRS, thus units not in degrees, but in meters (or any other length unit) and

  • 2 does not distaort area. So you need an equal area CRS. Mercator projection disorts area heavily, so never use it for area calculations. For local areas, you could use one of the UTM zones, but this does not work for a worldwide dataset.

What to do? Use an equal area projection like e.g. World Cylindrical Equal Area (ESRI:54034). Reproject your layer to this CRS, than calculate area.

Another option is to calculate ellipsoidal areas: in QGIS field calculator, use the function $area(). Like this, you can get "correct" measurements regardless of the layer's CRS (but depending on the ellipsoid set for the CRS).

For background, see https://gis.stackexchange.com/a/408399/88814 and https://gis.stackexchange.com/a/397278/88814

  • 1
    Many thanks, this helped me out. Problem solved
    – Ben
    Commented May 30, 2023 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.