📜  geopandas 数据框到 ogr 层 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:35.326000             🧑  作者: Mango

代码示例1
import geopandas as gpd
from osgeo import ogr

# Read file into GeoDataFrame
data = gpd.read_file("my_shapefile.shp")

# Pass the GeoDataFrame into ogr as GeoJson
shp = ogr.Open(data.to_json())

# Do your stuff with ogr ...