TransWikia.com

Seed generate missing tiles for extra raster files in ImageMosaic using GeoServer

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):

  1. Created a ImageMosaic store (points to a folder with the rasters)

  2. Seeded the Tile Layer, all the tiles for all the zoom levels were created

  3. Added a new raster to the ImageMosaic store

  4. 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)

  5. 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

2 Answers

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:

  1. Remove all the index files (shapefile and the rest) that GeoServes creates in the main folder of the ImageMosaic

  2. Add the new raster file to the ImageMosaic folder

  3. 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

  4. Update the Bounding Box coordinates in Layers/Data with a new bbox that should cover the whole dataset

  5. 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

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP