Skip to content

WFS 2.0.0

WFS 2.0.0提供如下操作:

  • GetCapabitities:返回服务级元数据,它是对服务信息内容和要求参数的一种描述。

  • DescribeFeatureType:生成一个Schema用于描述WFS实现所能提供服务的要素类型。Schema描述定义了在输入时WFS实现如何对要素实例进行编码以及输出时如何生成一个要素实例。

  • GetFeature:可根据查询要求返回一个符合GML规范的数据文档。

  • LockFeature:用户通过Transaction请求时,为了保证要素信息的一致性,即当一个事务访问一个数据项时,其他的事务不能修改这个数据项,对要素数据加要素锁。

  • Transaction: 与要素实例的交互操作。该操作不仅能提供要素读取,同时支持要素在线编辑和事务处理。Transaction操作是可选的,服务器根据数据性质选择是否支持该操作。

  • GetPropertyValue:返回要素类型指定字段的属性值。

  • ListStoredQueries:返回 WFS 服务支持的存储查询方式列表。

  • DescribeStoredQueries:返回存储查询方式的详细元数据描述。

参考文档:

09-025r1_OGC_Web_Feature_Service_WFS_2.0_ISOFDIS_19142_Geographic_information_-_Web_Feature_Service .pdf(https://portal.ogc.org/files/?artifact_id=39967)

GetCapabitities

请求

请求参数

参数名称是否必填描述
SERVICE服务类型。必须是wfs
REQUEST请求名称。必须是GetCapabilities
VERSION版本号。必须是2.0.0
SECTIONS服务元数据文档组成部分的名称。
由零个或多个服务元数据文档组成部分的名称形成的无序列表,名称之间由英文逗号分隔。如果忽略该参数,则表示返回完整的服务元数据文档。
UPDATESEQUENCE控制缓存的序列号,当返回结果有变更时该序号递增。
IGServer暂不支持该参数
ACCEPFORMATS响应格式。默认是text/xml。
由零个和多个格式组成的有序列表,名称之前由英文逗号分隔,将想要返回的格式放在第一个。如果忽略该参数,则返回默认的格式
ACCEPTVERSIONS版本号。默认是取最新的版本。
由零个和多个版本组成的有序列表,名称之前由英文逗号分隔,将想要返回的版本放在第一位。如果忽略该参数,则返回最新的版本

请求示例

{{server}}/igs/rest/services/:serviceName/WFSServer?request=GetCapabilities&service=WFS&version=2.0.0&acceptversions={acceptversions}&sections={sections}&updatesequence={updatesequence}&acceptformats={acceptformats}

响应

响应示例

展开查看
xml
<?xml version='1.0' encoding='utf-8'?>
<wfs:WFS_Capabilities version="2.0.0" xmlns="http://www.opengis.net/wfs/2.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0/wfs.xsd">
    <ows:ServiceIdentification>
        <ows:Title>ZondyCyber Web Feature Service</ows:Title>
        <ows:Abstract>Web Feature Server maintained by ZondyCyber</ows:Abstract>
        <ows:Keywords>
            <ows:Keyword>WFS</ows:Keyword>
            <ows:Keyword>WMS</ows:Keyword>
            <ows:Keyword>ZondyCyber</ows:Keyword>
        </ows:Keywords>
        <ows:ServiceType>WFS</ows:ServiceType>
        <ows:ServiceTypeVersion>2.0.0</ows:ServiceTypeVersion>
        <ows:Fees>NONE</ows:Fees>
        <ows:AccessConstraints>NONE</ows:AccessConstraints>
    </ows:ServiceIdentification>
    <ows:ServiceProvider>
        <ows:ProviderName>Hubei</ows:ProviderName>
        <ows:ServiceContact>
            <ows:IndividualName>吴信才</ows:IndividualName>
            <ows:PositionName>集团董事长</ows:PositionName>
            <ows:ContactInfo>
                <ows:Phone>
                    <ows:Voice>027-87785588</ows:Voice>
                    <ows:Facsimile>027-87785588</ows:Facsimile>
                </ows:Phone>
                <ows:Address>
                    <ows:City>Wuhan</ows:City>
                    <ows:AdministrativeArea>China</ows:AdministrativeArea>
                    <ows:PostalCode>430074</ows:PostalCode>
                    <ows:Country>China</ows:Country>
                </ows:Address>
            </ows:ContactInfo>
        </ows:ServiceContact>
    </ows:ServiceProvider>
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="AcceptVersions">
                <ows:AllowedValues>
                    <ows:Value>1.0.0</ows:Value>
                    <ows:Value>1.1.0</ows:Value>
                    <ows:Value>2.0.0</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
            <ows:Parameter name="AcceptFormats">
                <ows:AllowedValues>
                    <ows:Value>text/xml</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
            <ows:Parameter name="Sections">
                <ows:AllowedValues>
                    <ows:Value>ServiceIdentification</ows:Value>
                    <ows:Value>ServiceProvider</ows:Value>
                    <ows:Value>OperationsMetadata</ows:Value>
                    <ows:Value>FeatureTypeList</ows:Value>
                    <ows:Value>Filter_Capabilities</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
        </ows:Operation>
        <ows:Operation name="DescribeFeatureType">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="outputFormat">
                <ows:AllowedValues>
                    <ows:Value>application/gml+xml; version=3.2</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
        </ows:Operation>
        <ows:Operation name="GetFeature">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="resultType">
                <ows:AllowedValues>
                    <ows:Value>results</ows:Value>
                    <ows:Value>hits</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
            <ows:Parameter name="outputFormat">
                <ows:AllowedValues>
                    <ows:Value>GML2</ows:Value>
                    <ows:Value>GML3</ows:Value>
                    <ows:Value>text/xml; subtype=gml/2.1.2</ows:Value>
                    <ows:Value>text/xml; subType=gml/3.1.1</ows:Value>
                    <ows:Value>text/xml; subtype=gml/3.2</ows:Value>
                    <ows:Value>application/gml+xml; version=3.2</ows:Value>
                    <ows:Value>application/json</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
            <ows:Constraint name="PagingIsTransactionSafe">
                <ows:NoValues></ows:NoValues>
                <ows:DefaultValue>FALSE</ows:DefaultValue>
            </ows:Constraint>
            <ows:Constraint name="CountDefault">
                <ows:NoValues></ows:NoValues>
                <ows:DefaultValue>1000000</ows:DefaultValue>
            </ows:Constraint>
        </ows:Operation>
        <ows:Operation name="GetPropertyValue">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="resolve">
                <ows:AllowedValues>
                    <ows:Value>none</ows:Value>
                    <ows:Value>local</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
            <ows:Parameter name="outputFormat">
                <ows:AllowedValues>
                    <ows:Value>application/gml+xml; version=3.2</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
        </ows:Operation>
        <ows:Operation name="ListStoredQueries">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="DescribeStoredQueries">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="LockFeature">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="lockAction">
                <ows:AllowedValues>
                    <ows:Value>ALL</ows:Value>
                    <ows:Value>SOME</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
        </ows:Operation>
        <ows:Operation name="GetFeatureWithLock">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="resultType">
                <ows:AllowedValues>
                    <ows:Value>results</ows:Value>
                    <ows:Value>hits</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
            <ows:Parameter name="outputFormat">
                <ows:AllowedValues>
                    <ows:Value>text/xml; subType=gml/3.1.1</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
        </ows:Operation>
        <ows:Operation name="Transaction">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                    <ows:Post xmlns:href="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="inputFormat">
                <ows:AllowedValues>
                    <ows:Value>application/gml+xml; version=3.2</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
            <ows:Parameter name="releaseAction">
                <ows:AllowedValues>
                    <ows:Value>ALL</ows:Value>
                    <ows:Value>SOME</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
        </ows:Operation>
        <ows:Constraint name="ImplementsBasicWFS">
            <ows:NoValues/>
            <ows:DefaultValue>TRUE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsTransactionalWFS">
            <ows:NoValues/>
            <ows:DefaultValue>TRUE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsLockingWFS">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="KVPEncoding">
            <ows:NoValues/>
            <ows:DefaultValue>TRUE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="XMLEncoding">
            <ows:NoValues/>
            <ows:DefaultValue>TRUE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="SOAPEncoding">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsInheritance">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsRemoteResolve">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsResultPaging">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsStandardJoins">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsSpatialJoins">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsTemporalJoins">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ImplementsFeatureVersioning">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="ManageStoredQueries">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="PagingIsTransactionSafe">
            <ows:NoValues/>
            <ows:DefaultValue>FALSE</ows:DefaultValue>
        </ows:Constraint>
        <ows:Constraint name="QueryExpressions">
            <ows:AllowedValues>
                <ows:Value>wfs:Query</ows:Value>
                <ows:Value>wfs:StoredQuery</ows:Value>
            </ows:AllowedValues>
        </ows:Constraint>
    </ows:OperationsMetadata>
    <FeatureTypeList>
        <FeatureType xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test">
            <Name>beijing_w17_test:t0</Name>
            <Title>北京市</Title>
            <Abstract>Layer Info List</Abstract>
            <ows:Keywords>
                <ows:Keyword></ows:Keyword>
            </ows:Keywords>
            <DefaultSRS>urn:ogc:def:crs:EPSG::4326</DefaultSRS>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>115.40448659815915 39.41781726044531</ows:LowerCorner>
                <ows:UpperCorner>117.46520008794508 41.05780257931024</ows:UpperCorner>
            </ows:WGS84BoundingBox>
        </FeatureType>
        <FeatureType xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test">
            <Name>beijing_w17_test:t1</Name>
            <Title>绿地_1</Title>
            <Abstract>Layer Info List</Abstract>
            <ows:Keywords>
                <ows:Keyword></ows:Keyword>
            </ows:Keywords>
            <DefaultSRS>urn:ogc:def:crs:EPSG::4326</DefaultSRS>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>115.6942631 39.6979361</ows:LowerCorner>
                <ows:UpperCorner>116.8830574 40.5512486</ows:UpperCorner>
            </ows:WGS84BoundingBox>
        </FeatureType>
        <FeatureType xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test">
            <Name>beijing_w17_test:t2</Name>
            <Title>绿地_2</Title>
            <Abstract>Layer Info List</Abstract>
            <ows:Keywords>
                <ows:Keyword></ows:Keyword>
            </ows:Keywords>
            <DefaultSRS>urn:ogc:def:crs:EPSG::4326</DefaultSRS>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>115.6942631 39.6979361</ows:LowerCorner>
                <ows:UpperCorner>117.0179376 40.5512486</ows:UpperCorner>
            </ows:WGS84BoundingBox>
        </FeatureType>
        <FeatureType xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test">
            <Name>beijing_w17_test:t3</Name>
            <Title>绿地_3</Title>
            <Abstract>Layer Info List</Abstract>
            <ows:Keywords>
                <ows:Keyword></ows:Keyword>
            </ows:Keywords>
            <DefaultSRS>urn:ogc:def:crs:EPSG::4326</DefaultSRS>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>115.8147476 39.4529452</ows:LowerCorner>
                <ows:UpperCorner>117.4187314 40.8621987</ows:UpperCorner>
            </ows:WGS84BoundingBox>
        </FeatureType>
    </FeatureTypeList>
    <fes:Filter_Capabilities>
        <fes:Conformance>
            <fes:Constraint name="ImplementsAdHocQuery">
                <ows:NoValues/>
                <ows:DefaultValue>TRUE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsMinStandardFilter">
                <ows:NoValues/>
                <ows:DefaultValue>TRUE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsStandardFilter">
                <ows:NoValues/>
                <ows:DefaultValue>TRUE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsMinSpatialFilter">
                <ows:NoValues/>
                <ows:DefaultValue>TRUE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsSpatialFilter">
                <ows:NoValues/>
                <ows:DefaultValue>TRUE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsSorting">
                <ows:NoValues/>
                <ows:DefaultValue>TRUE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsMinimumXPath">
                <ows:NoValues/>
                <ows:DefaultValue>TRUE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsResourceId">
                <ows:NoValues/>
                <ows:DefaultValue>FALSE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsFunctions">
                <ows:NoValues/>
                <ows:DefaultValue>FALSE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsMinTemporalFilter">
                <ows:NoValues/>
                <ows:DefaultValue>FALSE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsTemporalFilter">
                <ows:NoValues/>
                <ows:DefaultValue>FALSE</ows:DefaultValue>
            </fes:Constraint>
            <fes:Constraint name="ImplementsExtendedOperators">
                <ows:NoValues/>
                <ows:DefaultValue>FALSE</ows:DefaultValue>
            </fes:Constraint>
        </fes:Conformance>
        <fes:Id_Capabilities>
            <fes:ResourceIdentifier name="fes:ResourceId"/>
        </fes:Id_Capabilities>
        <fes:Scalar_Capabilities>
            <fes:ComparisonOperators>
                <fes:ComparisonOperator name="PropertyIsLessThan"/>
                <fes:ComparisonOperator name="PropertyIsGreaterThan"/>
                <fes:ComparisonOperator name="PropertyIsLessThanOrEqualTo"/>
                <fes:ComparisonOperator name="PropertyIsGreaterThanOrEqualTo"/>
                <fes:ComparisonOperator name="PropertyIsEqualTo"/>
                <fes:ComparisonOperator name="PropertyIsNotEqualTo"/>
                <fes:ComparisonOperator name="PropertyIsLike"/>
                <fes:ComparisonOperator name="PropertyIsBetween"/>
                <fes:ComparisonOperator name="PropertyIsNull"/>
            </fes:ComparisonOperators>
        </fes:Scalar_Capabilities>
        <fes:Spatial_Capabilities>
            <fes:GeometryOperands>
                <fes:GeometryOperand name="gml:Envelope"/>
                <fes:GeometryOperand name="gml:Point"/>
                <fes:GeometryOperand name="gml:MultiPoint"/>
                <fes:GeometryOperand name="gml:LineString"/>
                <fes:GeometryOperand name="gml:Polygon"/>
                <fes:GeometryOperand name="gml:MultiCurve"/>
                <fes:GeometryOperand name="gml:MultiSurface"/>
                <fes:GeometryOperand name="gml:MultiGeometry"/>
            </fes:GeometryOperands>
            <fes:SpatialOperators>
                <fes:SpatialOperator name="BBOX"/>
                <fes:SpatialOperator name="Equals"/>
                <fes:SpatialOperator name="Disjoint"/>
                <fes:SpatialOperator name="Intersects"/>
                <fes:SpatialOperator name="Touches"/>
                <fes:SpatialOperator name="Crosses"/>
                <fes:SpatialOperator name="Within"/>
                <fes:SpatialOperator name="Contains"/>
                <fes:SpatialOperator name="Overlaps"/>
                <fes:SpatialOperator name="Beyond"/>
                <fes:SpatialOperator name="DWithin"/>
            </fes:SpatialOperators>
        </fes:Spatial_Capabilities>
    </fes:Filter_Capabilities>
</wfs:WFS_Capabilities>

DescribeFeatureType

请求

请求参数

参数名称是否必填描述
VERSION请求版本号。必须是2.0.0
SERVICE服务类型。必须是WFS
REQUEST请求名称。必须是DescribeFeatureType
TYPENAME要素类型列表。 要素类型之间以英文逗号分隔。如果没有设置 TYPENAME 的值,表示请求 WFS 2.0.0 服务提供的所有要素类型。
OUTPUTFORMAT响应格式。必须是Capabilities XML 文档中有明确声明的值(application/gml+xml; version=3.2)
NAMESPACES命名空间。
用于指定命名空间及其前缀,形式为 xmlns(前缀为 escaped_url)。如果前缀没有被定义,则默认的命名空间应该被声明。可以通过英文逗号将 xmlns()值的多个命名空间连接起来。
VPS提供者特定参数。
DescribeFeatureType 请求中允许可选的服务提供者特定参数(vendor-specific parameters,VSPs),这些参数由供应商指定,不属于国际标准的 KVP 参数。这些参数的使用增强了请求的响应结果。VSPs 丢失或错误时,服务可以提供一个默认值。VSPs 在不被服务所知道的情况下被应用时,服务可以选择忽略不知道的请求参数。
WFS 可以选择不声明部分或全部 VSPs。如果 VSPs 包含在 Capabilities XML 中,则 ExtendedCapabilities 元素应该进行相应扩展。包含了 ExtendedCapabilities 扩展元素的其他 Schema 文档可以被引入到 Capabilities XML 文档中。客户端可以从 Capabilities Schema 中读取服务提供者特定的定义,并且使用 VSPs 构成请求。WFS 实现者在为 VSP 选择名字时应该注意,不要与国际标准中定义的 WFS 参数产生冲突。
IGServer暂不支持该参数

请求示例

{{server}}/igs/rest/ogc/doc/:serviceName/WFSServer?request=DescribeFeatureType&service=WFS&version=2.0.0&typename={typename}&outputformat={outputformat}&namespaces={namespaces}

响应

响应示例

展开查看
xml
<?xml version='1.0' encoding='utf-8'?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test" elementFormDefault="qualified" targetNamespace="http://www.mapgis.com.cn/beijing_w17_test" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2">
    <xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://localhost:8089/igs/rest/ogc/schemas/gml/3.2.1/gml.xsd"/>
    <xsd:complexType name="t0Type">
        <xsd:complexContent>
            <xsd:extension base="gml:AbstractFeatureType">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="0" nillable="true" name="the_geom" type="gml:MultiSurfacePropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="面积" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="周长" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="行政区代码" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="省名" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="名字拼音" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="分类索引" nillable="true" type="xsd:long"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="mpLayer" nillable="true" type="xsd:long"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="mpArea" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="mpPerimeter" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="GDP_2006" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="GDP_2007" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="GDP_2008" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="GDP_2009" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="GDP_2010" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="GDP_2011" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第一产业增加值_2007" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第一产业增加值_2008" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第一产业增加值_2009" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第一产业增加值_2010" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第一产业增加值_2011" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第二产业增加值_2007" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第二产业增加值_2008" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第二产业增加值_2009" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第二产业增加值_2010" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第二产业增加值_2011" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第三产业增加值_2007" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第三产业增加值_2008" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第三产业增加值_2009" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第三产业增加值_2010" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="第三产业增加值_2011" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="工业增加值_2007" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="工业增加值_2008" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="工业增加值_2009" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="工业增加值_2010" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="工业增加值_2011" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="房地产业增加值_2007" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="房地产业增加值_2008" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="房地产业增加值_2009" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="房地产业增加值_2010" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="房地产业增加值_2011" nillable="true" type="xsd:float"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="人口数" nillable="true" type="xsd:long"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="mapgis_style" nillable="true" type="xsd:long"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="COLOR_INDEX" nillable="true" type="xsd:long"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="t0" substitutionGroup="gml:AbstractFeature" type="beijing_w17_test:t0Type"/>
    <xsd:complexType name="t1Type">
        <xsd:complexContent>
            <xsd:extension base="gml:AbstractFeatureType">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="0" nillable="true" name="the_geom" type="gml:MultiSurfacePropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="mpArea" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="mpPerimeter" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="mpLayer" nillable="true" type="xsd:long"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="osm_id" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="code" nillable="true" type="xsd:short"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="fclass" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="name" nillable="true" type="xsd:string"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="t1" substitutionGroup="gml:AbstractFeature" type="beijing_w17_test:t1Type"/>
</xsd:schema>

GetFeature

注意,GML格式中几何坐标XY顺序并不是固定的

WFS1.1.0和2.0.0版本中,参考系为经纬度(epsg=4326, 4214, 4610, 4490)或高斯参考系(epsg=[2327,2442] [4491,4554] [21413,21423],[21473,21483])时,坐标顺序为YX,其他为XY

请求

请求参数

参数名称是否必填描述
VERSION版本号。必须是2.0.0
示例:2.0.0
SERVICE服务名。必须是WFS
示例:WFS
REQUEST请求名称。必须是GetFeature
示例:GetFeature
NAMESPACES命名空间。
用于指定命名空间及其前缀,形式为 xmlns(前缀为 escaped_url)。如果前缀没有被定义,则默认的命名空间应该被声明。可以通过英文逗号将 xmlns()值的多个命名空间连接起来。
VSPs提供者特定参数。
DescribeFeatureType 请求中允许可选的服务提供者特定参数(vendor-specific parameters,VSPs),这些参数由供应商指定,不属于国际标准的 KVP 参数。这些参数的使用增强了请求的响应结果。VSPs 丢失或错误时,服务可以提供一个默认值。VSPs 在不被服务所知道的情况下被应用时,服务可以选择忽略不知道的请求参数。
WFS 可以选择不声明部分或全部 VSPs。如果 VSPs 包含在 Capabilities XML 中,则 ExtendedCapabilities 元素应该进行相应扩展。包含了 ExtendedCapabilities 扩展元素的其他 Schema 文档可以被引入到 Capabilities XML 文档中。客户端可以从 Capabilities Schema 中读取服务提供者特定的定义,并且使用 VSPs 构成请求。WFS 实现者在为 VSP 选择名字时应该注意,不要与国际标准中定义的 WFS 参数产生冲突。
IGServer暂不支持该参数
STARTINDEX开始索引号。
指定结果集在响应文档中开始呈现的索引号。
示例:10
COUNT返回数量。
指定返回结果中包含的要素数量。
示例:20
RESULTTYPE返回类型。
WFS 2.0.0 服务的 GetFeature 操作支持两种格式(响应异常除外)。既可以返回一个完整响应文档,文档中包含满足该请求的资源;也可以返回一个空响应文档,用于指示该操作可以返回的资源总数。最终返回的文档类型由 RESULTTYPE 参数决定。RESULTTYPE 参数的值可以为"results"和"hits",默认值为"results"。"results"表示返回满足操作请求的完整响应文档,"hits"表示返回一个没有资源实例的空响应文档。
示例:results
RESOLVE资源引用。
RESOLVE 参数表示选择的(例如本地或远程资源)资源引用,值可以为 local、remote、all 或 none。WFS 2.0.0 服务的 RESOLVE 参数支持的值在 capabilties XML 文档中进行了声明。
IGServer 暂不支持该参数。
RESOLVEDEPTH资源嵌套深度。
RESOLVEDEPTH 参数决定了响应文档中资源嵌套的深度,该参数的有效值范围由非负整数加"*"构成。如果未指定 RESOLVE 参数的值或是值设为 none,服务器会忽略 RESOLVEDEPTH 参数中指定的任何值。
IGServer 暂不支持该参数。
RESOLVETIMEOUT资源解析时间。
RESOLVETIMEOUT 参数决定了服务器从解析资源引用开始,到服务器接收到响应时所需等待的时间。如果 RESOLVE 参数值设为 none,RESOLVETIMEOUT 参数值无效。
IGServer 暂不支持该参数。
TYPENAMES要素类型列表。
通过该参数可以指定多个要素类型,不同要素类型之间以英文逗号分隔。
示例:hubei:t0,t1
ALIASES要素类型别名。
在查询请求中用于指定要素类型的别名,值由 TYPENAMES 参数指定。要素类型别名可以在任何地方使用,要素类型名只能用于查询请求的上下文。要素类型别名的使用方式如下所示: TYPENAMES=(ns1:FeatureType1,ns2:FeatureType2)(ns2:FeatureType2,ns2:FeatureType3)&ALIASES=(A,B)(C,D)
IGServer 暂不支持该参数。
SRSNAME坐标参考系名称。
可以根据响应文档中 SRSNAME 属性值判定,WFS 服务支持哪种应用于几何要素的 CRS 转换。SRSNAME 属性值可能为 capabilities 文档中列出的要素类型的 DefaultCRS 或 OtherCRS 值。如果 SRSNAME 属性值未指定,则响应文档中列出的要素类型应使用 DefaultCRS 值编码。
示例:EPSG:3857
FILTER过滤表达式。
使用 FILTER_LANGUAGE 参数指定的语言编码的过滤表达式。
该参数与 BBOX 和 RESOURCEID 参数互斥。
示例:参数详情
FILTER_LANGUAGE过滤表达式编码语言。
用来指定编码过滤表达式的语言, FILTER 参数的值即为编码后的过滤表达式。FILTER_LANGUAGE 参数的默认值 urn:ogc:def:query Language:OGC-FES:Filter,用来表明 FILTER 参数的值为一个字符串,该字符串是使用国际标准中定义的 XML 标签编码的。
IGServer 暂不支持该参数。
RESOURCEID要素ID。
多个标识符间用英文逗号隔开。
该参数与 BBOX 和 FILTER 参数互斥。
示例:t0.325
BBOX边界框。
该参数与 RESOURCEID 和 FILTER 参数互斥。
示例:31,111,32,113
SORTBY属性排序方式。
该参数用来指定属性的排序方式,可以为升序方式排序(ASC),也可以为降序方式排序(DESC)。如果未指定排序方式,则默认按升序方式排序(ASC)。
如:"SORTBY=Field1 DESC,Field2 DESC,Field3" ,表示 Field1 按降序方式排序,Field2 按降序方式排序,Field3 按升序方式排序。
示例:mpArea desc
STOREDQUERY_ID存储查询标识符。仅提供 GetFeatureById 存储查询方式,其对应的标识符为 urn:ogc:def:query:OGC-WFS::GetFeatureById。
STOREDQUERY_PARAMETER存储查询参数。
OUTPUTFORMAT响应格式。必须是Capabilities XML 文档中有明确声明的值(application/gml+xml; version=3.2)
示例:json
PROPERTYNAME属性名称列表。
表示包含在响应中的非必需属性列表。如果多个要素类型名称被指定为 TYPENAMES 的值,则相应的列表参数应该被指定。
示例:NAME

请求示例

1.Query 请求示例

{{server}}/igs/rest/services/:serviceName/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames={typenames}&propertyname={propertyname}&resourceid={resourceid}&filter={filter}&bbox={bbox}&outputformat={outputformat}&namespaces={namespaces}&startindex={startindex}&count={count}&resulttype={resulttype}&srsname={srsname}&sortby={sortby}&storedquery_id={storedquery_id}&storedquery_parameter={storedquery_parameter}

2.StoredQuery 请求示例

{{server}}/igs/rest/services/:serviceName/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=beijing_w17_test:t0&propertyname=&resourceid&filter&bbox&outputformat&namespaces&startindex=&count=&resulttype&srsname=&sortby&storedquery_id=urn:ogc:def:query:OGC-WFS::GetFeatureById&id=t0.30

  • 空间查询参数

目前支持bbox(通过边界框进行过滤,获取边界框内的要素)、contains(包含运算,即限定结果要素空间上包含指定的几何对象)、disjoint(相离运算,即限定结果要素空间上与指定的几何对象没有公共点)、intersect(相交运算,即限定结果要素空间上与指定的几何对象相交)空间关系关键字;支持point、linestring、box、envelope、linearring、polygon、multipolygon空间几何类型

  1. Intersect请求示例(get)

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter xmlns:gml="http://www.opengis.net/gml">  
      <fes:Intersect xmlns:fes="http://www.opengis.net/fes/2.0">
        <fes:PropertyName>the_geom</fes:PropertyName>
        <gml:MultiPolygon> 
           <gml:surfaceMember> 
             <gml:Polygon> 
               <gml:exterior> 
                 <gml:LinearRing> 
                   <gml:posList>31 111 32 111 32 113 31 113 31 111</gml:posList> 
                 </gml:LinearRing> 
               </gml:exterior> 
             </gml:Polygon> 
           </gml:surfaceMember> 
        </gml:MultiPolygon> 
      </fes:Intersect> 
    </Filter>
    &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  2. Intersect请求示例(post)

    <?xml version="1.0" encoding="utf-8"?>
    <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" outputFormat="application/gml+xml; version=3.2" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/wfs.xsd  http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd">   
      <wfs:Query typeNames="hubei:t0"> 
        <Filter>  
          <fes:Intersect>  
            <fes:PropertyName>the_geom</fes:PropertyName>  
            <gml:MultiPolygon> 
              <gml:surfaceMember> 
                <gml:Polygon> 
                  <gml:exterior> 
                    <gml:LinearRing> 
                      <gml:posList>31 111 32 111 32 113 31 113 31 111</gml:posList> 
                    </gml:LinearRing> 
                  </gml:exterior> 
                </gml:Polygon> 
              </gml:surfaceMember> 
            </gml:MultiPolygon> 
          </fes:Intersect> 
        </Filter> 
      </wfs:Query> 
    </wfs:GetFeature>
  3. Contains请求示例(get)

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter xmlns:gml="http://www.opengis.net/gml">  
       <fes:Contains xmlns:fes="http://www.opengis.net/fes/2.0">
         <fes:PropertyName>the_geom</fes:PropertyName>
         <gml:MultiPolygon> 
           <gml:polygonMember> 
             <gml:Polygon> 
               <gml:outerBoundaryIs> 
                 <gml:LinearRing> 
                   <gml:posList>31 111 32 111 32 113 31 113 31 111</gml:posList> 
              </gml:LinearRing> 
               </gml:outerBoundaryIs> 
             </gml:Polygon> 
           </gml:polygonMember> 
         </gml:MultiPolygon> 
       </fes:Contains> 
    </Filter>
    &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  4. Contains请求示例(post)

    <?xml version="1.0" encoding="utf-8"?>
    <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" outputFormat="geojson" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/wfs.xsd  http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd"> 
      <wfs:Query typeNames="hubei:t0"> 
        <Filter>  
          <fes:Contains>  
            <fes:PropertyName>the_geom</fes:PropertyName>  
            <gml:MultiPolygon> 
              <gml:polygonMember> 
                <gml:Polygon> 
                  <gml:outerBoundaryIs> 
                    <gml:LinearRing> 
                      <gml:posList>31 111 32 111 32 113 31 113 31 111</gml:posList>
                    </gml:LinearRing> 
                  </gml:outerBoundaryIs> 
                </gml:Polygon> 
              </gml:polygonMember> 
            </gml:MultiPolygon> 
          </fes:Contains> 
        </Filter> 
      </wfs:Query> 
    </wfs:GetFeature>
  5. Disjoint请求示例(get)

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter xmlns:gml="http://www.opengis.net/gml">  
      <fes:Disjoint xmlns:fes="http://www.opengis.net/fes/2.0">      
        <fes:PropertyName>the_geom</fes:PropertyName>
        <gml:MultiPolygon> 
          <gml:polygonMember> 
            <gml:Polygon> 
              <gml:outerBoundaryIs> 
                <gml:LinearRing> 
                   <gml:posList>31 111 32 111 32 113 31 113 31 111</gml:posList>
                </gml:LinearRing> 
              </gml:outerBoundaryIs> 
            </gml:Polygon> 
          </gml:polygonMember> 
        </gml:MultiPolygon> 
      </fes:Disjoint> 
    </Filter>
    &bbox=&outputformat=geojson&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  6. Disjoint请求示例(post)

    <?xml version="1.0" encoding="utf-8"?>
    <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" outputFormat="geojson" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/wfs.xsd  http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd">
      <wfs:Query typeNames="hubei:t0"> 
        <Filter>  
          <fes:Disjoint>  
            <fes:PropertyName>the_geom</fes:PropertyName>  
            <gml:MultiPolygon> 
              <gml:polygonMember> 
                <gml:Polygon> 
                  <gml:outerBoundaryIs> 
                    <gml:LinearRing> 
                      <gml:posList>31 111 32 111 32 113 31 113 31 111</gml:posList>
                    </gml:LinearRing> 
                  </gml:outerBoundaryIs> 
                </gml:Polygon> 
              </gml:polygonMember> 
            </gml:MultiPolygon> 
          </fes:Disjoint> 
        </Filter> 
      </wfs:Query> 
    </wfs:GetFeature>
  7. Bbox请求示例(get)

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter>
      <BBOX> 
        <Envelope> 
          <lowerCorner>31,111</lowerCorner>  
          <upperCorner>32,113</upperCorner> 
        </Envelope> 
      </BBOX> 
    </Filter>
    &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  8. Bbox请求示例(post)

    <?xml version="1.0" encoding="utf-8"?>
    <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" outputFormat="json" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/wfs.xsd  http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd"> 
      <wfs:Query typeNames="hubei:t0"> 
        <Filter>  
          <BBOX> 
            <Envelope> 
              <lowerCorner>31,111</lowerCorner>  
        	  <upperCorner>32,113</upperCorner> 
            </Envelope> 
          </BBOX> 
        </Filter> 
      </wfs:Query> 
    </wfs:GetFeature>
  9. Dwithin请求示例(get)

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter xmlns:gml="http://www.opengis.net/gml">  
      <fes:DWITHIN  xmlns:fes="http://www.opengis.net/fes/2.0">
    	<gml:Point>
          <gml:coordinates>112,31</gml:coordinates>
     	</gml:Point>
     	<fes:Distance>10</fes:Distance>
      </fes:DWITHIN>
    </Filter>                                                                            &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  • 条件查询参数

目前支持PropertyIsEqualTo(限定某表达式的值等于指定值)、PropertyIsNotEqualTo(限定某表达式的值不等于指定值)、PropertyIsLessthan(限定某表达式的值小于指定值)、PropertyIsGreaterthan、PropertyIsMorethan(限定某表达式的值大于指定值)、PropertyIsLessthanOrEqualTo(限定某表达式的值小于或者等于指定值)、PropertyIsGreaterthanOrEqualTo、PropertyIsMorethanOrEqualTo(限定某表达式的值大于或者等于指定值)、PropertyIsLike(模糊查询)、PropertyIsBetween(限定某表达式的值在两个指定值范围内)、PropertyIsNull(限定某表达式的值为null)

  1. PropertyIsEqualTo请求示例

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter> 
      <PropertyIsEqualTo> 
        <ValueReference>NAME</ValueReference>  
        <Literal>武汉市</Literal> 
      </PropertyIsEqualTo> 
    </Filter>
    &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  2. PropertyIsLike请求示例

    GET {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=<Filter> 
      <PropertyIsLike> 
        <ValueReference>NAME</ValueReference>  
       <Literal>武</Literal> 
      </PropertyIsLike> 
    </Filter>
    &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  3. PropertyIsBetween请求示例

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter> 
      <PropertyIsBetween> 
        <ValueReference>mpArea</ValueReference> 
        <LowerBoundary>0.02</LowerBoundary>
        <UpperBoundary>0.05</UpperBoundary>
      </PropertyIsBetween> 
    </Filter>
    &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  4. PropertyIsNull请求示例

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter> 
      <PropertyIsNull> 
        <ValueReference>CODE</ValueReference>  
      </PropertyIsNull> 
    </Filter>
    &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  • 复合查询示例
  1. 空间查询和条件查询并存示例

    {{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
    <Filter>
     <BBOX> 
       <Envelope> 
        <lowerCorner>31 111</lowerCorner> 
        <upperCorner>32 113 </upperCorner> 
       </Envelope> 
     </BBOX>
     <PropertyIsLike> 
       <ValueReference>NAME</ValueReference>  
       <Literal>武</Literal> 
     </PropertyIsLike> 
    </Filter>
    &bbox=&outputformat=json&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=
  2. 使用And、Or、Not连接查询条件示例(Post请求体)

    xml
    <?xml version="1.0" encoding="utf-8"?>
    <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" outputFormat="application/gml+xml; version=3.2" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/wfs.xsd  http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd">  
      <Query typeNames="hubei:t0"> 
        <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
          <And>
            <fes:PropertyIsEqualTo> 
        	  <fes:ValueReference>mpLayer</fes:ValueReference>  
        	  <fes:Literal>0</fes:Literal> 
    		</fes:PropertyIsEqualTo> 
    	    <fes:PropertyIsLike> 
        	  <fes:ValueReference>NAME</fes:ValueReference>  
    		  <fes:Literal>武</fes:Literal> 
    	    </fes:PropertyIsLike> 
    	  </And>
        </fes:Filter> 
      </Query> 
    </wfs:GetFeature>
  3. 使用And、Or连接查询空间查询和条件查询并存示例(Post请求体)

    xml
    <?xml version="1.0" encoding="utf-8"?>
    <wfs:getfeature xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" outputformat="application/gml+xml; version=3.2" xsi:schemalocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/wfs.xsd  http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd">
        <query typenames="hubei:t0">
            <fes:filter xmlns:fes="http://www.opengis.net/fes">
                <fes:and>
                    <fes:or>
                        <fes:propertyisequalto>
                            <fes:propertyname>STYLE</fes:propertyname>
                            <fes:literal>999</fes:literal>
                        </fes:propertyisequalto>
                    </fes:or>
                    <fes:or>
                        <fes:propertyisequalto>
                            <fes:propertyname>SSFGS</fes:propertyname>
                            <fes:literal>308</fes:literal>
                        </fes:propertyisequalto>
                        <fes:propertyisequalto>
                            <fes:propertyname>SSFGS</fes:propertyname>
                            <fes:literal>291</fes:literal>
                        </fes:propertyisequalto>
                        <fes:propertyisequalto>
                            <fes:propertyname>SSFGS</fes:propertyname>
                            <fes:literal>292</fes:literal>
                        </fes:propertyisequalto>
                        <fes:propertyisequalto>
                            <fes:propertyname>SSFGS</fes:propertyname>
                            <fes:literal>293</fes:literal>
                        </fes:propertyisequalto>
                        <fes:propertyisequalto>
                            <fes:propertyname>SSFGS</fes:propertyname>
                            <fes:literal>294</fes:literal>
                        </fes:propertyisequalto>
                        <fes:propertyisequalto>
                            <fes:propertyname>SSFGS</fes:propertyname>
                            <fes:literal>243</fes:literal>
                        </fes:propertyisequalto>
                    </fes:or>
                    <fes:or/>
                    <fes:or/>
                    <fes:bbox>
                        <fes:propertyname/>
                        <gml:box xmlns:gml="http://www.opengis.net/gml" srsname="EPSG:4326">
                            <gml:coordinates decimal="." cs="," ts=" ">120.20350699047405,30.329364443799772 120.20558033804257,30.331695283433714</gml:coordinates>
                        </gml:box>
                    </fes:bbox>
                </fes:and>
            </fes:filter>
        </query>
    </wfs:getfeature>
  • 通过featureId查询
{{server}}/igs/rest/services/hubei/WFSServer?request=GetFeature&service=WFS&version=2.0.0&typenames=hubei:t0&propertyname=&resourceid=&filter=
<Filter xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml">
	<fes:ResourceId rid="t0.325"/>
</Filter>
&bbox=&outputformat=&namespaces=&startindex=&count=&resulttype=&srsname=&sortby=&storedquery_id=&storedquery_parameter=

响应

响应示例

1.resulttype=results

展开查看
xml
<?xml version='1.0' encoding='utf-8'?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberMatched="1" numberReturned="1" timeStamp="2022-07-04T11:18:40.070+0800" xsi:schemaLocation="http://www.mapgis.com.cn/beijing_w17_test http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer?REQUEST=DescribeFeatureType&VERSION=2.0.0&SERVICE=wfs&TYPENAME=beijing_w17_test%3At0 http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://localhost:8089/igs/rest/ogc/schemas/gml/3.2.1/gml.xsd">
    <wfs:member>
        <beijing_w17_test:t0 gml:id="t0.30">
            <beijing_w17_test:the_geom>
                <gml:MultiSurface srsDimension="2" srsName="urn:x-ogc:def:crs:EPSG::4326" gml:id="t0.30.the_geom">
                    <gml:surfaceMember>
                        <gml:Polygon gml:id="t0.the_geom.30">
                            <gml:exterior>
                                <gml:LinearRing>
                                    <gml:posList>40.18168966028399 117.31507489964977 40.17382866541169 117.32026235404675 40.170011875956256 117.32591179248186 40.13623969941543 117.36761577563071 40.12073755602187 117.31926236434069 40.12861084283261 117.26619623614805 40.11546223856319 117.24477450997999 40.08568763949707 117.21452103811879 40.02520634206102 116.97261778735806 40.02687559507769 116.94810552292485 40.028818773543314 116.87625479809596 40.02785061414937 116.82574062975266 40.019389198378974 116.78174737211647 40.003072552839136 116.75145887939848 39.99277345005897 116.74332295570034 39.97714041541478 116.7347032651407 39.95439383065294 116.72544901303944 39.94373083504269 116.72449030402393 39.92878466181725 116.73750776086395 39.9209486644574 116.75119134609517 39.87081931152995 116.75383725602914 39.855505434747464 116.77400278726154 39.840193114428345 116.79416037221067 39.82450564652686 116.82146466856312 39.81910855399687 116.85688298125996 39.82473776557202 116.88614336588404 39.826145306301285 116.8934566700068 39.80547869501192 116.91308483222835 39.773494464131105 116.9101168498864 39.74365747315592 116.90017551320729 39.707081071264376 116.88244439009556 39.69250180504247 116.88826982527212 39.681094633043855 116.90155989288911 39.64726886303583 116.8420508490617 39.61149967444282 116.81076476042458 39.579966453410634 116.80352879150183 39.5630309358432 116.78784718541552 39.579680469233246 116.77031709448903 39.60397601555115 116.74141351915321 39.60880375247046 116.73229660344654 39.6070458707191 116.71200858242825 39.58766029704392 116.69275537540997 39.58245472765626 116.68758565538465 39.572854466820935 116.66433230222295 39.584198644271204 116.60713394957311 39.60628405152062 116.58748129282284 39.5908257786836 116.5353478427099 39.57167694511275 116.52799576702257 39.547106870091554 116.50245350747362 39.52770329498528 116.43825380200498 39.50252777053924 116.40561858077268 39.498881576398496 116.40100379974331 39.49160500175016 116.39180584389143 39.483460245116085 116.39476865451236 39.46460426812319 116.42414071699406 39.434321744048574 116.42900301454235 39.42987536955002 116.42791704673658 39.41781726044531 116.38677522865636 39.42320648077019 116.34913970851295 39.44181399407318 116.29595016984247 39.455722501982734 116.26615584761836 39.47673296615232 116.23693430798399 39.493628148595896 116.21929027477643 39.504737590351894 116.21067941632194 39.52794933161917 116.21022643539574 39.57750340367757 116.18094387924413 39.579333413710934 116.1719445517697 39.5578554053212 116.13372830776694 39.546213219384946 116.07015549594084 39.53524038194409 116.01138963988919 39.544793447326306 115.99309590006067 39.54457910442803 115.95283608988319 39.542883296453006 115.92786136637815 39.55667066848406 115.89088967748987 39.54354371179665 115.84028582021155 39.522901970210164 115.82472850379624 39.50406496031921 115.80811057071978 39.49533374301034 115.77966723753258 39.47960218629306 115.72844836428075 39.54364368247745 115.66982063875008 39.57488021885799 115.63746001599935 39.589136447604815 115.60992781889202 39.5802300624456 115.56200994376258 39.58459439162423 115.53858504838304 39.59184834999727 115.50823929710329 39.619064913858736 115.48857528352524 39.67072345222821 115.45260172439478 39.70491236403903 115.43569831567262 39.70622492031764 115.44882509025234 39.71363529283584 115.46469748036509 39.73388341821436 115.4161014688475 39.77721068510954 115.41632548945529 39.76798219455808 115.47868845905457 39.77344070462795 115.55026669103071 39.78886292242484 115.5465514708088 39.793066703755805 115.54553498831588 39.85464367634573 115.4792369276939 39.8829667368932 115.47858918056201 39.905584239346865 115.43834146653782 39.93807623821907 115.42267327858586 39.97573487050942 115.40448659815915 40.01630310297043 115.40813400223824 40.032572167324695 115.44962261668337 40.03451513391693 115.52123402932754 40.04979682057687 115.54193867605058 40.06491952782842 115.56245986505586 40.104137389083675 115.60425768939746 40.122854450385475 115.6746440796621 40.115270654125766 115.73737892567547 40.13452907423682 115.79113193323741 40.14458176718476 115.84880078311926 40.14547406310452 115.85392046938316 40.18069191659339 115.85865377543398 40.217251595394266 115.92201556645126 40.23648669425067 115.92422448941637 40.26747039043067 115.92779573903887 40.296101486648354 115.89622932744395 40.351074440916065 115.84607287414383 40.39530347292998 115.77476729057096 40.430832000635576 115.74714183495458 40.451577448849136 115.73651160032634 40.47460369578611 115.7116313828737 40.49950330144912 115.70845670140766 40.519828576491186 115.73375872295638 40.5367958858598 115.76557751988649 40.55511193214085 115.79631355389617 40.5616016157129 115.81133297773161 40.56578905087944 115.8382328458345 40.58639027959755 115.89788912844354 40.57336105769088 115.95004512459603 40.57089123334162 116.00545386365171 40.57838057220969 116.03747823315828 40.59519484461847 116.06062693938652 40.62301217600583 116.07743463293757 40.64326030539523 116.1033000170865 40.667070554595625 116.12948243265173 40.701444791873016 116.15897822203934 40.735701935474744 116.19092785774751 40.74203308208347 116.20842346603108 40.74436452538898 116.23527140631468 40.73656988375049 116.24915193660506 40.73177217397864 116.27540359890327 40.73487827671843 116.28535950155455 40.748435065588446 116.30106651190738 40.74953533491668 116.31570179828466 40.73864176135716 116.39474407479348 40.740160446993215 116.45468231549593 40.769041635777334 116.43023128297382 40.78558923299923 116.39414154237737 40.80094587146101 116.3651764156099 40.87977225936604 116.29986840039948 40.91087228071005 116.29731258491644 40.91382314734168 116.31199949832941 40.907242442827986 116.32424151280868 40.899459690515634 116.33870127248137 40.8853278978374 116.35936120753979 40.8723210169044 116.39578334303017 40.870587035621064 116.43785778800024 40.891936640921905 116.4358359461624 40.91220695143803 116.4168399711459 40.94900957199592 116.40512169145262 40.95606289748336 116.42737110246703 40.95049041536041 116.47645027029144 40.95645424952837 116.5034628689909 40.96657026332268 116.53683378692477 41.02949942210438 116.5573523714245 41.05780257931024 116.62119206138455 41.04040655116971 116.6343492918968 40.99905997605389 116.64803729187122 40.98475788359688 116.65021298247191 40.95179317294696 116.65521617452124 40.91522933224161 116.68132698702112 40.89107837742801 116.707168201715 40.86972949213688 116.70910583329366 40.854045444129845 116.70304642299156 40.8265524671545 116.7647610942514 40.81624149609808 116.79769169722736 40.78872998354285 116.83886540659127 40.76218926286929 116.85769187621968 40.71869899868607 116.9004173488254 40.6971665724963 116.91708327059884 40.675627680742146 116.93374870176719 40.669770971154826 116.95810426250407 40.67371919436728 117.01454264349421 40.67846352977836 117.09907283290626 40.674503258353624 117.17346101787503 40.65968251568569 117.27788564617171 40.64952135897002 117.37964711547767 40.64769041570492 117.45420078396214 40.633289442812945 117.46520008794508 40.61048713402519 117.453149753623 40.60952777243434 117.43789712280673 40.59947733568167 117.41197792074477 40.5792470581363 117.40371327654006 40.558399912992186 117.4089340674679 40.5337494491829 117.38755313514888 40.53760292131587 117.34465405029877 40.5460174301351 117.29854420104897 40.54312988682136 117.2478491843046 40.529339791250244 117.20223743849012 40.504454299378054 117.16650975211704 40.44051395327131 117.18868057205867 40.391560417473634 117.17493854889949 40.37436321577407 117.16389783720311 40.34977875573698 117.19072163956632 40.34074754932602 117.20058048720476 40.29047266918997 117.23341454262267 40.260056431835665 117.25833151812517 40.24685041025389 117.27514243412595 40.231169984068046 117.28813872049112 40.19944231472779 117.30334989929348 40.18168966028399 117.31507489964977</gml:posList>
                                </gml:LinearRing>
                            </gml:exterior>
                        </gml:Polygon>
                    </gml:surfaceMember>
                </gml:MultiSurface>
            </beijing_w17_test:the_geom>
            <beijing_w17_test:fid>30</beijing_w17_test:fid>
            <beijing_w17_test:面积>1.634556E+10</beijing_w17_test:面积>
            <beijing_w17_test:周长>764100.9</beijing_w17_test:周长>
            <beijing_w17_test:行政区代码>110000</beijing_w17_test:行政区代码>
            <beijing_w17_test:省名>北京</beijing_w17_test:省名>
            <beijing_w17_test:名字拼音>Beijing</beijing_w17_test:名字拼音>
            <beijing_w17_test:分类索引>2</beijing_w17_test:分类索引>
            <beijing_w17_test:mpLayer>0</beijing_w17_test:mpLayer>
            <beijing_w17_test:mpArea>1.7250937307420786</beijing_w17_test:mpArea>
            <beijing_w17_test:mpPerimeter>8.105811630521583</beijing_w17_test:mpPerimeter>
            <beijing_w17_test:GDP_2006>8117.78</beijing_w17_test:GDP_2006>
            <beijing_w17_test:GDP_2007>9846.81</beijing_w17_test:GDP_2007>
            <beijing_w17_test:GDP_2008>11115.0</beijing_w17_test:GDP_2008>
            <beijing_w17_test:GDP_2009>12153.03</beijing_w17_test:GDP_2009>
            <beijing_w17_test:GDP_2010>14113.58</beijing_w17_test:GDP_2010>
            <beijing_w17_test:GDP_2011>16251.93</beijing_w17_test:GDP_2011>
            <beijing_w17_test:第一产业增加值_2007>101.26</beijing_w17_test:第一产业增加值_2007>
            <beijing_w17_test:第一产业增加值_2008>112.83</beijing_w17_test:第一产业增加值_2008>
            <beijing_w17_test:第一产业增加值_2009>118.29</beijing_w17_test:第一产业增加值_2009>
            <beijing_w17_test:第一产业增加值_2010>124.36</beijing_w17_test:第一产业增加值_2010>
            <beijing_w17_test:第一产业增加值_2011>136.27</beijing_w17_test:第一产业增加值_2011>
            <beijing_w17_test:第二产业增加值_2007>2509.4</beijing_w17_test:第二产业增加值_2007>
            <beijing_w17_test:第二产业增加值_2008>2626.41</beijing_w17_test:第二产业增加值_2008>
            <beijing_w17_test:第二产业增加值_2009>2855.55</beijing_w17_test:第二产业增加值_2009>
            <beijing_w17_test:第二产业增加值_2010>3388.38</beijing_w17_test:第二产业增加值_2010>
            <beijing_w17_test:第二产业增加值_2011>3752.48</beijing_w17_test:第二产业增加值_2011>
            <beijing_w17_test:第三产业增加值_2007>7236.15</beijing_w17_test:第三产业增加值_2007>
            <beijing_w17_test:第三产业增加值_2008>8375.76</beijing_w17_test:第三产业增加值_2008>
            <beijing_w17_test:第三产业增加值_2009>9179.19</beijing_w17_test:第三产业增加值_2009>
            <beijing_w17_test:第三产业增加值_2010>10600.84</beijing_w17_test:第三产业增加值_2010>
            <beijing_w17_test:第三产业增加值_2011>12363.18</beijing_w17_test:第三产业增加值_2011>
            <beijing_w17_test:工业增加值_2007>2082.76</beijing_w17_test:工业增加值_2007>
            <beijing_w17_test:工业增加值_2008>2131.75</beijing_w17_test:工业增加值_2008>
            <beijing_w17_test:工业增加值_2009>2303.08</beijing_w17_test:工业增加值_2009>
            <beijing_w17_test:工业增加值_2010>2763.99</beijing_w17_test:工业增加值_2010>
            <beijing_w17_test:工业增加值_2011>3048.79</beijing_w17_test:工业增加值_2011>
            <beijing_w17_test:房地产业增加值_2007>821.5</beijing_w17_test:房地产业增加值_2007>
            <beijing_w17_test:房地产业增加值_2008>844.59</beijing_w17_test:房地产业增加值_2008>
            <beijing_w17_test:房地产业增加值_2009>1062.47</beijing_w17_test:房地产业增加值_2009>
            <beijing_w17_test:房地产业增加值_2010>1006.52</beijing_w17_test:房地产业增加值_2010>
            <beijing_w17_test:房地产业增加值_2011>1074.93</beijing_w17_test:房地产业增加值_2011>
            <beijing_w17_test:人口数>19612368</beijing_w17_test:人口数>
            <beijing_w17_test:mapgis_style>1</beijing_w17_test:mapgis_style>
            <beijing_w17_test:COLOR_INDEX>1</beijing_w17_test:COLOR_INDEX>
        </beijing_w17_test:t0>
    </wfs:member>
</wfs:FeatureCollection>

2.results=hits

xml
<?xml version='1.0' encoding='utf-8'?>
<wfs:FeatureCollection xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" next="http://localhost:8089/igs/rest/services/beijing_w17_test/WFSServer?TYPENAME=beijing_w17_test%3At0;REQUEST=GetFeature;RESULTTYPE=results;VERSION=2.0.0;SERVICE=WFS;COUNT=1;STARTINDEX=0" numberMatched="1" numberReturned="0" timeStamp="2022-07-04T13:53:05.714+0800" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0/wfs.xsd"/>

LockFeature

请求

请求参数

参数名称是否必填描述
VERSION版本号。必须是2.0.0
SERVICE服务名。必须是WFS
REQUEST请求名称。必须是LockFeature
NAMESPACES命名空间。
用于指定命名空间及其前缀,形式为 xmlns(前缀为 escaped_url)。如果前缀没有被定义,则默认的命名空间应该被声明。可以通过英文逗号将 xmlns()值的多个命名空间连接起来。
VSPs提供者特定参数。
DescribeFeatureType 请求中允许可选的服务提供者特定参数(vendor-specific parameters,VSPs),这些参数由供应商指定,不属于国际标准的 KVP 参数。这些参数的使用增强了请求的响应结果。VSPs 丢失或错误时,服务可以提供一个默认值。VSPs 在不被服务所知道的情况下被应用时,服务可以选择忽略不知道的请求参数。
WFS 可以选择不声明部分或全部 VSPs。如果 VSPs 包含在 Capabilities XML 中,则 ExtendedCapabilities 元素应该进行相应扩展。包含了 ExtendedCapabilities 扩展元素的其他 Schema 文档可以被引入到 Capabilities XML 文档中。客户端可以从 Capabilities Schema 中读取服务提供者特定的定义,并且使用 VSPs 构成请求。WFS 实现者在为 VSP 选择名字时应该注意,不要与国际标准中定义的 WFS 参数产生冲突。
IGServer暂不支持该参数
TYPENAMES要素类型列表。
通过该参数可以指定多个要素类型,不同要素类型之间以英文逗号分隔。
ALIASES要素类型别名。
在查询请求中用于指定要素类型的别名,值由 TYPENAMES 参数指定。要素类型别名可以在任何地方使用,要素类型名只能用于查询请求的上下文。要素类型别名的使用方式如下所示: TYPENAMES=(ns1:FeatureType1,ns2:FeatureType2)(ns2:FeatureType2,ns2:FeatureType3)&ALIASES=(A,B)(C,D)
IGServer 暂不支持该参数。
SRSNAME坐标参考系名称。
可以根据响应文档中 SRSNAME 属性值判定,WFS 服务支持哪种应用于几何要素的 CRS 转换。SRSNAME 属性值可能为 capabilities 文档中列出的要素类型的 DefaultCRS 或 OtherCRS 值。如果 SRSNAME 属性值未指定,则响应文档中列出的要素类型应使用 DefaultCRS 值编码。
FILTER过滤表达式。
使用 FILTER_LANGUAGE 参数指定的语言编码的过滤表达式。
该参数与 BBOX 和 RESOURCEID 参数互斥。
FILTER_LANGUAGE过滤表达式编码语言。
用来指定编码过滤表达式的语言, FILTER 参数的值即为编码后的过滤表达式。FILTER_LANGUAGE 参数的默认值 urn:ogc:def:query Language:OGC-FES:Filter,用来表明 FILTER 参数的值为一个字符串,该字符串是使用国际标准中定义的 XML 标签编码的。
IGServer 暂不支持该参数。
RESOURCEID要素ID。
多个标识符间用英文逗号隔开。
该参数与 BBOX 和 FILTER 参数互斥。
BBOX边界框。
该参数与 RESOURCEID 和 FILTER 参数互斥。
SORTBY属性排序方式。
该参数用来指定属性的排序方式,可以为升序方式排序(ASC),也可以为降序方式排序(DESC)。如果未指定排序方式,则默认按升序方式排序(ASC)。
如:"SORTBY=Field1 DESC,Field2 DESC,Field3" ,表示 Field1 按降序方式排序,Field2 按降序方式排序,Field3 按升序方式排序。
STOREDQUERY_ID存储查询标识符。仅提供 GetFeatureById 存储查询方式,其对应的标识符为 urn:ogc:def:query:OGC-WFS::GetFeatureById。
STOREDQUERY_PARAMETER存储查询参数。
LOCKID指定一个现有的锁标识符,以便重新设置锁
EXPIRY在被清除之前如果没有收到释放锁的事务请求锁将持续的秒数
LOCKACTION指定如何获得锁。ALL表示所有特性都被锁

请求示例

{{server}}/igs/rest/services/:serviceName/WFSServer?request=LockFeature&service=WFS&version=2.0.0&typenames={typenames}&propertyname={propertyname}&resourceid={resourceid}&filter={filter}&bbox={bbox}&outputformat={outputformat}&namespaces={namespaces}&startindex={startindex}&count={count}&resulttype={resulttype}&srsname={srsname}&sortby={sortby}&storedquery_id={storedquery_id}&storedquery_parameter={storedquery_parameter}&lockAction={lockAction}&lockId={lockId}&expiry={expiry}

响应

响应示例

xml
<?xml version='1.0' encoding='UTF-8'?>
<wfs:LockFeatureResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml" xsi:http://www.w3.org/2001/XMLSchema-instance="http://www.opengis.net/wfs http://localhost:8089/igs/rest/ogc/schemas/wfs/1.1.0/wfs.xsd" xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test" xmlns:xlink="http://www.w3.org/1999/xlink" LockId="a758ed7d-e3e7-4d29-8d60-687561375010">
    <wfs:FeaturesLocked>
        <ogc:FeatureId fid="t0.30"/>
    </wfs:FeaturesLocked>
</wfs:LockFeatureResponse>

Transaction

请求

Transaction 操作支持通过 POST 请求实现添加要素、更新要素、替换要素以及删除要素功能,请求体采用 XML 格式,主要节点要素如下:

参数名称是否必填描述
Transaction执行事务请求时的根元素。
一个 Transaction 元素可包含 0 个或多个用于添加、更新、替换、删除要素的 Insert、Update、Replace 或 Delete 元素
Insert添加新要素操作时必选。
一个 Transaction 请求可以包含多个 Insert 元素,每个 Insert 元素可以添加一个要素。
Update更新要素操作时必选。
用 typeName 属性指定需要更新的要素类型。Update 元素可以包含一个或多个 Property 元素,该元素用于指定需要更新的要素的属性(ValueReference 元素)和属性值(Value 元素)。 一个 Transaction 请求可以包含多个 Update 元素,以实现多个相同或不同类型的要素更新。
Update 元素中可以包含一个或多个 Filter 元素,用于指定待更新要素。
Replace替换要素操作时必选。
Replace 操作和 Update 操作不同,Update 操作用于更新要素的个别属性,而 Replace 操作是用指定要素完全替换目标要素,替换后两个要素的属性值一致。
Delete删除要素操作时必选。
用 typeName 属性指定需要删除的要素类型。
Delete 元素中可以包含一个或多个 Filter 元素,用于指定待删除要素。

请求示例

{{server}}/igs/rest/services/:serviceName/WFSServer

添加

①点

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t2" xmlns:gml="http://www.opengis.net/gml/3.2">  
  <wfs:Insert> 
    <ogc_wfs:t2 xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs">  
      <ogc_wfs:NAME>test</ogc_wfs:NAME>  
      <ogc_wfs:the_geom> 
        <gml:Point xmlns:gml="http://www.opengis.net/gml/3.2" srsName="EPSG:4610">  
          <gml:coordinates>143.09,35.57</gml:coordinates> 
        </gml:Point> 
      </ogc_wfs:the_geom> 
    </ogc_wfs:t2> 
  </wfs:Insert> 
</wfs:Transaction>

②线

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/ogc/doc/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=.0.0&TYPENAME=ogc_wfs:t1" xmlns:gml="http://www.opengis.net/gml/3.2">  
  <wfs:Insert> 
    <ogc_wfs:t1 xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs">  
      <ogc_wfs:NAME>test</ogc_wfs:NAME>  
      <ogc_wfs:the_geom> 
        <gml:MultiCurve xmlns:gml="http://www.opengis.net/gml/3.2" srsName="EPSG:4610">
               <gml:curveMember>
                  <gml:LineString gml:id="t1.the_geom.1">
                     <gml:posList>112.16241 31.582382 112.16642 31.580462 112.1703 31.577864 112.17307 31.576595 112.17594 31.575686 112.17778 31.57556 112.17964 31.576155 112.18146 31.577112 112.18333 31.578566 112.18547 31.579609 112.18817 31.580189 112.19081 31.580551 112.19189 31.580675 112.19287 31.580786 112.1961 31.581305 112.19642 31.581306 112.1981 31.581314 112.20032 31.581455 112.20032 31.581455 112.20221 31.581284 112.20494 31.581095 112.20588 31.580969</gml:posList>
                  </gml:LineString>
               </gml:curveMember>
            </gml:MultiCurve>
      </ogc_wfs:the_geom> 
    </ogc_wfs:t1> 
  </wfs:Insert> 
</wfs:Transaction>

③区

展开查看
xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t0" xmlns:gml="http://www.opengis.net/gml/3.2"> 
  <wfs:Insert> 
    <ogc_wfs:t0 xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs">  
      <ogc_wfs:NAME>test</ogc_wfs:NAME>  
      <ogc_wfs:the_geom> 
        <gml:MultiSurface xmlns:gml="http://www.opengis.net/gml/3.2" srsName="urn:x-ogc:def:crs:EPSG::4610">
            <gml:surfaceMember>
                <gml:Polygon>
                    <gml:exterior>
                        <gml:LinearRing>
                            <gml:posList>114.100 30.000 114.081 30.059 114.031 30.095 113.969 30.095 113.919 30.059 113.900 30.000 113.919 29.941 113.969 29.905 114.031 29.905 114.081 29.941 114.100 30.000</gml:posList>
                        </gml:LinearRing>
                    </gml:exterior>
                </gml:Polygon>
            </gml:surfaceMember>
        </gml:MultiSurface>
      </ogc_wfs:the_geom> 
    </ogc_wfs:t0> 
  </wfs:Insert> 
</wfs:Transaction>

更新

①点

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t2"> 
  <wfs:Update xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t2">  
    <wfs:Property> 
      <wfs:Name>NAME</wfs:Name>  
      <wfs:Value>update</wfs:Value> 
    </wfs:Property>  
    <fes:Filter xmlns:fes="http://www.opengis.net/ogc">  
      <fes:ResourceId rid="t2.2"/> 
    </fes:Filter> 
  </wfs:Update> 
</wfs:Transaction>

②线

XML
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t1">  
  <wfs:Update xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t1">  
    <wfs:Property> 
      <wfs:ValueReference>NAME</wfs:ValueReference>  
      <wfs:Value>update</wfs:Value> 
    </wfs:Property>  
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
      <fes:ResourceId rid="t1.2"/> 
    </fes:Filter> 
  </wfs:Update> 
</wfs:Transaction>

③区

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t0">  
  <wfs:Update xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t0">  
    <wfs:Property> 
      <wfs:ValueReference>NAME</wfs:ValueReference>  
      <wfs:Value>update</wfs:Value> 
    </wfs:Property>  
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
      <fes:ResourceId rid="t0.2"/> 
    </fes:Filter>
  </wfs:Update> 
</wfs:Transaction>
  1. 根据filter条件,批量更新

    POST /igs/rest/services/wfs-test-china/WFSServer

    xml
    <wfs:Transaction version="2.0.0" service="WFS" xmlns:wfs-test-china="http://www.someserver.example.com/myns" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd"> 
      <wfs:Update typeName="wfs-test-china:t0">
        <wfs:Property> 
          <wfs:Name>BZ</wfs:Name>  
          <wfs:Value>update</wfs:Value> 
        </wfs:Property>  
        <fes:Filter>  
         <fes:PropertyIsLike> 
        	  <fes:ValueReference>XZQMC</fes:ValueReference>  
    		  <fes:Literal>双峰</fes:Literal> 
    	    </fes:PropertyIsLike> 
        </fes:Filter> 
      </wfs:Update> 
    </wfs:Transaction>

替换

①点

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t2" xmlns:gml="http://www.opengis.net/gml/3.2"> 
  <wfs:Replace xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t2">  
    <ogc_wfs:t2>
      <ogc_wfs:the_geom> 
        <gml:Point xmlns:gml="http://www.opengis.net/gml/3.2" srsName="EPSG:4610">  
          <gml:coordinates>143,35</gml:coordinates> 
        </gml:Point> 
      </ogc_wfs:the_geom>
      <ogc_wfs:NAME>replace</ogc_wfs:NAME>
    </ogc_wfs:t2>
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
      <fes:ResourceId rid="t2.18049"/> 
    </fes:Filter> 
  </wfs:Replace> 
</wfs:Transaction>

②线

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t1" xmlns:gml="http://www.opengis.net/gml/3.2">  
  <wfs:Replace xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t1">  
    <ogc_wfs:t1> 
      <ogc_wfs:the_geom> 
        <gml:MultiCurve xmlns:gml="http://www.opengis.net/gml/3.2" srsName="EPSG:4610">  
          <gml:curveMember> 
            <gml:LineString gml:id="t1.the_geom.1"> 
              <gml:posList>112.16241 31.582382 112.16642 31.580462 112.1703 31.577864 112.17307 31.576595 112.17594 31.575686 112.17778 31.57556 112.17964 31.576155 112.18146 31.577112 112.18333 31.578566 112.18547 31.579609 112.18817 31.580189 112.19081 31.580551 112.19189 31.580675 112.19287 31.580786 112.1961 31.581305 112.19642 31.581306 112.1981 31.581314 112.20032 31.581455 112.20032 31.581455 112.20221 31.581284 112.20494 31.581095 112.20588 31</gml:posList> 
            </gml:LineString> 
          </gml:curveMember> 
        </gml:MultiCurve> 
      </ogc_wfs:the_geom>  
      <ogc_wfs:Name>replace</ogc_wfs:Name>
    </ogc_wfs:t1>
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
        <fes:ResourceId rid="t1.2"/> 
     </fes:Filter> 
  </wfs:Replace> 
</wfs:Transaction>

③区

展开查看
xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://192.168.22.97:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t0" xmlns:gml="http://www.opengis.net/gml/3.2">  
  <wfs:Replace xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t0">  
    <ogc_wfs:t0> 
      <ogc_wfs:the_geom> 
        <gml:MultiSurface xmlns:gml="http://www.opengis.net/gml/3.2" srsName="urn:x-ogc:def:crs:EPSG::4610">
            <gml:surfaceMember>
                <gml:Polygon>
                    <gml:exterior>
                        <gml:LinearRing>
                            <gml:posList>114.100 30.000 114.081 30.059 114.031 30.095 113.969 30.095 113.919 30.059 113.900 30.000 113.919 29.941 113.969 29.905 114.031 29.905 114.081 29.941 114.100 30.000</gml:posList>
                        </gml:LinearRing>
                    </gml:exterior>
                </gml:Polygon>
            </gml:surfaceMember>
        </gml:MultiSurface>
      </ogc_wfs:the_geom>
       <ogc_wfs:NAME>replace</ogc_wfs:NAME>
    </ogc_wfs:t0>  
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
      <fes:ResourceId rid="t0.2"/> 
    </fes:Filter>
  </wfs:Replace> 
</wfs:Transaction>

删除

①点

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://127.0.0.1:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t2"> 
   <wfs:Delete xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t2">  
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
      <fes:PropertyIsEqualTo> 
        <fes:ValueReference>NAME</fes:ValueReference>  
        <fes:Literal>replace</fes:Literal> 
      </fes:PropertyIsEqualTo> 
    </fes:Filter>
  </wfs:Delete> 
</wfs:Transaction>

②线

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://127.0.0.1:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t1"> 
   <wfs:Delete xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t1">  
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
      <fes:ResourceId rid="t1.2"/> 
    </fes:Filter>
  </wfs:Delete> 
</wfs:Transaction>

③区

xml
<?xml version="1.0" encoding="utf-8"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0.0/WFS-transaction.xsd http://www.mapgis.com.cn/ogc_wfs http://127.0.0.1:8089/igs/rest/services/ogc_wfs/WFSServer?request=DescribeFeatureType&service=wfs&version=2.0.0&TYPENAME=ogc_wfs:t0"> 
   <wfs:Delete xmlns:ogc_wfs="http://www.mapgis.com.cn/ogc_wfs" typeName="ogc_wfs:t0">  
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">  
      <fes:PropertyIsEqualTo> 
        <fes:ValueReference>NAME</fes:ValueReference>  
        <fes:Literal>replace</fes:Literal> 
      </fes:PropertyIsEqualTo> 
    </fes:Filter>
  </wfs:Delete> 
</wfs:Transaction>

响应

响应示例

添加

xml
<?xml version='1.0' encoding='utf-8'?>
<wfs:TransactionResponse version="2.0.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0.0/WFS-transaction.xsd">
    <wfs:TransactionSummary>
        <wfs:totalInserted>1</wfs:totalInserted>
    </wfs:TransactionSummary>
    <wfs:InsertResults>
        <fes:Feature>
            <fes:ResourceId rid="t2.2"/>
        </fes:Feature>
    </wfs:InsertResults>
</wfs:TransactionResponse>

更新

xml
<?xml version='1.0' encoding='utf-8'?>
<wfs:TransactionResponse version="2.0.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0.0/WFS-transaction.xsd">
    <wfs:TransactionSummary>
        <wfs:totalUpdated>1</wfs:totalUpdated>
    </wfs:TransactionSummary>
    <wfs:UpdateResults>
        <fes:Feature>
            <fes:ResourceId rid="t2.2"/>
        </fes:Feature>
    </wfs:UpdateResults>
</wfs:TransactionResponse>

替换

xml
<?xml version='1.0' encoding='utf-8'?>
<wfs:TransactionResponse version="2.0.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0.0/WFS-transaction.xsd">
    <wfs:TransactionSummary>
        <wfs:totalReplaced>1</wfs:totalReplaced>
    </wfs:TransactionSummary>
    <wfs:ReplaceResults>
        <fes:Feature>
            <fes:ResourceId rid="t2.2"/>
        </fes:Feature>
    </wfs:ReplaceResults>
</wfs:TransactionResponse>

删除

xml
<?xml version='1.0' encoding='utf-8'?>
<wfs:TransactionResponse version="2.0.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0.0/WFS-transaction.xsd">
    <wfs:TransactionSummary>
        <wfs:totalDeleted>1</wfs:totalDeleted>
    </wfs:TransactionSummary>
    <wfs:DeleteResults>
        <fes:Feature>
            <fes:ResourceId rid="t1.2"/>
        </fes:Feature>
    </wfs:DeleteResults>
</wfs:TransactionResponse>

GetPropertyValue

请求

请求参数

参数名称是否必填描述
VERSION版本号。必须是2.0.0
SERVICE服务名。必须是WFS
REQUEST请求名称。必须是GetPropertyValue
NAMESPACES命名空间。
用于指定命名空间及其前缀,形式为 xmlns(前缀为 escaped_url)。如果前缀没有被定义,则默认的命名空间应该被声明。可以通过英文逗号将 xmlns()值的多个命名空间连接起来。
VSPs提供者特定参数。
DescribeFeatureType 请求中允许可选的服务提供者特定参数(vendor-specific parameters,VSPs),这些参数由供应商指定,不属于国际标准的 KVP 参数。这些参数的使用增强了请求的响应结果。VSPs 丢失或错误时,服务可以提供一个默认值。VSPs 在不被服务所知道的情况下被应用时,服务可以选择忽略不知道的请求参数。
WFS 可以选择不声明部分或全部 VSPs。如果 VSPs 包含在 Capabilities XML 中,则 ExtendedCapabilities 元素应该进行相应扩展。包含了 ExtendedCapabilities 扩展元素的其他 Schema 文档可以被引入到 Capabilities XML 文档中。客户端可以从 Capabilities Schema 中读取服务提供者特定的定义,并且使用 VSPs 构成请求。WFS 实现者在为 VSP 选择名字时应该注意,不要与国际标准中定义的 WFS 参数产生冲突。
IGServer暂不支持该参数
TYPENAMES要素类型列表。
通过该参数可以指定多个要素类型,不同要素类型之间以英文逗号分隔。
ALIASES要素类型别名。
在查询请求中用于指定要素类型的别名,值由 TYPENAMES 参数指定。要素类型别名可以在任何地方使用,要素类型名只能用于查询请求的上下文。要素类型别名的使用方式如下所示: TYPENAMES=(ns1:FeatureType1,ns2:FeatureType2)(ns2:FeatureType2,ns2:FeatureType3)&ALIASES=(A,B)(C,D)
IGServer 暂不支持该参数。
SRSNAME坐标参考系名称。
可以根据响应文档中 SRSNAME 属性值判定,WFS 服务支持哪种应用于几何要素的 CRS 转换。SRSNAME 属性值可能为 capabilities 文档中列出的要素类型的 DefaultCRS 或 OtherCRS 值。如果 SRSNAME 属性值未指定,则响应文档中列出的要素类型应使用 DefaultCRS 值编码。
FILTER过滤表达式。
使用 FILTER_LANGUAGE 参数指定的语言编码的过滤表达式。
该参数与 BBOX 和 RESOURCEID 参数互斥。
FILTER_LANGUAGE过滤表达式编码语言。
用来指定编码过滤表达式的语言, FILTER 参数的值即为编码后的过滤表达式。FILTER_LANGUAGE 参数的默认值 urn:ogc:def:query Language:OGC-FES:Filter,用来表明 FILTER 参数的值为一个字符串,该字符串是使用国际标准中定义的 XML 标签编码的。
IGServer 暂不支持该参数。
RESOURCEID要素ID。
多个标识符间用英文逗号隔开。
该参数与 BBOX 和 FILTER 参数互斥。
BBOX边界框。
该参数与 RESOURCEID 和 FILTER 参数互斥。
SORTBY属性排序方式。
该参数用来指定属性的排序方式,可以为升序方式排序(ASC),也可以为降序方式排序(DESC)。如果未指定排序方式,则默认按升序方式排序(ASC)。
如:"SORTBY=Field1 DESC,Field2 DESC,Field3" ,表示 Field1 按降序方式排序,Field2 按降序方式排序,Field3 按升序方式排序。
STOREDQUERY_ID存储查询标识符。仅提供 GetFeatureById 存储查询方式,其对应的标识符为 urn:ogc:def:query:OGC-WFS::GetFeatureById。
STOREDQUERY_PARAMETER存储查询参数。
VALUEREFERENCE属性字段名。
VALUEREFERENCE 参数是用来标识节点或子节点的要素属性字段的 XPath 表达式。要素属性字段值应该从服务器数据存储中获取,并且在响应文档中报告。如果属性值为远程资源的索引,则可以使用 valueOf() 存取函数解析远程值。
RESOLVEPATH修改参数行为。
当使用了该参数,RESOLVE 参数无意义。RESOLVEPATH 参数值可通过 valueOf() 存取函数获取。目前 SuperMap iServer 不支持该参数。
IGServer 暂不支持该参数。

请求示例

{{server}}/igs/rest/services/:serviceName/WFSServer?request=GetPropertyValue&service=WFS&version=2.0.0&typenames={typenames}&valuereference={valuereference}&propertyname={propertyname}&resourceid={resourceid}&filter={filter}&bbox={bbox}&outputformat={outputformat}&namespaces={namespaces}&startindex={startindex}&count={count}&resulttype={resulttype}&srsname={srsname}&sortby={sortby}&storedquery_id={storedquery_id}&storedquery_parameter={storedquery_parameter}

响应

响应示例

xml
<?xml version='1.0' encoding='UTF-8'?>
<wfs:ValueCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xmlns="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0.0/wfs.xsd">
    <wfs:member>
        <beijing_w17_test:省名>北京</beijing_w17_test:省名>
    </wfs:member>
</wfs:ValueCollection>

ListStoredQueries

请求

请求参数

参数名称是否必填描述
VERSION请求版本号。必须是2.0.0
SERVICE服务类型。必须是WFS
REQUEST请求名称。必须是ListStoredQueries
NAMESPACES命名空间。 用于指定命名空间及其前缀,形式为 xmlns(前缀为 escaped_url)。如果前缀没有被定义,则默认的命名空间应该被声明。可以通过英文逗号将 xmlns()值的多个命名空间连接起来。
VPS提供者特定参数。 DescribeFeatureType 请求中允许可选的服务提供者特定参数(vendor-specific parameters,VSPs),这些参数由供应商指定,不属于国际标准的 KVP 参数。这些参数的使用增强了请求的响应结果。VSPs 丢失或错误时,服务可以提供一个默认值。VSPs 在不被服务所知道的情况下被应用时,服务可以选择忽略不知道的请求参数。WFS 可以选择不声明部分或全部 VSPs。
如果 VSPs 包含在 Capabilities XML 中,则 ExtendedCapabilities 元素应该进行相应扩展。包含了 ExtendedCapabilities 扩展元素的其他 Schema 文档可以被引入到 Capabilities XML 文档中。客户端可以从 Capabilities Schema 中读取服务提供者特定的定义,并且使用 VSPs 构成请求。WFS 实现者在为 VSP 选择名字时应该注意,不要与国际标准中定义的 WFS 参数产生冲突。
IGServer暂不支持该参数

请求示例

{{server}}/igs/rest/services/:serviceName/WFSServer?service=WFS&version=2.0.0&request=ListStoredQueries&namespaces={namespaces}

响应

响应示例

xml
<?xml version='1.0' encoding='utf-8'?>
<wfs:ListStoredQueriesResponse xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0.0/wfs.xsd">
    <wfs:StoredQuery id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
        <wfs:Title xml:lang="en">Get feature by identifier</wfs:Title>
        <wfs:ReturnFeatureType>beijing_w17_test:t0</wfs:ReturnFeatureType>
        <wfs:ReturnFeatureType>beijing_w17_test:t1</wfs:ReturnFeatureType>
        <wfs:ReturnFeatureType>beijing_w17_test:t2</wfs:ReturnFeatureType>
        <wfs:ReturnFeatureType>beijing_w17_test:t3</wfs:ReturnFeatureType>
    </wfs:StoredQuery>
</wfs:ListStoredQueriesResponse>

DescribeStoredQueries

请求

请求参数

参数名称是否必填描述
VERSION请求版本号。必须是2.0.0
SERVICE服务类型。必须是WFS
REQUEST请求名称。必须是DescribeStoredQueries
NAMESPACES命名空间。用于指定命名空间及其前缀,形式为 xmlns(前缀为 escaped_url)。如果前缀没有被定义,则默认的命名空间应该被声明。可以通过英文逗号将 xmlns()值的多个命名空间连接起来。
VPS提供者特定参数。
DescribeFeatureType 请求中允许可选的服务提供者特定参数(vendor-specific parameters,VSPs),这些参数由供应商指定,不属于国际标准的 KVP 参数。这些参数的使用增强了请求的响应结果。VSPs 丢失或错误时,服务可以提供一个默认值。VSPs 在不被服务所知道的情况下被应用时,服务可以选择忽略不知道的请求参数。
WFS 可以选择不声明部分或全部 VSPs。如果 VSPs 包含在 Capabilities XML 中,则 ExtendedCapabilities 元素应该进行相应扩展。包含了 ExtendedCapabilities 扩展元素的其他 Schema 文档可以被引入到 Capabilities XML 文档中。客户端可以从 Capabilities Schema 中读取服务提供者特定的定义,并且使用 VSPs 构成请求。WFS 实现者在为 VSP 选择名字时应该注意,不要与国际标准中定义的 WFS 参数产生冲突。
IGServer暂不支持该参数
STOREDQUERY_ID存储查询方式标识符。
用英文逗号分隔开的存储查询方式的标识符列表。如果该参数的值未指定,则表示返回 WFS 2.0.0 服务支持的所有存储查询方式的描述。
IGServer 只支持 GetFeatureById 存储查询方式。

请求示例

{{server}}/igs/rest/services/:serviceName/WFSServer?service=WFS&version=2.0.0&request=DescribeStoredQueries&namespaces={namespaces}&storedquery_id=urn:ogc:def:query:OGC-WFS::GetFeatureById

响应

响应示例

xml
<?xml version='1.0' encoding='UTF-8'?>
<wfs:DescribeStoredQueriesResponse xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0http://localhost:8089/igs/rest/ogc/schemas/wfs/2.0.0/wfs.xsd">
    <wfs:StoredQueryDescription id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
        <wfs:Title xml:lang="en">Get feature by identifier</wfs:Title>
        <wfs:Parameter name="ID" type="xs:string"/>
        <wfs:QueryExpressionText xmlns:beijing_w17_test="http://www.mapgis.com.cn/beijing_w17_test" isPrivate="true" language="urn:ogc:def:queryLanguage:OGC-WFS::WFSQueryExpression" returnFeatureTypes="beijing_w17_test:t0 beijing_w17_test:t1 beijing_w17_test:t2 beijing_w17_test:t3 beijing_w17_test:t4 beijing_w17_test:t5 beijing_w17_test:t6 beijing_w17_test:t7 beijing_w17_test:t8 beijing_w17_test:t9 beijing_w17_test:t10 beijing_w17_test:t11 beijing_w17_test:t12 beijing_w17_test:t13 beijing_w17_test:t14 beijing_w17_test:t15 beijing_w17_test:t16 beijing_w17_test:t17 beijing_w17_test:t18 beijing_w17_test:t19 beijing_w17_test:t20 beijing_w17_test:t21 beijing_w17_test:t22 beijing_w17_test:t23 beijing_w17_test:t24 beijing_w17_test:t25 beijing_w17_test:t26 beijing_w17_test:t27 beijing_w17_test:t28 beijing_w17_test:t29 beijing_w17_test:t30 beijing_w17_test:t31 beijing_w17_test:t32 beijing_w17_test:t33 beijing_w17_test:t34 beijing_w17_test:t35 beijing_w17_test:t36 beijing_w17_test:t37 beijing_w17_test:t38 beijing_w17_test:t39 beijing_w17_test:t40 beijing_w17_test:t41 beijing_w17_test:t42 beijing_w17_test:t43 beijing_w17_test:t44 beijing_w17_test:t45 beijing_w17_test:t46 beijing_w17_test:t47 beijing_w17_test:t48 beijing_w17_test:t49 beijing_w17_test:t50 beijing_w17_test:t51 beijing_w17_test:t52 beijing_w17_test:t53 beijing_w17_test:t54 beijing_w17_test:t55 beijing_w17_test:t56 beijing_w17_test:t57 beijing_w17_test:t58 beijing_w17_test:t59 beijing_w17_test:t60 beijing_w17_test:t61 beijing_w17_test:t62 beijing_w17_test:t63 beijing_w17_test:t64 beijing_w17_test:t65 beijing_w17_test:t66 beijing_w17_test:t67 beijing_w17_test:t68 beijing_w17_test:t69 beijing_w17_test:t70 beijing_w17_test:t71 beijing_w17_test:t72 beijing_w17_test:t73 beijing_w17_test:t74 beijing_w17_test:t75 beijing_w17_test:t76 beijing_w17_test:t77 beijing_w17_test:t78 beijing_w17_test:t79 beijing_w17_test:t80"/>
    </wfs:StoredQueryDescription>
</wfs:DescribeStoredQueriesResponse>