I have a geopandas GeoDataFrame with Polygon geometry and I am calculating the area of the polygon, however, I am not sure what the unit is for the area.
import geopandas as gpd
from shapely.geometry import Polygon
# create two dummy polygons
poly1 = Polygon([(35.8,-98.666), (35.81,-98.656), (35.822,-98.662), (35.824,-98.678)])
poly2 = Polygon([(35.527,-98.709), (35.537,-98.699), (35.55,-98.706), (35.552,-98.722)])
# create a geopandas DataFrame with two rows
data = {'name': ['Polygon 1', 'Polygon 2'], 'geometry': [poly1, poly2]}
df = gpd.GeoDataFrame(data, crs='EPSG:4326')
I'd like to reproject the geometry and calculate the area in square meters or another linear unit, however, I have been having issues with re-projection and transforming geometries:
`df['geometry'][0].area`
when I attempt to convert the crs
to a projected coordinate reference
system, I get Polygon (Inf Inf....)
.
df.to_crs('EPSG:32610', inplace=True)
df.crs
Expected output is to calculate the area()
in square meters
units.
poly1 = Polygon([(-125,49), (-124,49), (-124,50), (-125,50)])
. Or provide us with some actual data so we can test and replicate.