wfs Transaction 操作

wfs 空间操作是真的繁琐,参数也是必须要完整对应每次都记不住,授人以鱼不如授人以渔,这里记录下具体参数设置过程吧

1.找到需要插入数据的空间表

2.获取对应工作区url

3.找到对应的例子区域

-- 这里以空间数据插入为例

 4.找到xml数据替换对应的参数

<wfs:Transaction service="WFS" version="1.0.0"
  xmlns:wfs="http://www.opengis.net/wfs"
  xmlns:cite="http://www.opengeospatial.net/cite"
  xmlns:gml="http://www.opengis.net/gml"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd http://www.opengeospatial.net/cite http://localhost:8080/geoserver/wfs/DescribeFeatureType?typename=cite:polygon">
  <wfs:Insert>
    <cite:polygon>
      <cite:geom>
        <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
            <gml:polygonMember>
                <gml:Polygon>
                    <gml:outerBoundaryIs>
                        <gml:LinearRing>
                            <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">93.64746094,37.10776507 93.01025391,35.17380832 95.11962891,33.54139467 97.53662109,33.54139467 99.25048828,33.96158629 99.97558594,35.19176697 99.84375,36.38591277 98.85498047,37.4574181 97.18505859,37.90953362 95.16357422,37.82280243 93.64746094,37.10776507</gml:coordinates>
                            </gml:LinearRing>
                    </gml:outerBoundaryIs>
                </gml:Polygon>
            </gml:polygonMember>
        </gml:MultiPolygon>
      </cite:geom>
      <cite:userid>666</cite:userid>
    </cite:polygon>
  </wfs:Insert>
</wfs:Transaction>

5.找到对应的矢量数据写法 

 就在这矢量数据

6.最后你要查询数据是否插入成功

http://localhost:8080/geoserver/cite/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=cite%3Apolygon&maxFeatures=50&outputFormat=application%2Fjson

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值