I have a shp
that I have improted in Python with geopandas
. I need to extract the bounding box as a WKT to be use in another step of my code. I know how to get to the bbox but I am stuck in convertign that into WKT format. I could write a work-around but I am looking for a more direct or native way if it exists. Any idea how to achive this? Below an example code
import geopandas as gpd
# 1. import shp
shp = gpd.read_file('your.shp')
# 2. Extract bounds
bbox = shp.bounds
# 3. Convert bbox to WKT
?