Geographic Information Systems Asked by Joe_Carto on October 3, 2021
I would like GeoServer (via GeoWebCache) to update/generate tiles whenever a new raster file is added to a ImageMosaic store. I am testing the following procedure (unfortunately is not working):
Created a ImageMosaic store (points to a folder with the rasters)
Seeded the Tile Layer, all the tiles for all the zoom levels were created
Added a new raster to the ImageMosaic store
Updated the shapefile that GeoServer creates with a new polygon that covers the area of the added raster file (note that I also matched the "location" attribute). The shapefile is stored along with the raster files (same folder)
Used the "Seed – generate missing tiles" command expecting GeoServer will re-read the shapefile and hence generate the tiles for the new area, unfortunately GeoServer/GeoWebCache is not generating any tiles
What is wrong with the procedure described above?
I found some oddities with GeoServer while trying to generate the tiles:
After adding the extra raster, updating the shapefile, and refreshing the Store, the extra raster does show up in Layer Preview, but it doesn’t when using the Tile Layers menu
When I use "Seed – generate missing tiles" (after updating the Bounding box), the task runs as if it was generating tiles but the number of PNGs/files/folders in the hard-drive doesn’t change at all, it even gives the number of tiles completed…
When I open the WMS on QGIS all the rasters show but when zooming and panning the extra raster there are lags and delays (clearly because there aren’t any pre-rendered tiles for the extra raster). The extra raster doesn’t show up when using WMTS
I did truncate and then generate for the bounding box of the extra raster (as per @IanTurton’s answer) but it didn’t work either. No matter the bounding box coordinates I try the number of tiles never changes
If I chose "Reseed – regenerate all tiles", the task list will, again, show processes as if it was generating tiles, but the number of tiles in the hard-drive keeps the same
GeoWebCache has no idea that you've updated the index file or the mosaic, so you first need to delete the tiles that fall within the bounding box of the new imagery and then ask it to generate missing tiles.
Answered by Ian Turton on October 3, 2021
I've found a solution. To generate new GeoWebCache tiles (out of a new raster file added to an ImageMosaic Store) you need to:
Remove all the index files (shapefile and the rest) that GeoServes creates in the main folder of the ImageMosaic
Add the new raster file to the ImageMosaic folder
Go to Stores and hit Save to create a new shapefile and the other index files. The new shapefile should contain a new polygon corresponding to the new raster
Update the Bounding Box coordinates in Layers/Data with a new bbox that should cover the whole dataset
Seed the layer. No need to add coordinates to the Seed's Bounding box, the defaults (obtained from #4 above) should suffice
And, that's it. No need to update the Gridsets or the cache folder location or anything else.
(GeoServer 2.17.1 on Debian 10 - Buster)
Answered by Joe_Carto on October 3, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP