· DescribeFeatureType 操作
1. KVP格式请求
DescribeFeatureType操作需要以下的参数:
参数 | 是否必须 | 默认值 |
VERSION | 是 | 1.1.0 |
SERVICE | 是 | WFS |
REQUEST=DescribeFeatureType | 是 | |
TYPENAME | ||
OUTPUTFORMAT | text/xml; subtype=gml/3.1.1 |
以下是一个WFS使用KVP格式的DescribeFeatureType操作示例:
http://www.someserver.com/wfs?
SERVICE=WFS&
VERSION=1.1.0&
REQUEST=DescribeFeatureType&
TYPENAME=TreesA_1M,BuiltUpA_1M
2. XML格式请求
以下是一个WFS使用XML格式的DescribeFeatureType操作示例:
xml version="1.0" ?>
<
DescribeFeatureType
version
="1.1.0"
service
="WFS"
outputFormat
="text/xml; subtype=gml/3.1.1"
xmlns
="http://www.opengis.net/wfs"
xmlns
:myns
="http://www.myserver.com/myns"
xmlns
:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi
:schemaLocation
="http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd"
>
<
TypeName
>
myns:Person
TypeName
>
DescribeFeatureType
>
3. 响应示例
以下是一个WFS的DescribeFeatureType操作的响应示例:
xml version="1.0" ?>
<
wfs
:FeatureCollection
xmlns
="http://www.someserver.com/myns"
xmlns
:myns
="http://www.someserver.com/myns"
xmlns
:wfs
="http://www.opengis.net/wfs"
xmlns
:gml
="http://www.opengis.net/gml"
xmlns
:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi
:schemaLocation
="http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd
http://www.someserver.com/myns ex10.xsd"
>
<
gml
:boundedBy
>
<
gml
:Envelope
>
<
gml
:coord
>
<
gml
:X
>
10
gml
:X
>
<
gml
:Y
>
10
gml
:Y
>
gml
:coord
>
<
gml
:coord
>
<
gml
:X
>
20
gml
:X
>
<
gml
:Y
>
20
gml :Y >
gml :coord >
gml :Envelope >
gml :boundedBy >
< gml :featureMember >
< Person >
< myns :lastName > Smith
myns :lastName >
< myns :firstName > Fred
myns :firstName >
< myns :age > 35
myns :age >
< myns :sex > Male
myns :sex >
< myns :location >
< gml :Point >
< gml :pos > 15 15
gml :pos >
gml :Point >
myns :location >
< myns :mailAddress >
< myns :Address >
< myns :streetName > Main St.
myns :streetName >
< myns :streetNumber > 5
myns :streetNumber >
< myns :city > SomeCity
myns :city >
< myns :province > Someprovince
myns :province >
< myns :postalCode > X1X 1X1
myns :postalCode >
< myns :country > Canada
myns :country >
< myns :Address >
myns :mailAddress >
Person >
gml :featureMember >
wfs :FeatureCollection >
· GetFeature 操作
1. KVP格式请求
GetFeature操作需要以下的参数:
参数 | 是否必须 | 默认值 |
VERSION | 是 | 1.1.0 |
SERVICE | 是 | WFS |
REQUEST=GetFeature | 是 | |
TYPENAME | 是 | |
OUTPUTFORMAT | text/xml; subtype=gml/3.1.1 | |
BBOX | ||
FILTER | ||
SORTBY | ||
MAXFEATURES | ||
PROPERTYNAME | ||
SRSNAME | ||
FEATUREID | ||
EXPIRY | ||
RESULTTYPE | results | |
FEATUREVERSION |
以下是一个WFS使用KVP格式的GetFeature操作示例:
http://www.someserver.com/wfs?
SERVICE=WFS&
VERSION=1.1.0&
REQUEST=GetFeature&
PROPERTYNAME=InWaterA_1M/wkbGeom,InWaterA_1M/tileId&
TYPENAME=InWaterA_1M&
FILTER=InWaterA_1M/wkbGeom
10,10
20 20
2. XML格式请求
以下是一个WFS使用XML格式的GetFeature操作示例:
xml version="1.0" ?>
<
GetFeature
version
="1.1.0"
service
="WFS"
handle
="Query01"
xmlns
="http://www.opengis.net/wfs"
xmlns
:ogc
="http://www.opengis.net/ogc"
xmlns
:gml
="http://www.opengis.net/gml"
xmlns
:myns
="http://www.someserver.com/myns"
xmlns
:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi
:schemaLocation
="http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd"
>
<
Query
typeName
="myns:Hydrography"
>
<
wfs
:PropertyName
>
myns:geoTemp
wfs
:PropertyName
>
<
wfs
:PropertyName
>
myns:depth
wfs
:PropertyName
>
<
ogc
:Filter
>
<
ogc
:Not
>
<
ogc
:Disjoint
>
<
ogc
:PropertyName
>
myns:geoTemp
ogc
:PropertyName
>
<
gml
:Envelope
srsName
="EPSG:63266405"
>
<
gml
:lowerCorner
>
-57.9118 46.2023
<
gml
:lowerCorner
>
<
gml
:upperCorner
>
-46.6873 51.8145
gml
:upperCorner
>
gml :Envelope >
ogc :Disjoint >
ogc :Not >
ogc :Filter >
Query >
GetFeature >
3. 响应示例
以下是一个WFS的GetFeature操作的响应示例:
xml version="1.0" ?>
<
wfs
:FeatureCollection
xmlns
="http://www.someserver.com/myns"
xmlns
:wfs
="http://www.opengis.net/wfs"
xmlns
:gml
="http://www.opengis.net/gml"
xmlns
:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi
:schemaLocation
="http://www.someserver.com/myns Hydrography.xsd
http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd"
>
<
gml
:boundedBy
>
<
gml
:Envelope
srsName
="http://www.opengis.net/gml/srs/epsg.xml#63266405"
>
<
gml
:lowerCorner
>
10 10
gml
:lowerCorner
>
<
gml
:upperCorner
>
20 20
gml
:upperCorner
>
gml
:Envelope
>
gml
:boundedBy
>
<
gml
:featureMember
>
<
HydrographyHydrography
gml
:id
="HydrographyHydrography.450"
>
<
geoTemp
>
<
gml
:Point
srsName
="http://www.opengis.net/gml/srs/epsg.xml#63266405"
>
<
gml
:pos
>
10 10
gml :pos >
gml :Point >
geoTemp >
< depth > 565
depth >
HydrographyHydrography >
gml :featureMember >
< gml :featureMember >
< HydrographyHydrography gml :id ="HydrographyHydrography.450" >
< geoTemp >
< gml :Point srsName ="http://www.opengis.net/gml/srs/epsg.xml#63266405" >
< gml :pos > 10 11
gml :pos >
gml :Point >
geoTemp >
< depth > 566
depth >
HydrographyHydrography >
gml :featureMember >
wfs :FeatureCollection >