I have a geodataframe
that has no assigned crs
. I want to create a column/field called 'area' that has the area calculated as square feet, not meters or km, using geopandas. Note: this geodataframe
was created by doing an attribute join between 2 previous geodataframes that had the projection: +proj=longlat +datum=WGS84 +no_defs
[38]: print(bldgs_merged.crs)
None
Something like this:
bldgs_merged["bldg_sqft"] = bldgs_merged['geometry'].area/ 10**6
I know that the crs/projection first needs to be in a crs/projection that uses square feet. My question is, what projection do I set it to? Will WGS 84/EPSG 4326 work? Do I have to do something to set the units to be square feet?
bldgs_merged = bldgs_merged.to_crs({'init': 'epsg:4326'})
Best Answer
the
area
attribute of a GeoDataFrame is calculated based on projected coordinates not latitude and logitude, this means that the area you are calculating is false.First you need to reproject the GeoDataFrame to a different CRS which units is either meter or feet, and then measure the area using
area
attribute.PS:
EPSG:4326
is using degrees as units, try theEPSG:3857
which uses meters as unit or if you know the location of your polygons choose a projection from a national grid