I am just trying to understand why Geopandas and QGIS might calculate areas differently despite using exactly the same shapefiles and exactly the same projections.
Both shapefiles are using EPSG:53032 - Sphere Azimuthal Equidistant. Proj4 string is:
+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs
Despite this both have returned similar, but substantially different results.
QGIS Results:
Geopandas Results:
FYI:
- QGIS results were calculated using the $area function in the field calculator
- Shapefiles are accessible here if you want to play with them.
- Geopandas code is below:
import pandas as pd
import geopandas as gpd
# Import Shapefiles from Google Drive
gdf = gpd.read_file('https://drive.google.com/uc?export=download&id=1RnniXEYTJAfazYKQBMIRphj_gloK9uSm')
# Update CRS
newcrs = "+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"
gdf = gdf.to_crs(newcrs)
gdf["area"] = (((gdf['geometry'].area)/1000)/1000) # Divited by 1000 to convert into metres
gdf.sort_values(['area'], ascending = False)