I have a catalog of images that will be constantly updated. From these images, I create Image Pyramids using the Geotool PyramidBuilder utility. I need to configure the cron job to automatically add new datastores and layers in Geoserver without using the user interface.
After viewing the REST section of the Geoserver manual , I was able to add my “testWS” workspace, but trying to create the ImagePyramid datastore did not work.
Since I have access to the data store, I expanded the sample form file and tried
curl -u admin:geoserver -XPUT -H 'Content-type: text/plain' \
-d '/opt/geoserver_data_dir/2.0.2/data/test_pyramid.pyr' \
"http://localhost:8080/geoserver/rest/workspaces/testWS/datastores/test_pyramid.pyr external.imagepyramid?configure=all"
Where test_pyramid.pyr is the base of my ImagePyramid in this place.
This gave me the error "There is no such data store: test_pyramid"
Is there a better way to add a new datastore and layer to Geoserver without manually adding each user interface? I need help creating the right REST statement that will add Extract ImagePyramid as a data and level storage.
Is there any java code that could do this? I looked at the Geoserver python extensions, but they didn't have that either.
source
share