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:
- Just display them using this plugin, will probably fail because of the size
- Store them as Cloud Optimized GeoTIFF: Its not clear to me if leaflet supports this
- Use this modified version of gdal2tiles.py
- 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
24N-130E-25N-129E.png
) so you can trivially place them as normal image overlays in leaflet. That said, setting up a tile server is a solved problem so if you need actual map behaviour (with proper tiling at all zoom levels) then that's definitely the way to go.