Cesium 加载自定义DEM数据

您所在的位置:网站首页 GIS的DEM工具在那里 Cesium 加载自定义DEM数据

Cesium 加载自定义DEM数据

2023-05-31 04:36| 来源: 网络整理| 查看: 265

Cesium 加载自定义DEM数据 原创

GIS韩 2023-05-28 00:22:27 博主文章分类:Cesium ©著作权

文章标签 Cesium 地形 terrain DEM Access 文章分类 JavaScript 前端开发

©著作权归作者所有:来自51CTO博客作者GIS韩的原创作品,请联系作者获取转载授权,否则将追究法律责任

下载数据

从地理空间数据云 可以下载DEM数据,但是要注意

将坐标系转为WGS84的需要将格式转换为tifDEM 瓦片生成

使用Cesium地形生成工具 ,部署和使用方法,里面很详细,这里不再详细介绍。

注意点:

在工具安装的过程中,如果你的电脑安装过ArcGIS的桌面程序,它会在C盘生成一个python的文件夹,我们就不必要安装Python了。部署发布瓦片

将生成的瓦片的整个文件夹使用nginx或者IIS等进行发布,这里我使用的是nginx,这里需要设置允许跨域

#charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; if ($request_method = OPTIONS){ add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Max-Age' 1728000; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; add_header 'Access-Control-Allow-Headers' 'reqid, nid, host, x-real-ip, x-forwarded-ip, event-type, event-id, accept, content-type'; } }在Cesium里加载使用let terrainLayer = new Cesium.CesiumTerrainProvider({ url: "http://localhost/terrain_tiles", // 到文件夹 }); const viewer = new Cesium.Viewer('map3d', { terrainProvider:terrainLayer, // imageryProvider:image_provider_item, baseLayerPicker:false, homeButton:false, infoBox:false, timeline:false, navigationHelpButton:false, geocoder:false, sceneModePicker:false, animation:false, fullscreenButton:false });测试效果

在Cesium 查看如下图

Cesium 加载自定义DEM数据_DEM

收藏 评论 分享 举报

上一篇:Centos7.4上部署PostgreSQL12和PostGIS3.0

下一篇:基于python和GDAL实现遥感影像重采样(改变分辨率)



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3