1

How can I cache a layer from THREDDS that changes every day? There is an aggregate WMS from THREDDS that uses time dimesion to display the layers for all days. I need to cache the latest layer.

What is the best way to cache the layer with the latest time dimension? We have a server with GeoWebCache and with GeoServer that has GeoWebCache integrated. Is it possible to setup a layer in GeoServer based on the WMS from THREDDS that gets the layer with latest time dimension an and then cache that layer?

Edit: I see from another question (GeoServer GeoWebCache with ImageMosaic) that there is a Parameter filter in GeoWebCache that allows to set a fixed value of regexp - is there a regexp for getting the lastest time?

2
  • 1
    Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works
    – Ian Turton
    Commented May 31, 2021 at 10:52
  • @IanTurton I havnt tried out anything as I have trouble considering how to configure a cache of a layer that changes once a day - which means the cache needs to be purged and then recached as well as the time dimension needs to be updated.
    – Endre Moen
    Commented May 31, 2021 at 10:54

1 Answer 1

0

Assuming the question is:

"What is the best way to cache a layer (of any type) in GeoServer with the latest time dimension?"

Then the solution is:

  1. Go to Data->Layers->[Your layer]->Dimensions tab. Enable the time dimension. Select the attribute that has the time dimension. Check "Nearest Match" enter image description here
  2. Go to the "Tile caching" tab. Check the "Create a cached layer for this layer" box. On the dropdown "Add filter", select "TIME", and then "Regular Expression". In the regular expression field add .* In the "Default Value" field add a date in the far future, like "2099-01-01". enter image description here

This gets you a cached layer with the most recent data if you don't specify any "TIME" parameter. I've tested it and it works fine.

For your particular case, you could set up a WMS Cascade Layer, to pull the layer you want from THREDDS. It should theoretically work the same as a normal layer, but I haven't tested that scenario.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.