I am successfully adding a new ImageMosaic of GeoTiffs with the Geoserver REST API
curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file://D:/tifdirectory" "http://localhost:8088/geoserver/rest/workspaces/wsp/coveragestores/tifdirectory/external.imagemosaic"
The .SHP index is then created in my "tifdirectory" along with the "tifdirectory.properties" file and everything works well after I setup the layer parameters directly in Geoserver.
My GeoTIFFs are updated daily, so I need to update the footprint index. I tried with this command:
curl -v -u admin:geoserver -XPOST -H "Content-type: text/plain" -d "file://D:/tifdirectory" "http://localhost:8088/geoserver/rest/workspaces/wsp/coveragestores/tifdirectory/external.imagemosaic"
At first, it seems to work since there is no error in the response, I receive:
* upload completely sent off: 72 out of 72 bytes
< HTTP/1.1 202 Accepted
But my ImageMosaic index (.SHP) is not updated. What am I missing here? Is there another way to update to mosaic index?
I think that I could make it work by deleting the layer and coveragestore daily before creating it back. But, when I create the layer I need to manually edit the parameters in Geoserver UI. How can I create it with cURL with all the parameters (crs, BackgroundValues, SUGGESTED_TILE_SIZE, etc) already set?
No comments:
Post a Comment