OGC标准接口学习

OGC 全称 Open Geospatial Consortium,是一个非盈利的、国际化的、自愿协商的标准化组织,它的主要目的就是制定与空间信息、基于位置服务相关的标准

DescribeFeatureType

返回WFS服务支持的字段类型的描述

入参

参数 是否必须 示例 描述
SERVICE WFS 服务类型
REQUEST DescribeFeatureType 方法名
VERSION 1.0.0,1.1.0 版本号
TYPENAMES workspace:layer 工作空间:图层名
OUTPUTFORMAT text/xml,subtype=gml/3.1.1,application/json 输出格式

出参

示例


{
    "elementFormDefault": "qualified",
    "targetNamespace": "topp",//命名空间
    "targetPrefix": "topp",
    "featureTypes": [
        {
            "typeName": "state",//图层名
            "properties": [
                {
                    "name": "geom",//字段名
                    "maxOccurs": 1,
                    "minOccurs": 0,
                    "nillable": true,
                    "type": "gml:MultiPolygon",
                    "localType": "MultiPolygon"//字段类型
                },
                {
                    "name": "objectid",
                    "maxOccurs": 1,
                    "minOccurs": 0,
                    "nillable": true,
                    "type": "xsd:int",
                    "localType": "int"
                },
                {
                    "name": "name",
                    "maxOccurs": 1,
                    "minOccurs": 0,
                    "nillable": true,
                    "type": "xsd:string",
                    "localType": "string"
                }
            ]
        }
    ]
}

GetFeature

返回指定图层中选择的数据,包括几何图形和属性值

入参

参数 是否必须 示例 描述
SERVICE WFS 服务类型
REQUEST GetFeature 方法名
VERSION 1.1.0,2.0.0 版本号
TYPENAME workspace:layer 工作空间:图层名
OUTPUTFORMAT application/json 输出格式
PropertyName field 指定字段
sortBy field 指定字段,+A升序,+D降序
MAXFEATURES 50 最大数量
FEATUREID featureId
CQL_FILTER INTERSECTS(the_geom,POINT(-74.817265 40.5296504)) cql过滤

出参

示例

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "id": "fid.1",
            "geometry": {// geometry
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                123.49846,
                                25.74109
                            ],
                            [
                                123.49878,
                                25.74333
                            ],
                            [
                                123.48812,
                                25.74812
                            ],
                            [
                                123.47404,
                                25.74846
                            ],
                            [
                                123.46312,
                                25.74766
                            ],
                            [
                                123.43935,
                                25.7406
                            ],
                            [
                                123.43155,
                                25.72788
                            ],
                            [
                                123.45451,
                                25.72004
                            ],
                            [
                                123.48675,
                                25.7197
                            ],
                            [
                                123.49728,
                                25.72717
                            ],
                            [
                                123.49846,
                                25.74109
                            ]
                        ]
                    ]
                ]
            },
            "geometry_name": "the_geom", // geometry字段名
            "properties": { //图层结构化数据 
                "SmUserID": 0,
                "SmID": 679,
                "SmGeometrySize": 188,
                "SmGeoPosition": 293879664,
                "SmArea": 1.6862486784110367E7,
                "SQMI": null,
                "SQKM": null,
                "POP_1994": null,
                "ColorID": 1,
                "COUNTRY": "",
                "CONTINENT": "",
                "COLOR_MAP": "1",
                "CAPITAL": ""
            }
        }
    ],
    "totalFeatures": 1889,//总条数
    "numberMatched": 1889,//命中条数
    "numberReturned": 1,//返回条数
    "timeStamp": "2023-04-25T07:33:34.281Z",
    "crs": {//坐标系
        "type": "name",
        "properties": {
            "name": "urn:ogc:def:crs:EPSG::4490"
        }
    }
}

GetCapabilities

生成一个元数据文档,描述提供的WFS服务以及有效的WFS操作和参数。
有关WMS提供的操作、服务和数据的元数据。

