When I open QGIS, add the layer, and calculate the areas of the shapefile via field calculator I get a different area than when I open QGIS and check "Enable on the fly CRS transformation" and calculate the area. This is despite making sure that the project and the layer have the same Coordinate system (same EPSG number). What am I doing wrong?
I have a shapefile with area calculations made with ArcGIS (not be me, the data was handed to me and I have no clue for which CRS the area was calculated with ArcGIS). The shapefile layer CRS is EPSG: 21781 (Switzerland). In QGIS, if I do not change the OTF settings and leave the project CRS as EPSG:4326 (WGS84) I get the same value as the ArcGIS area value. However, if I change the OTF before adding the layer to EPSG: 21781 I get different area values. As I understand this suggests that ArcGIS Area was calculated with the CRS EPSG: 4326.
First workflow:
- open QGIS
- project CRS: EPSG 4326
- add layer
- project CRS adapts automatically and is EPSG 21781 now
- calculate $area with field calculator
Second workflow:
- open QGIS
- project CRS: EPSG 4326
- Turn on OTF, set project CRS to EPSG 21781
- add layer
- calculate $area with field calculator
Step 5 of the first and second workflow DO NOT produce the same area.
$area
in the filed calculator. In short, on-the-fly affects how geometry is being displayed without altering the data de-facto. Thus it ismore likely that the error is due to the workflow.!shape.area!
should give the area according to the layer crs; than calculate geometry might work different. So it is hard to tell, exactly what was been done in arcgis, yet if you get the same result, e.g. degrees and not meters, it meens that the area calculation was indeed based upon the ESPG: 4326.