I want to create a buffer (20km) from a line, and then separate them into two polygons with the line is boundary between two polygons (picture demo below. The desired output would be two polygons such as polygon 1 and 2). I tried to use geopandas but it does not work as I expected.
Here is sample code and data.
import geopandas as gpd
# the line vector data
data=gpd.read_file("https://raw.githubusercontent.com/tuyenhavan/test_data/main/Thailand_Cambodia_Line.json")
# make buffer. Data are already in UTM 48N system
data_explode=data.explode(index_parts=True)
# buffer 20km
buffer_20km=data_explode.buffer(20000)
geo_df=gpd.GeoDataFrame(geometry=buffer_20km)
dissolve=geo_df.dissolve()