错误:解压缩需要16个字节的缓冲区

时间:2019-06-26 16:35:55

标签: python-3.x jupyter-notebook cartopy

以下代码给我一个错误: “错误:解压缩需要16个字节的缓冲区”

MLBatchprovider

我希望输出结果将是包含海岸线,河流和盆地三个要素的地图。我只有两个(见下图)。

Partial results I´m getting from the code above

当前由Anaconda Navigator 1.9.7安装
-Jupyter笔记本电脑5.7.8
-Cartopy 0.17.0

import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import seaborn as sns
import cartopy
import cartopy.crs as ccrs
from cartopy.io.shapereader import Reader

# Reading the data from shapefiles .shp
basin = Reader('C:\\...\\BasinCOL2014.shp')

fig = plt.figure (figsize = (10,5))
ax = fig.add_subplot (1, 1, 1, projection = ccrs.PlateCarree(central_longitude=0, globe=None))
ax.set_extent ([-66.0, -80.0, -5.0, 13.0])
ax.gridlines (draw_labels = True)

# Aditional elements to display in map
ax.coastlines  (resolution = '10m')
ax.add_feature (cartopy.feature.RIVERS, linewidth=4)
ax.add_geometries (basin.geometries(),     crs = ccrs.Geodetic(), edgecolor = 't', facecolor = 'none')

0 个答案:

没有答案