geoserver2.18(7):添加WPS(Web处理服务)扩展及前端开发调用

0 安装WPS扩展

1 geoserver管理界面关于wps服务的界面

    

服务管理界面、处理历史界面、WPS request builder界面(具体略......)

 2 WPS服务说明

  • GetCapabilities:请求提供服务的详细信息,包括服务元数据和描述可用流程的元数据。响应是一个称为功能文档的 XML 文档。

//service:服务;version:版本;request:请求;
http://localhost:8080/geoserver/ows?
  service=WPS&
  version=1.0.0&
  request=GetCapabilities
  • DescribeProcess:请求描述通过服务可用的 WPS 进程。

//service:服务;version:版本;request:请求;identifier:操作标识
http://localhost:8080/geoserver/ows?
  service=WPS& 
  version=1.0.0&
  request=DescribeProcess&
  identifier=JTS:buffer
  • Execute:执行服务(以缓冲区分析为例,datainputs为缓冲区操作的输入参数,其格式规则是重点,详情见 OGC Web Processing Service 05-007r7很重要

http://localhost:8081/geoserver/ows?
service=WPS&
version=1.0.0&
request=Execute&
identifier=JTS:buffer&
datainputs=
  geom=point(0%200)@mimetype=application/wkt;
  distance=10;
  quadrantSegments=1;
  capStyle=Square

3 Vue中开发调用

 this.$axios({
      method: "get",
      url: "http://127.0.0.1:8081/geoserver/ows",
      params: {
        service: "WPS",
        version: "1.0.0",
        request: "Execute",
        identifier: "JTS:buffer",
        datainputs:
          "geom=point(0 0)@mimetype=application/wkt;distance=10;quadrantSegments=1;capStyle=Square",
        // ResponseDocument: "BufferedPolygon",
      },
    }).then(function (response) {
      const x2js = new X2JS();
      const jsonObj = x2js.xml2js(response.data);
      console.info(jsonObj);
      // console.info(response.data.json());
    });


 结果:

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

碰碰qaq

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值