- 积分
- 14
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2022-3-20
- 最后登录
- 1970-1-1
|
发表于 2022-3-22 16:43:29
|
显示全部楼层
王老师,您好!
我用下面的代码在meteoinfo里面想将图层导出为shapefile文件,但是一直提示No module named geopandas.
但是我已经通过命令行安装了geopandas
import geopandas
f = addfile('D:/1ClimateData/GDAS/gdas1.feb08.w4')
u = f['UWND'][0,'800','-90:90','-180:180']
v = f['VWND'][0,'800','-90:90','-180:180']
speed = sqrt(u*u+v*v)
#Plot
axesm()
geoshow('C:/MeteoInfo_2.3.4/MeteoInfo/map/country.shp')
layer = quiverm(u, v, speed, 10, size=8)
quiverkey(layer, 0.74, 0.18, 15, bbox={'edge':True, 'fill':True})
colorbar(layer)
title('Wind field')
yticks([20,40,60])
#import to shapefile
layer.to_file('./output/{}.shp'.format(os.path.basename(__file__).replace('.py', '')),
driver='ESRI Shapefile',
encoding='utf-8')[img]
|
|