我正在使用 Cartopy 和 Metpy 创建新图形。当我尝试在我的地图上设置范围时使用谷歌代码实验室时:
track_line_gdf = geopandas.read_file('/content/al112017-020_5day_lin.shp')
cone_gdf = geopandas.read_file('/content/al112017-020_5day_lin.shp')
points_gdf = geopandas.read_file('/content/al112017-020_5day_pts.shp')
map_crs = ccrs.LambertConformal(central_latitude=35, central_longitude=100,
standard_parallels=(30, 60))
data_crs = ccrs.PlateCarree()
fig = plt.figure(figsize=(14 , 12))
ax = plt.subplot(1, 1, 1, projection=map_crs)
ax.set_extent([-90,-72, 20, 55]) #Problem line
我收到警告:“几何必须是点或线串”然后我的笔记本崩溃了。我尝试更改 ax.set_extent() 中的值,但仍然遇到“几何必须是点或线串”的相同问题,然后我的笔记本因“未知”原因而崩溃。我使用的数据也是飓风艾尔玛的形状文件。有没有人见过这个问题?感谢您的帮助!
PS我目前住在关岛,所以与美国大陆相比,我可能会在奇怪的时间做出回应。再次感谢你的帮助!