我有一个很大的GeoTIFF,我希望通过GeoServer(v.2.11)中的WMS进行流式传输 . 图像的大小约为7GB,包含非常大的高分辨率RGB图像 . 我已经在JVM中允许足够的堆空间来显示图像 . 但是,我想压缩图像,以便在浏览时更具响应性,因此它将分配更少的内存 . 我已经遵循了一些建议here .

我的策略是 compress the GeoTIFF with JPEG compression 并将其用作GeoServer中的数据存储 . 但是,这似乎不起作用 . 这是我用来翻译图像的gdal命令:

gdal_translate -of GTiff -co "BIGTIFF=YES" -co "COMPRESS=JPEG"  -co "TILED=YES" -co "BLOCKXSIZE=512" -co "BLOCKYSIZE=512" -a_srs "EPSG:3057" D:\raster\image.tif 
D:\raster\image_translate.tif

使用openlayers预览图像时,我什么都没有,只是一个空白的底图 . 来自GeoServer的日志告诉我 something in the projection went bad

2017-06-09 13:16:47,551 INFO [geoserver.wms] - 
Request: getServiceInfo
2017-06-09 13:16:47,561 WARN [lite.gridcoverage2d] - Could not reduce the grid geometry inside the valid area bounds: ReferencedEnvelope[-1.7976931348623157E308 : 1.7976931348623157E308, -85.0 : 85.0]
Grid geometry isGridGeometry2D[GeneralGridEnvelope[0..357, 0..357], PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 0.7353351955307262], 
  PARAMETER["elt_0_2", 584219.1848475977], 
  PARAMETER["elt_1_1", -0.7353351955307262], 
  PARAMETER["elt_1_2", 383937.61122240225]]]
2017-06-09 13:16:47,566 ERROR [geoserver.ows] - 
org.geoserver.platform.ServiceException: Error rendering coverage on the fast path

然后我尝试使用带有GDAL的 another compression strategy ,即 "DEFLATE"

gdal_translate -of GTiff -co COMPRESS=DEFLATE -co PREDICTOR=2 -co ZLEVEL=9 -co "BIGTIFF=YES" -a_srs "EPSG:3057"  D:\raster\image.tif D:\raster\image_translate2.tif

that worked 在openlayers中预览时 . 这是GeoServer日志:

2017-06-09 13:28:27,137 INFO [geoserver.wms] - 
Request: getServiceInfo
2017-06-09 13:28:27,146 WARN [lite.gridcoverage2d] - Could not reduce the grid geometry inside the valid area bounds: ReferencedEnvelope[-1.7976931348623157E308 : 1.7976931348623157E308, -85.0 : 85.0]
Grid geometry isGridGeometry2D[GeneralGridEnvelope[0..357, 0..357], PARAM_MT["Affine", 
  PARAMETER["num_row", 3], 
  PARAMETER["num_col", 3], 
  PARAMETER["elt_0_0", 0.7353351955307262], 
  PARAMETER["elt_0_2", 584219.1848475977], 
  PARAMETER["elt_1_1", -0.7353351955307262], 
  PARAMETER["elt_1_2", 383937.61122240225]]]
2017-06-09 13:28:27,231 INFO [geoserver.wms] - 
Request: getMap

我还试图使用JPEG压缩和没有平铺来执行 gdal_translate ,并且我在GeoServer日志中也出现了错误,并且openlayers预览没有显示任何内容 .

所以我的问题是, what is the best strategy to compress GeoTIFF files to be used in a WMS? 目前,似乎DEFLATE是唯一有效的,但压缩并不是最好的 . Has anyone been able to successfully upload a JPEG compressed GeoTIFF to Geoserver?