如何建立地球上任何一个区域的地形3d模型,并添加卫星或地貌贴图

一、如何截取大范围的google地貌图片
设置相应的的范围, 并利用phantomjs截屏。需要网络能流畅访问googlemap。

google导出的图片中可以是卫星图等各种图片,可以包含各种道路、地理名称等辅助信息,都是可以配置的。

相关github项目

二、如何建立任何地球上任何一个区域的地形3d模型 (geotiff 转换 obj文件)
1. 地形dem数据的获取
http://gisgeography.com/free-global-dem-data-sources/
可以从usgs上下载到相关区域的tif文件。
2. 安装qgis
http://www.qgis.org/en/site/forusers/download.html
可以用qgis或者GDAL合并上一步下载的多个tif
https://gis.stackexchange.com/questions/192395/merging-tif-images-into-a-single-geotiff-with-qgis
3. 安装qgis2threejs插件

  • 5
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
可以使用 Qt 3D Studio 和 QML 来实现这个功能。首先,需要创建一个 3D 场景并加载模型。然后,使用 QML 中的鼠标事件来检测用户选择的点,并在该点处添加一个小球。以下是示例代码: ``` import Qt3D.Core 2.0 import Qt3D.Render 2.0 import Qt3D.Input 2.0 import Qt3D.Extras 2.0 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 import QtQuick.Scene3D 2.0 Scene3D { id: scene anchors.fill: parent Entity { id: rootEntity // 加载模型 components: [ RenderSettings { activeFrameGraph: ForwardRenderer { clearColor: "lightblue" } }, SceneLoader { source: "model.obj" } ] // 添加小球 MouseHandler { id: mouseHandler sourceDevice: scene.inputDevice onClicked: { var mouse = Qt.point(pointer.x, pointer.y) var ray = camera.ray(mouse) var intersection = rootEntity.rayIntersects(ray) if (intersection.length > 0) { var point = intersection[0].point var sphere = SphereMesh { radius: 0.1 } var sphereEntity = Entity { components: [ Transform { translation: point }, sphere ] } rootEntity.addChild(sphereEntity) } } } // 相机 Camera { id: camera projectionType: CameraLens.PerspectiveProjection fieldOfView: 45 aspectRatio: scene.width / scene.height nearPlane : 0.1 farPlane : 1000.0 position: Qt.vector3d(0, 0, 10) upVector: Qt.vector3d(0, 1, 0) viewCenter: Qt.vector3d(0, 0, 0) } } } ``` 这段代码创建了一个场景,加载了一个名为 "model.obj" 的模型,并添加一个鼠标事件处理程序来检测用户选择的点。当用户单击场景中的某个点时,该代码会在该点处添加一个小球。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值