转自https://www.cnblogs.com/wang985850293/p/5880971.html

geoserver使用curl发布 imagemosaic

 

 

1、//create workspace
    curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d "<workspace><name>toby</name></workspace>" http://localhost:8080/geoserver/rest/workspaces
 
2、//create single image layer
    curl -u admin:geoserver -XPUT -H "Content-type:image/tiff" --data-binary @/data/ndvi_color1.tif http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/ndvi_color1.tif/file.geotiff
 
My data is local to the geoserver (ubuntu) in /data directory.
 
3、Now I have multiple images in /data/mosaic that I want to add to a mosaic layer.. 

curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file:/data/mosaic" "http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/S2Output/external.imagemosaic"

--------------------如果要发布imagepyramid,

 

 

1、//create workspace
    curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d "<workspace><name>toby</name></workspace>" http://localhost:8080/geoserver/rest/workspaces
2、//use gdal to retitle geotiff    使用gdal对8 bit的geotiff进行切片
  
gdal_retile.py -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES" -co "COMPRESS=JPEG" -targetDir bmpyramid bmreduced.tiff

3、

curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file:/data/bmpyramid 

" " http://localhost:8090/geoserver/rest/workspaces/toby/coveragestores/poly-incremental/external.imagepyramid"

 

 

1、//create workspace
    curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d "<workspace><name>toby</name></workspace>" http://localhost:8080/geoserver/rest/workspaces
 
2、//create single image layer
    curl -u admin:geoserver -XPUT -H "Content-type:image/tiff" --data-binary @/data/ndvi_color1.tif http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/ndvi_color1.tif/file.geotiff
 
My data is local to the geoserver (ubuntu) in /data directory.
 
3、Now I have multiple images in /data/mosaic that I want to add to a mosaic layer.. 

curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file:/data/mosaic" "http://localhost:8080/geoserver/rest/workspaces/toby/coveragestores/S2Output/external.imagemosaic"

--------------------如果要发布imagepyramid,

 

 

1、//create workspace
    curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d "<workspace><name>toby</name></workspace>" http://localhost:8080/geoserver/rest/workspaces
2、//use gdal to retitle geotiff    使用gdal对8 bit的geotiff进行切片
  
gdal_retile.py -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES" -co "COMPRESS=JPEG" -targetDir bmpyramid bmreduced.tiff

3、

curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file:/data/bmpyramid 

" " http://localhost:8090/geoserver/rest/workspaces/toby/coveragestores/poly-incremental/external.imagepyramid"

相关文章:

  • 2021-10-26
  • 2022-01-09
  • 2021-10-23
  • 2021-06-13
  • 2021-08-05
  • 2021-10-08
  • 2022-01-12
  • 2021-08-21
猜你喜欢
  • 2022-12-23
  • 2021-05-08
  • 2021-09-30
  • 2022-12-23
  • 2021-10-20
  • 2021-07-28
相关资源
相似解决方案