What is the best way to show large GeoTiffs on a leaflet map?

南楼画角 提交于 2019-12-11 19:37:21

问题


For visualizing some geodata, we set up a small webserver running leaflet. All works fine, markers and polygons are shown as expected. Now we also want to show large raster files (stored as GeoTiff) as RGB on our map. We have full control over the tif files, we host them ourselves and we can store/process them in any way we want. Still, as they can get rather big in size (up to 30.000x20.000 pixels, three bands) , we are wondering what the best way to do that is.

Options we researched:

  1. Just display them using this plugin, will probably fail because of the size
  2. Store them as Cloud Optimized GeoTIFF: Its not clear to me if leaflet supports this
  3. Use this modified version of gdal2tiles.py
  4. Set up a "regular" tile server (didn't figure out how to do that yet)

As for now, we are only interested in visualization, although it would be a nice bonus if we could extract pixel values a specific location. How is this done nowadays?

edit: if that is important, the images only cover small areas and we only want to show one at a time, so we are not building a map or something, we want to draw them on top of a basemap


回答1:


I found a perfect solution for my case: Terracotta, an open source lightweight Tile Server! Images do not need to be stored in tiled PNGs, but Terracotta servers tiles by reading from cloud-optimized geotiffs. Works like a charm!



来源:https://stackoverflow.com/questions/56134064/what-is-the-best-way-to-show-large-geotiffs-on-a-leaflet-map

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!