参数 是否必须 示例 描述
SERVICE WFS/WMS/WCS 服务
REQUEST GetCapabilities 方法
VERSIONS 1.0.0,1.1.0,1.1.1,1.3.0,2.0.0 版本
SECTIONS Contents/FeatureTypeList 获取部分
NAMESPACE text/xml 输出格式

WMS示例

<?xml version="1.0" encoding="UTF-8"?>
<WMS_Capabilities version="1.3.0" updateSequence="2241" xmlns="http://www.opengis.net/wms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wms http://geoserver.com/geoserver/schemas/wms/1.3.0/capabilities_1_3_0.xsd">
    <Service>
        <Name>WMS</Name>
        <Title>GeoServer Web Map Service</Title>
        <Abstract>A compliant implementation of WMS plus most of the SLD extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
        <KeywordList>
            <Keyword>WFS</Keyword>
            <Keyword>WMS</Keyword>
            <Keyword>GEOSERVER</Keyword>
        </KeywordList>
        <OnlineResource xlink:type="simple" xlink:href="http://geoserver.org"/>
        <ContactInformation>
            <ContactPersonPrimary>
                <ContactPerson>Claudius Ptolomaeus</ContactPerson>
                <ContactOrganization>The Ancient Geographers</ContactOrganization>
            </ContactPersonPrimary>
            <ContactPosition>Chief Geographer</ContactPosition>
            <ContactAddress>
                <AddressType>Work</AddressType>
                <Address/>
                <City>Alexandria</City>
                <StateOrProvince/>
                <PostCode/>
                <Country>Egypt</Country>
            </ContactAddress>
            <ContactVoiceTelephone/>
            <ContactFacsimileTelephone/>
            <ContactElectronicMailAddress>[email protected]</ContactElectronicMailAddress>
        </ContactInformation>
        <Fees>NONE</Fees>
        <AccessConstraints>NONE</AccessConstraints>
    </Service>
    <Capability>
        <Request>
            <GetCapabilities>
                <Format>text/xml</Format>
                <DCPType>
                    <HTTP>
                        <Get>
                            <OnlineResource xlink:type="simple" xlink:href="http://geoserver.com/geoserver/World/ows?SERVICE=WMS&amp;"/>
                        </Get>
                        <Post>
                            <OnlineResource xlink:type="simple" xlink:href="http://geoserver.com/geoserver/World/ows?SERVICE=WMS&amp;"/>
                        </Post>
                    </HTTP>
                </DCPType>
            </GetCapabilities>
            <GetMap>
                <Format>image/png</Format>
                <Format>application/atom+xml</Format>
                <Format>application/geopackage+sqlite3</Format>
                <Format>application/json;type=utfgrid</Format>
                <Format>application/pdf</Format>
                <Format>application/x-sqlite3</Format>
                <Format>image/geotiff</Format>
                <Format>image/geotiff8</Format>
                <Format>image/gif</Format>
                <Format>image/jpeg</Format>
                <Format>image/png; mode=8bit</Format>
                <Format>image/svg+xml</Format>
                <Format>image/tiff</Format>
                <Format>image/tiff8</Format>
                <Format>image/vnd.jpeg-png</Format>
                <Format>image/vnd.jpeg-png8</Format>
                <Format>text/html; subtype=openlayers</Format>
                <Format>text/html; subtype=openlayers2</Format>
                <Format>text/html; subtype=openlayers3</Format>
                <DCPType>
                    <HTTP>
                        <Get>
                            <OnlineResource xlink:type="simple" xlink:href="http://geoserver.com/geoserver/World/ows?SERVICE=WMS&amp;"/>
                        </Get>
                    </HTTP>
                </DCPType>
            </GetMap>
            <GetFeatureInfo>
                <Format>text/plain</Format>
                <Format>application/vnd.ogc.gml</Format>
                <Format>text/xml</Format>
                <Format>application/vnd.ogc.gml/3.1.1</Format>
                <Format>text/xml; subtype=gml/3.1.1</Format>
                <Format>text/html</Format>
                <Format>application/json</Format>
                <DCPType>
                    <HTTP>
                        <Get>
                            <OnlineResource xlink:type="simple" xlink:href="http://geoserver.com/geoserver/World/ows?SERVICE=WMS&amp;"/>
                        </Get>
                    </HTTP>
                </DCPType>
            </GetFeatureInfo>
        </Request>
        <Exception>
            <Format>XML</Format>
            <Format>INIMAGE</Format>
            <Format>BLANK</Format>
            <Format>JSON</Format>
        </Exception>
        <Layer>
            <Title>GeoServer Web Map Service</Title>
            <Abstract>A compliant implementation of WMS plus most of the SLD extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
            <!--All supported EPSG projections:-->
            <CRS>EPSG:4326</CRS>
            <CRS>EPSG:4490</CRS>
            ...
            <CRS>CRS:84</CRS>
            <EX_GeographicBoundingBox>
                <westBoundLongitude>-180.0</westBoundLongitude>
                <eastBoundLongitude>464356.09312885156</eastBoundLongitude>
                <southBoundLatitude>-90.0</southBoundLatitude>
                <northBoundLatitude>2871057.3542110883</northBoundLatitude>
            </EX_GeographicBoundingBox>
            <BoundingBox CRS="CRS:84" minx="-180.0" miny="-90.0" maxx="464356.09312885156" maxy="2871057.3542110883"/>
            <Layer queryable="1" opaque="0">
                <Name>Countries</Name>
                <Title>World:Countries</Title>
                <Abstract/>
                <KeywordList>
                    <Keyword>features</Keyword>
                    <Keyword>Countries</Keyword>
                </KeywordList>
                <CRS>EPSG:4490</CRS>
                <CRS>CRS:84</CRS>
                <EX_GeographicBoundingBox>
                    <westBoundLongitude>-180.0</westBoundLongitude>
                    <eastBoundLongitude>179.9862060546875</eastBoundLongitude>
                    <southBoundLatitude>-90.0</southBoundLatitude>
                    <northBoundLatitude>83.62360382080078</northBoundLatitude>
                </EX_GeographicBoundingBox>
                <BoundingBox CRS="CRS:84" minx="-180.0" miny="-90.0" maxx="179.9862060546875" maxy="83.62360382080078"/>
                <BoundingBox CRS="EPSG:4490" minx="-90.0" miny="-180.0" maxx="83.62360382080078" maxy="179.9862060546875"/>
                <Style>
                    <Name>polygon</Name>
                    <Title>Default Polygon</Title>
                    <Abstract>A sample style that draws a polygon</Abstract>
                    <LegendURL width="20" height="20">
                        <Format>image/png</Format>
                        <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://geoserver.com/geoserver/World/ows?service=WMS&amp;version=1.3.0&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=World:Countries"/>
                    </LegendURL>
                </Style>
            </Layer>          
            
        </Layer>
    </Capability>
