Is it possible to create a GeoServer raster (GeoTIFF) data store where the URL to the actual file points to a web location instead of a folder in the GeoServer?
-
The coverage store creation page takes a URL so maybe, have you tried it?– Ian TurtonCommented Mar 7, 2020 at 9:35
-
I have tried it and it does not work. I could only get it to work with an URL to points to a folder within the geoserver file structure. This means that I have to put the raster there, which I am trying to avoid.– user57029Commented Mar 8, 2020 at 19:08
-
then I guess the answer is no. Checking the code would tell you for sure– Ian TurtonCommented Mar 8, 2020 at 19:57
2 Answers
Now you can, using the COG community module: https://docs.geoserver.org/latest/en/user/community/cog/index.html
Mind, the TIFF it's pointed at must be a valid Cloud Optimized GeoTIFF.
By using Leaflet, you can share your raster on the Web. Here the user cannot see the URL from GeoServer, or maybe just can see the ows service... Here is and useful example. Of course I assumed that you have the raster already in geoserver.
Tutorial step-by-step here: https://leafletjs.com/examples/wms/wms.html
var wmsLayer = L.tileLayer.wms('https://demo.boundlessgeo.com/geoserver/ows?', {
layers: 'ne:ne'
}).addTo(map);