1/数据下载(首先感谢earthexplorer提供了免费的全球DEM数据)

  下载地址  https://lta.cr.usgs.gov/GTOPO30  ,首先要注册才可以下载,登陆网站后点击getData按钮,

再点击Data Set 这个tab,然后在Data Set Search:中输入GTOPO30进行搜索,在最下方点击result按钮。就会进入以下界面:

这里就可以下载全球范围的DEM数据。

2、geoserver发布前准备

因为从上面所指示的地址下载的数据类型是16 byte的geoTiff图像,而我们这次使用的geoServer中的 image pyramid plug-in这个插件,此插件需要的geoTiff的格式是

8 or 12 byte类型的geotiff,所以我们需要格式转化。我这里有一个java编写的工具可以把16位的geotiff转化为8位的geotiff。下载地址: https://github.com/kaktus40/Cesium-GeoserverTerrainProvider

此地址下载的zip文件中包含GeotiffTranslate.jar工具,就是我们需要的,(具体使用方法请阅读.me文件)。

3、geoserver发布

以下英文地址( http://docs.geoserver.org/latest/en/user/tutorials/imagepyramid/imagepyramid.html )

For this tutorial we have prepared a sample BlueMarble TNG subset in GeoTIFF form. The image is tiled and JPEG compressed, without overviews. Not exactly what you’d want to use for high performance data serving, but good for redistribution and as a starting point to build a pyramid.

In order to build the pyramid we’ll use the gdal_retile.py utility, part of the GDAL command line utilities and available for various operating systems (if you’re using Microsoft Windows look for FWTools).

The following commands will build a pyramid on disk:

mkdir bmpyramid
gdal_retile.py -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES" -co "COMPRESS=JPEG" -targetDir bmpyramid bmreduced.tiff

The gdal_retile.py user guide provides a detailed explanation for all the possible parameters, here is a description of the ones used in the command line above:

  • -v: verbose output, allows the user to see each file creation scroll by, thus knowing progress is being made (a big pyramid construction can take hours)
  • -r bilinear: use bilinear interpolation when building the lower resolution levels. This is key to get good image quality without asking GeoServer to perform expensive interpolations in memory
  • -levels 4: the number of levels in the pyramid
  • -ps 2048 2048: each tile in the pyramid will be a 2048x2048 GeoTIFF
  • -co “TILED=YES”: each GeoTIFF tile in the pyramid will be inner tiled
  • -co “COMPRESS=JPEG”: each GeoTIFF tile in the pyramid will be JPEG compressed (trades small size for higher performance, try out it without this parameter too)
  • -targetDir bmpyramid: build the pyramid in the bmpyramid directory. The target directory must exist and be empty
  • bmreduced.tiff: the source file

This will produce a number of TIFF files in bmpyramid along with the sub-directories 12, 3, and 4.

Once that is done, and assuming the GeoServer image pyramid plug-in is already installed, it’s possible to create the coverage store by pointing at the directory containing the pyramid and clicking save:

Configuring a image pyramid store

When clicking save the store will look into the directory, recognize a gdal_retile generated structure and perform some background operations:

  • move all tiff files in the root to a newly create directory 0
  • create an image mosaic in all sub-directories (shapefile index plus property file)
  • create the root property file describing the whole pyramid structure

Once that is done the user will be asked to choose a coverage, which will be named after the pyramid root directory:

Choosing the coverage for publishing

Publish the layer, and then setup the layer parameter USE_JAI_IMAGEREAD to false to get better scalability:

Tuning the pyramid parameters

Submit and go to the preview, the pyramid should be ready to use:

Previewing the pyramid

Notes on big pyramids

The code that is auto-creating the pyramid indexes and metadata files might take time to run, especially if:

  • the pyramid zero level is composed of many thousands of files
  • the system is busy with the disk already and that results in higher times to move all the files to the 0directory

If the delay is too high the request to create the store will time out and might break the pyramid creation. So, in case of very big pyramids consider loosing some of the comfort and creating the 0 directory and moving the files by hand:

cd bmpyramid
mkdir 0
mv *.tiff 0

geoServer 发布geoTiff格式的DEM数据的更多相关文章

  1. Geoserver 发布shp格式地图服务

    本文实践参考https://blog.csdn.net/zj3172172173/article/details/53336704 第一步: 安装geoserver . 自己去官方下载一个安装包 第二 ...

  2. 使用GeoServer发布shp数据为WMS服务和WFS服务

    使用GeoServer发布shp数据为WMS服务和WFS服务 1安装GeoServer 2使用GeoServer上传数据 3使用GeoServer发布数据为WMS和WFS 看完本教程,你将学会安装Ge ...

  3. geoserver发布mysql表数据

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.环境部署 Geoserver中并不自带mysql数据发布功能,需要下 ...

  4. JavaWeb和WebGIS学习笔记(三)——GeoServer 发布shp数据地图

    系列链接: Java web与web gis学习笔记(一)--Tomcat环境搭建 Java web与web gis学习笔记(二)--百度地图API调用 JavaWeb和WebGIS学习笔记(三)-- ...

  5. Geoserver发布Oracle数据

    在Geoserver安装包中,默认是不能发布Oracle数据库里的数据的,只能发布postgis.shp等数据,详细如截图: 如果想发布oracle数据,得安装相应版本的关于oracle数据源的插件, ...

  6. GeoServer发布Shapfile、PostGIS数据

    GeoServer发布Shapfile.PostGIS数据 一.GeoServer发布Shapfile数据 1.1 创建工作区 1.1.1 工作区 1.2 在工作区中加入新的数据存储 1.2.1 数据 ...

  7. Cesium调用Geoserver发布的 WMS、WFS服务

    1 GeoServer服务发布 1.1 WMS服务 下载GeoServer安装版安装,同时安装geopackage扩展,以备使用.使用XX地图下载器下载地图,导出成GeoPackage地图文件. (1 ...

  8. geoserver 发布无坐标png

    1.geoserver 安装一些插件的时候,直接去http://docs.geoserver.org/ 官网,选择自己geoserver对应的版本的插件就可以了. 2.geoserver 发布自身带有 ...

  9. openlayer3 加载geoserver发布的WFS服务

    转自原文 openlayer3加载geoserver发布的WFS服务 openlayers3调用GeoServer发布的wfs 1 参考一 1.1 问题 openlayer3加载WFS存在跨域问题,需 ...

随机推荐

  1. Sublime Text 3 使用

    Sublime Text3使用 下载安装 参考:http://www.downza.cn/soft/187996.html Sublime Text Build 3126 x64 Setup.exe下 ...

  2. 100怎么变成100.00 || undefined在数字环境下是:NaN || null在数字环境下是0 || 数组的toString()方法把每个元素变成字符串,拼在一起以逗号隔开 || 空数组转换成字符串后是什么?

    100怎么变成100.00?

  3. AOP和IOC的作用

    IOC:控制反转,是一种设计模式.一层含义是控制权的转移:由传统的在程序中控制依赖转移到由容器来控制:第二层是依赖注入:将相互依赖的对象分离,在spring配置文件中描述他们的依赖关系.他们的依赖关系 ...

  4. Mac下命令行中用sublime打开指定文件 设置方法

    sublime2版本 官网提供的方法:sublime2 官网提供的方法是:ln -s "/Applications/Sublime Text 2.app/Contents/SharedSup ...

  5. c++ stl容器set成员函数介绍及set集合插入,遍历等用法举例

    c++ stl集合set介绍 c++ stl集合(Set)是一种包含已排序对象的关联容器.set/multiset会根据待定的排序准则,自动将元素排序.两者不同在于前者不允许元素重复,而后者允许. 1 ...

  6. 8天掌握EF的Code First开发系列之5 视图、存储过程和异步API

    本文出自8天掌握EF的Code First开发系列,经过自己的实践整理出来. 本篇目录 视图View 存储过程 异步API 本章小结 咱们接着上一篇继续深入学习,这一篇说说Entity Framewo ...

  7. linux系统PXE+Kickstart自动安装系统

    一.PXEPXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服 ...

  8. 用Java写算法之归并排序

    转自:http://flyingcat2013.blog.51cto.com/7061638/1281026 前面的三种排序算法(冒泡排序,选择排序,插入排序)在平均情况下均为O(n^2)复杂度,在处 ...

  9. Python全栈考试-部分试题(精选)

    Python全栈考试(一) Python全栈考试(一) 1.执行 Python 脚本的两种方式 答:1.>>python ../pyhton.py 2. >>python.py ...

  10. Win7与Mint双系统安装体验

    双系统安装前的准备 1.安装前的准备 安装双系统可能会对磁盘文件带来一些影响,为了避免在安装过程中由于系统瘫痪造成不必要的损失,所以我们在准备安装双系统之前,要对PC机中的重要文件进行备份,对资料要做 ...