river-sim/read_shp.py
2024-11-07 17:53:11 +08:00

13 lines
207 B
Python

import geopandas as gpd
river_data = gpd.read_file("lz.in/river.shp")
# 提取type为4的feature
river_type_4 = river_data[river_data["Type"] == 4]
print(river_type_4.shape)
print(river_type_4.head())