GeoServer之發佈Geotiff存在的問題html
首次使用geoserver發佈geotiff時,在導入geotiff會遇到這樣的問題:java
Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file://F:\tif\11.tif and hints Hints: REPOSITORY = org.geoserver.catalog.CatalogRepository@11d3c487 EXECUTOR_SERVICE = java.util.concurrent.ThreadPoolExecutor@583d19fb[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] System defaults: GRID_COVERAGE_FACTORY = GridCoverageFactory TILE_ENCODING = null FILTER_FACTORY = FilterFactoryImpl LENIENT_DATUM_SHIFT = true FORCE_AXIS_ORDER_HONORING = http FEATURE_FACTORY = org.geotools.feature.LenientFeatureFactoryImpl@1e0f9063 FORCE_LONGITUDE_FIRST_AXIS_ORDER = true COMPARISON_TOLERANCE = 1.0E-8 STYLE_FACTORY = StyleFactoryImplthis
出現這種狀況時由於所選的TIFF的頭文件有問題或者geoserver沒法識別投影座標系。spa
解決方法:經過gdal_translate(提早安裝了gdal)重寫TIFF文件命令行
CMD命令行輸入:gdal_translate -of GTiff -scale 輸入文件路徑 輸出文件路徑3d
官方連接:https://gdal.org/1.11/gdal_translate.htmlserver