Monday, 18 November 2019

geoserver - custom time interval for geowebcache


How to assign time interval to take regular cache using geowebche. For instance every afternoon at 13:00 hrs geowebcache should be started automatically and it should start creating tiles. ?



Answer



This is a complete working method to seed tiles automatically with GeoWebCache:


1) Go to http://curl.haxx.se/dlwiz/, select your Operating System, and then download and install the cURL utility.


2) Then, with the help of cURL you can initiate a seeding task:


curl -v -u USERNAME:PASSWORD -XPOST -H "Content-type: text/xml" -d "WORKSPACE:LAYER4326112image/pngtruncate2" "http://127.0.0.1:8090/geoserver/gwc/rest/seed/WORKSPACE:LAYER.xml"

enter image description here\





  • Notice 1: Pay attention to the text capitalisation, especially when you use a workspace with uppercase letters, like mine; otherwise you'll obtain an error.




  • Notice 2: In Windows, you'll obtain an other error if you will try to run the example showed in GeoWebCache REST API Seeding and Truncating (In Windows, you must use only double quotes in the curl command).




  • Notice 3: Don't use breaks in the curl command if you are not looking for troubles.





  • Notice 4: Between the type tags you can use the seed / reseed or truncate methods.




3) In Windows, all you have to do, is to schedule a new task for the seeding process:


enter image description here


enter image description here


enter image description here


enter image description here


4) And here's your tiles:



enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...