I have a GeoPandas DataFrame with bounds geometry.
import pandas as pd
import geopandas as gpd
gdf = gpd.GeoDataFrame({
'id': [0, 1],
'b': [((40.6494140625, -86.7919921875), (40.69335937...)),
((39.55078125, -93.8232421875), (39.5947265625...))]
})
gdf['b'][0]
Bounds(sw=SouthWest(lat=32.8271484375, lon=-96.8115234375), ne=NorthEast(lat=32.87109375, lon=-96.767578125))
print(type(gdf['b'][0]))
<class 'geolib.geohash.Bounds'>
How do I turn Bounds
into Polygon
geometry type?
Like,
Polygon((40.6494140625, -86.7919921875), (40.69335937...))