2

I've been reading the QGIS manual and I've encounter a problem I don't know what to do. I downloaded data from OpenStreetMap and the raster from http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp The thing is that when I try to calculate the area it turns in REALLY small numbers such as 6.18e-06 I've tried with a couple of projections and it doesn't seem to work.

Any ideas?

  • by the way, I used WGS 84 and WGS 84/UTM zone 34S – Lucas Enrich Oct 29 '15 at 12:22
2

One less-nice feature of QGIS is that it uses the layer's Coordinate Reference System for calculations, not the project's. This means that if you use WGS84 data (such as OSM), $area calculates something weird. Latitude and Longitude are angles, so the area is something not metric.

You must save the layer to a projected, metric CRS if you want do calculate areas in meters. You can do this by right-clicking it and choosing "Save as".

Changing the project's CRS does not work. Changing the layer's CRS changes how QGIS interprets the values inside and is something you only want to do if you need to fix something (and you know exactly what you are doing).

1

If you don't want to reproject the layer, and you don't care about planimetric versus ellipsoidal area, I think you should be able to use something the expression area( transform( $geometry,'EPSG:4326','EPSG:whateveritisforyourproject')). That's instead of $area.

(Pardon any errors, going by memory, can't test right now).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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