2011-02-23 15 views
3

我有一個圖像目錄,將不斷更新。從這個圖像中,我使用Geotool的PyramidBuilder實用程序來製作Image Pyramids。我需要設置一個cron作業來自動添加新的數據存儲和圖層到Geoserver,而無需使用UI。編程Geoserver 2.0.2添加一個新的數據存儲和圖層沒有UI

查看Geoserver手冊的REST部分後,我能夠添加工作空間「testWS」,但試圖創建ImagePyramid數據存儲不起作用。

因爲我可以訪問數據存儲,我擴大對shape文件例如,試圖

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" 

哪裏test_pyramid.pyr是我ImagePyramid在這個位置的基礎。

這給了我一個錯誤「沒有這樣的數據存儲:test_pyramid」

有沒有更好的方式來添加新的數據存儲和層利用Geoserver無需手動添加通過UI每一個?在製作適當的REST語句時,我需要幫助,它將添加一個Extisting ImagePyramid作爲數據存儲和圖層。

有沒有一些Java代碼可以做到這一點?我看着Geoserver python擴展,但他們也沒有這個。

+0

看起來好像這個問題已經在gis stackechange上提出了:http://gis.stackexchange.com/questions/6479/programming-geoserver-2-0-2-to-add-a-new-data -store-and-layer-without-the-ui – DaveParillo 2011-02-23 23:08:43

+0

我覺得這個問題可能會因爲已經被交叉發佈到gis.stackexchange http://gis.stackexchange.com/questions/6479/programming-geoserver- 2-0-2到添加-A-光柵數據存儲和層,而無需最UI – 2015-01-21 17:44:40

回答

相關問題