</WMS_Capabilities>

WFS示例

<?xml version="1.0" encoding="UTF-8"?>
<wfs:WFS_Capabilities version="2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wfs/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://geoserver.com/geoserver/schemas/wfs/2.0/wfs.xsd" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:World="World" updateSequence="2243">
    <ows:ServiceIdentification>
        <ows:Title>GeoServer Web Feature Service</ows:Title>
        <ows:Abstract>This is the reference implementation of WFS 1.0.0 and WFS 1.1.0, supports all WFS operations including Transaction.</ows:Abstract>
        <ows:Keywords>
            <ows:Keyword>WFS</ows:Keyword>
            <ows:Keyword>WMS</ows:Keyword>
            <ows:Keyword>GEOSERVER</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>The Ancient Geographers</ows:ProviderName>
        <ows:ServiceContact>
            <ows:IndividualName>Claudius Ptolomaeus</ows:IndividualName>
            <ows:PositionName>Chief Geographer</ows:PositionName>
            <ows:ContactInfo>
                <ows:Phone>
                    <ows:Voice/>
                    <ows:Facsimile/>
                </ows:Phone>
                <ows:Address>
                    <ows:DeliveryPoint/>
                    <ows:City>Alexandria</ows:City>
                    <ows:AdministrativeArea/>
                    <ows:PostalCode/>
                    <ows:Country>Egypt</ows:Country>
                    <ows:ElectronicMailAddress>[email protected]</ows:ElectronicMailAddress>
                </ows:Address>
            </ows:ContactInfo>
        </ows:ServiceContact>
    </ows:ServiceProvider>
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </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 xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </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 xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </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>application/gml+xml; version=3.2</ows:Value>
                    <ows:Value>GML2</ows:Value>
                    <ows:Value>KML</ows:Value>
                    <ows:Value>SHAPE-ZIP</ows:Value>
                    <ows:Value>application/geopackage+sqlite3</ows:Value>
                    <ows:Value>application/json</ows:Value>
                    <ows:Value>csv</ows:Value>
                    <ows:Value>geopackage</ows:Value>
                    <ows:Value>geopkg</ows:Value>
                    <ows:Value>gml3</ows:Value>
                    <ows:Value>gml32</ows:Value>
                    <ows:Value>gpkg</ows:Value>
                    <ows:Value>json</ows:Value>
                    <ows:Value>text/csv</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:AllowedValues>
            </ows:Parameter>
            <ows:Parameter name="resolve">
                <ows:AllowedValues>
                    <ows:Value>none</ows:Value>
                    <ows:Value>local</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
            <ows:Constraint name="PagingIsTransactionSafe">
                <ows:NoValues/>
                <ows:DefaultValue>FALSE</ows:DefaultValue>
            </ows:Constraint>
            <ows:Constraint name="CountDefault">
                <ows:NoValues/>
                <ows:DefaultValue>1000000</ows:DefaultValue>
            </ows:Constraint>
        </ows:Operation>
        <ows:Operation name="GetPropertyValue">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </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 xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="DescribeStoredQueries">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="CreateStoredQuery">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="language">
                <ows:AllowedValues>
                    <ows:Value>urn:ogc:def:queryLanguage:OGC-WFS::WFSQueryExpression</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
        </ows:Operation>
        <ows:Operation name="DropStoredQuery">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="LockFeature">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </ows:HTTP>
            </ows:DCP>
            <ows:Parameter name="releaseAction">
                <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 xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </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>application/gml+xml; version=3.2</ows:Value>
                    <ows:Value>GML2</ows:Value>
                    <ows:Value>KML</ows:Value>
                    <ows:Value>SHAPE-ZIP</ows:Value>
                    <ows:Value>application/geopackage+sqlite3</ows:Value>
                    <ows:Value>application/json</ows:Value>
                    <ows:Value>csv</ows:Value>
                    <ows:Value>geopackage</ows:Value>
                    <ows:Value>geopkg</ows:Value>
                    <ows:Value>gml3</ows:Value>
                    <ows:Value>gml32</ows:Value>
                    <ows:Value>gpkg</ows:Value>
                    <ows:Value>json</ows:Value>
                    <ows:Value>text/csv</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:AllowedValues>
            </ows:Parameter>
            <ows:Parameter name="resolve">
                <ows:AllowedValues>
                    <ows:Value>none</ows:Value>
                    <ows:Value>local</ows:Value>
                </ows:AllowedValues>
            </ows:Parameter>
        </ows:Operation>
        <ows:Operation name="Transaction">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                    <ows:Post xlink:href="http://geoserver.com/geoserver/World/wfs"/>
                </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:OperationsMetadata>
    <FeatureTypeList>
        <FeatureType xmlns:World="World">
            <Name>World:Capitals</Name>
            <Title>Capitals</Title>
            <Abstract/>
            <ows:Keywords>
                <ows:Keyword>features</ows:Keyword>
                <ows:Keyword>Capitals</ows:Keyword>
            </ows:Keywords>
            <DefaultCRS>urn:ogc:def:crs:EPSG::4490</DefaultCRS>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>-175.2456512451172 -41.334842681884766</ows:LowerCorner>
                <ows:UpperCorner>179.22189331054688 64.13500213623047</ows:UpperCorner>
            </ows:WGS84BoundingBox>
        </FeatureType>
    </FeatureTypeList>
    <fes:Filter_Capabilities>
        <fes:Conformance>
            <fes:Constraint name="ImplementsQuery">
                <ows:NoValues/>
                <ows:DefaultValue>TRUE</ows:DefaultValue>
            </fes:Constraint>
            ...
        </fes:Conformance>
        <fes:Id_Capabilities>
            <fes:ResourceIdentifier name="fes:ResourceId"/>
        </fes:Id_Capabilities>
        <fes:Scalar_Capabilities>
            <fes:LogicalOperators/>
            <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:ComparisonOperator name="PropertyIsNil"/>
            </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:MultiLineString"/>
                <fes:GeometryOperand name="gml:Polygon"/>
                <fes:GeometryOperand name="gml:MultiPolygon"/>
                <fes:GeometryOperand name="gml:MultiGeometry"/>
            </fes:GeometryOperands>
            <fes:SpatialOperators>
                <fes:SpatialOperator name="Disjoint"/>
                <fes:SpatialOperator name="Equals"/>
                <fes:SpatialOperator name="DWithin"/>
                <fes:SpatialOperator name="Beyond"/>
                <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="BBOX"/>
            </fes:SpatialOperators>
        </fes:Spatial_Capabilities>
        <fes:Temporal_Capabilities>
            <fes:TemporalOperands>
                <fes:TemporalOperand name="gml:TimeInstant"/>
                <fes:TemporalOperand name="gml:TimePeriod"/>
            </fes:TemporalOperands>
            <fes:TemporalOperators>
                <fes:TemporalOperator name="After"/>
                <fes:TemporalOperator name="Before"/>
                <fes:TemporalOperator name="Begins"/>
                <fes:TemporalOperator name="BegunBy"/>
                <fes:TemporalOperator name="TContains"/>
                <fes:TemporalOperator name="During"/>
                <fes:TemporalOperator name="TEquals"/>
                <fes:TemporalOperator name="TOverlaps"/>
                <fes:TemporalOperator name="Meets"/>
                <fes:TemporalOperator name="OverlappedBy"/>
                <fes:TemporalOperator name="MetBy"/>
                <fes:TemporalOperator name="EndedBy"/>
            </fes:TemporalOperators>
        </fes:Temporal_Capabilities>
        <fes:Functions>
            <fes:Function name="abs">
                <fes:Returns>xs:int</fes:Returns>
                <fes:Arguments>
                    <fes:Argument name="int">
                        <fes:Type>xs:int</fes:Type>
                    </fes:Argument>
                </fes:Arguments>
            </fes:Function>
            ...
        </fes:Functions>
    </fes:Filter_Capabilities>
