티스토리 뷰

분류없음

GeoServer REST example

DogBull 2018.02.03 09:19

1. 워크스페이스 생성

curl -X POST -H "Content-type:text/xml" -d "<workspace><name>jhpark</name></workspace>"  http://192.168.250.114/geoserver/rest/workspaces


2. 저장소 목록 조회

curl -X GET -u admin:geoserver http://192.168.250.114/geoserver/rest/workspaces/jhpark/coveragestores.xml


3. 저장소 생성(서버에 이미 존재하는 파일)

curl -X POST -H "Content-type:text/xml" -d "<coverageStore><name>pjh</name><workspace>jhpark</workspace><enabled>true</enabled><type>GeoTIFF</type><url>coverages/r24/R24.20160928.tiff</url></coverageStore>"  -u admin:geoserver http://192.168.250.114/geoserver/rest/workspaces/jhpark/coveragestores


4. 파일이 설정되지 않은 저장소 생성.

curl -X POST -H "Content-type:text/xml" -d "<coverageStore><name>r24</name><workspace>jhpark</workspace><enabled>true</enabled><type>GeoTIFF</type></coverageStore>"  -u admin:geoserver http://192.168.250.114/geoserver/rest/workspaces/jhpark/coveragestores


5. 파일업로드

curl -X PUT -H "Content-type:image/tiff" --data-binary @R24.20160929.tiff -d "filename=abc.tiff"  -u admin:geoserver http://192.168.250.114/geoserver/rest/workspaces/jhpark/coveragestores/r24/file.geotiff



댓글
Total
161,482
Today
145
Yesterday
72