欢迎光临散文网 会员登陆 & 注册

blender+gis有效构建智慧城市

2021-06-24 15:28 作者:伴学iclone教学  | 我要投稿

blenderGIS下载

no imageio解决方法:

1、手动下载imageio包

2、下载安装GDAL和numpy

3、配置wendows的环境变量;

4、下载安装FreeImage-3.15.1-win64.dll

添加国内地图


做地形数据处理建模的插件blenderGIS

blenderGIS下载

https://github.com/domlysz/BlenderGIS


no imageio解决方法:

https://github.com/domlysz/BlenderGIS/issues/265

https://github.com/domlysz/BlenderGIS/wiki/FAQ

1、手动下载imageio包

https://github.com/imageio/imageio


下载后需要将下载的imageio的文件拷贝至…\BlenderGIS\core\lib\imageio

我的路径为:C:\Users\admin\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\BlenderGIS\core\lib\imageio

2、下载安装GDAL和numpy

GDAL的运行需要numpy来运行,一般numpy已经安装在了blender自带的python里,带可能会出现版本与GDAL不匹配的问题,最好的办法就是自己安装numpy。

GDAL下载地址:在下载地址中找到对应的电脑系统位数和python版本

https://github.com/domlysz/BlenderGIS/wiki/How-to-install-GDAL

numpy下载地址:下载对应的版本,下载后的安装步骤和安装GDAL步骤一样。

https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

将下载好的GDAL和numpy文件放置在blender自带的python文件目录:blender_install_folder\2.7x\python\bin

我的路径为:C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin 

打开cad命令提示符窗口,以管理员身份打开,将命令运行位置修改至在blender自带的python文件目录cd blender_install_folder\2.8x\python\bin

我的目录为:cd C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\bin

输入命令python.exe -m pip install GDAL-3.0.4-cp37-cp37m-win_amd64.whl

随后GDAL将被安装至blender_install_folder\2.8x\python\lib\site-packages\osgeo

输入命令python.exe -m pip install numpy-1.18.5+mkl-cp37-cp37m-win_amd64.whl


3、配置wendows的环境变量;

打开高级系统设置:系统属性>高级>环境变量

变量名称GDAL_DATA

变量路径blender_install_folder\2.8x\python\lib\site-packages\osgeo\data\gdal

我的路径为:C:\Program Files\Blender Foundation\Blender 2.83\2.83\python\lib\site-packages\osgeo\data\gdal

环境变量配置好后可以在打开bender python console

输入以下命令,不报错说明安装配置成功

from osgeo import gdal

from osgeo import gdalnumeric

验证GDAL_DATA环境变量是否配置成功,输入以下命令;

from osgeo import osr

osr.SpatialReference().ImportFromProj4(’+init=epsg:3857’)

返回值为0则成功


4、下载安装FreeImage-3.15.1-win64.dll

下载后拷贝至…\BlenderGIS\core\lib\imageio\resources\freeimage

这个freeimage文件夹如果没有需要手动创建

我的路径为:C:\Users\admin\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\BlenderGIS\core\lib\imageio\resources\freeimage

下载地址:https://github.com/imageio/imageio-binaries/tree/master/freeimage



添加国内地图

在basemaps文件夹里中编辑.py的文件添加国内地图


blender+gis有效构建智慧城市的评论 (共 条)

分享到微博请遵守国家法律