7.4. DescribeFeatureType 操作

7.4.1. 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

7.4.2. 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:PersonTypeName
>


DescribeFeatureType
>

7.4.3. 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
>
10gml
:X
>


<
gml
:Y
>
10gml
:Y
>


gml
:coord
>


<
gml
:coord
>


<
gml
:X
>
20gml
:X
>


<
gml
:Y
>
20gml
:Y
>


gml
:coord
>


gml
:Envelope
>


gml
:boundedBy
>


<
gml
:featureMember
>


<
Person
>


<
myns
:lastName
>
Smithmyns
:lastName
>


<
myns
:firstName
>
Fredmyns
:firstName
>


<
myns
:age
>
35myns
:age
>


<
myns
:sex
>
Malemyns
:sex
>


<
myns
:location
>


<
gml
:Point
>


<
gml
:pos
>
15 15gml
:pos
>


gml
:Point
>


myns
:location
>


<
myns
:mailAddress
>


<
myns
:Address
>


<
myns
:streetName
>
Main St.myns
:streetName
>


<
myns
:streetNumber
>
5myns
:streetNumber
>


<
myns
:city
>
SomeCitymyns
:city
>


<
myns
:province
>
Someprovincemyns
:province
>


<
myns
:postalCode
>
X1X 1X1myns
:postalCode
>


<
myns
:country
>
Canadamyns
:country
>


<
myns
:Address
>


myns
:mailAddress
>


Person
>


gml
:featureMember
>


wfs
:FeatureCollection
>