</wfs:WFS_Capabilities>

WMTS示例

<?xml version="1.0" encoding="UTF-8"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" 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" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
    <ows:ServiceIdentification>
        <ows:Title>GeoServer Web Map Tile Service</ows:Title>
        <ows:Abstract>A compliant implementation of WMTS service.</ows:Abstract>
        <ows:Keywords/>
        <ows:ServiceType>OGC WMTS</ows:ServiceType>
        <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
        <ows:Fees>NONE</ows:Fees>
        <ows:AccessConstraints>NONE</ows:AccessConstraints>
    </ows:ServiceIdentification>
    <ows:ServiceProvider>
        <ows:ProviderName>http://geoserver.org</ows:ProviderName>
        <ows:ServiceContact>
            <ows:IndividualName>Claudius Ptolomaeus</ows:IndividualName>
            <ows:PositionName>Chief Geographer</ows:PositionName>
            <ows:ContactInfo>
                <ows:Address>
                    <ows:City>Alexandria</ows:City>
                    <ows:Country>Egypt</ows:Country>
                    <ows:ElectronicMailAddress>[email protected]</ows:ElectronicMailAddress>
                </ows:Address>
            </ows:ContactInfo>
        </ows:ServiceContact>
    </ows:ServiceProvider>
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/gwc/service/wmts?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/gwc/service/wmts?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetFeatureInfo">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="http://geoserver.com/geoserver/gwc/service/wmts?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <Layer>
            <ows:Title>World:Capitals</ows:Title>
            <ows:WGS84BoundingBox>
                <ows:LowerCorner>-175.2456512451172 -41.334842681884766</ows:LowerCorner>
                <ows:UpperCorner>179.22189331054688 64.13500213623047</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <ows:Identifier>World:Capitals</ows:Identifier>
            <Style isDefault="true">
                <ows:Identifier>point</ows:Identifier>
                <LegendURL format="image/png" xlink:href="http://geoserver.com/geoserver/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=World%3ACapitals" width="20" height="20"/>
            </Style>
            <Format>image/png</Format>
            <Format>image/jpeg</Format>
            <InfoFormat>text/plain</InfoFormat>
            <InfoFormat>application/vnd.ogc.gml</InfoFormat>
            <InfoFormat>text/xml</InfoFormat>
            <InfoFormat>application/vnd.ogc.gml/3.1.1</InfoFormat>
            <InfoFormat>text/xml</InfoFormat>
            <InfoFormat>text/html</InfoFormat>
            <InfoFormat>application/json</InfoFormat>
            <TileMatrixSetLink>
                <TileMatrixSet>EPSG:4490</TileMatrixSet>
            </TileMatrixSetLink>
            <TileMatrixSetLink>
                <TileMatrixSet>EPSG:4326</TileMatrixSet>
                <TileMatrixSetLimits>
                    <TileMatrixLimits>
                        <TileMatrix>EPSG:4326:0</TileMatrix>
                        <MinTileRow>0</MinTileRow>
                        <MaxTileRow>0</MaxTileRow>
                        <MinTileCol>0</MinTileCol>
                        <MaxTileCol>1</MaxTileCol>
                    </TileMatrixLimits>
                    ...
                    <TileMatrixLimits>
                        <TileMatrix>EPSG:4326:21</TileMatrix>
                        <MinTileRow>301349</MinTileRow>
                        <MaxTileRow>1530161</MaxTileRow>
                        <MinTileCol>55392</MinTileCol>
                        <MaxTileCol>4185238</MaxTileCol>
                    </TileMatrixLimits>
                </TileMatrixSetLimits>
            </TileMatrixSetLink>
            <ResourceURL format="image/png" resourceType="tile" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}?format=image/png"/>
            <ResourceURL format="image/jpeg" resourceType="tile" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg"/>
            <ResourceURL format="text/plain" resourceType="FeatureInfo" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=text/plain"/>
            <ResourceURL format="application/vnd.ogc.gml" resourceType="FeatureInfo" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=application/vnd.ogc.gml"/>
            <ResourceURL format="text/xml" resourceType="FeatureInfo" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=text/xml"/>
            <ResourceURL format="application/vnd.ogc.gml/3.1.1" resourceType="FeatureInfo" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=application/vnd.ogc.gml/3.1.1"/>
            <ResourceURL format="text/xml" resourceType="FeatureInfo" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=text/xml"/>
            <ResourceURL format="text/html" resourceType="FeatureInfo" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=text/html"/>
            <ResourceURL format="application/json" resourceType="FeatureInfo" template="http://geoserver.com/geoserver/gwc/service/wmts/rest/World:Capitals/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=application/json"/>
        </Layer>
    </Contents>
    <ServiceMetadataURL xlink:href="http://geoserver.com/geoserver/gwc/service/wmts?SERVICE=wmts&amp;REQUEST=getcapabilities&amp;VERSION=1.0.0"/>
    <ServiceMetadataURL xlink:href="http://geoserver.com/geoserver/gwc/service/wmts/rest/WMTSCapabilities.xml"/>
</Capabilities>

热门相关:帝少的专属:小甜心,太缠人   寂静王冠   仗剑高歌   刺客之王   学霸女神超给力