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>claudius.ptolomaeus@gmail.com</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>claudius.ptolomaeus@gmail.com</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>claudius.ptolomaeus@gmail.com</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>

原文链接:https://www.cnblogs.com/walkAlwaysInCode/p/17353902.html

本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:OGC标准接口学习 - Python技术站

(0)
上一篇 2023年4月27日
下一篇 2023年4月27日

相关文章

  • Spring 异步接口返回结果的四种方式

    下面详细讲解Spring异步接口返回结果的四种方式。 1. 使用Callable Spring提供了一个非常简洁的方式来处理异步请求,即使用Java 5中引入的Callable接口。可以使用返回Callable的Controller方法来处理异步请求,Spring会将Callable提交到任务执行器中执行,然后将结果写入响应体中。 示例代码: @RestCo…

    Java 2023年5月31日
    00
  • 很简单的Java断点续传实现原理

    下面是关于“很简单的Java断点续传实现原理”的完整攻略。 一、什么是Java断点续传? Java断点续传是指,在下载或上传文件时,出现网络中断等问题导致下载或上传任务中断时,可以通过实现“断点续传”功能,让下载或上传任务从中断的地方继续执行,而不是重新开始。 二、Java断点续传的实现原理 Java断点续传的实现原理是,通过HTTP协议中的range请求头…

    Java 2023年5月19日
    00
  • 基于Spring的Maven项目实现发送邮件功能的示例

    这里是一份基于Spring的Maven项目实现发送邮件功能的攻略,包含了完整的步骤和示例,帮助你了解如何在项目中实现发送邮件的功能。 1. 配置POM文件 首先,咱们需要在pom.xml文件中添加以下依赖: <dependency> <groupId>org.springframework</groupId> <ar…

    Java 2023年6月15日
    00
  • maven中配置项目的jdk版本无效的排查方式

    请听我讲解maven中配置项目的jdk版本无效的排查方式的完整攻略。 1. 确认maven中配置jdk版本是否正确 在pom.xml文件中配置项目使用的jdk版本,如果这个配置是正确的,那么可以使用maven命令查看项目依赖的jdk版本: mvn help:effective-pom 执行该命令后,会在终端输出effective-pom的结果,其中即可看到j…

    Java 2023年5月20日
    00
  • java常用工具类之DES和Base64加密解密类

    下面我将为您详细讲解“java常用工具类之DES和Base64加密解密类”的完整攻略。 1. 什么是DES和Base64加密解密算法 DES是一种对称加密算法,全称为数据加密标准(Data Encryption Standard),在安全性和效率方面都有不错的表现。而Base64是流行的编码方式,不是一种加密方式。它可以将任意字节序列编码成一种可用于文本通信…

    Java 2023年5月20日
    00
  • SpringBoot4.5.2 整合HikariCP 数据库连接池操作

    下面是整合HikariCP数据库连接池的完整攻略。 简介 HikariCP是一个非常快、可靠的JDBC连接池。SpringBoot作为一个非常流行的框架,也对HikariCP提供了支持。本文将向您展示如何使用SpringBoot和HikariCP来管理您的数据库连接。 步骤 1. 添加HikariCP依赖 在pom.xml文件中添加以下依赖: <dep…

    Java 2023年5月20日
    00
  • Java MyBatis可视化代码生成工具使用教程

    下面是详细的Java MyBatis可视化代码生成工具使用教程攻略: 1. 下载安装Java MyBatis可视化代码生成工具 Java MyBatis可视化代码生成工具是基于Java语言实现的代码生成工具,可以生成具有MyBatis框架的Java代码。你可以从官网下载该工具并进行安装。 2. 连接数据库 Java MyBatis可视化代码生成工具需要连接数…

    Java 2023年5月20日
    00
  • Spring Security使用数据库认证及用户密码加密和解密功能

    下面是使用Spring Security实现数据库认证和密码加密/解密的完整攻略: 一、创建数据库 首先,我们需要创建一个数据库,用于存储用户信息。假设我们的数据库名为security_demo,包含一张名为user的用户表,其中包含id、username、password、enabled四个字段。我们可以使用如下的SQL语句创建该表: CREATE TAB…

    Java 2023年5月20日
    00
合作推广
合作推广
分享本页
返回顶部