I. WCS- 栅格Web服務
· 概述
WCS(OpenGIS® Web Coverage Service)目前版本是1.1.2。WCS标準定義了一些操作,這些操作允許使用者通路“Coverage”資料,如衛星影像、數字高程資料等,也就是栅格資料。
· WCS 的操作
WCS包括以下3個操作:
1. GetCapabilities(擷取服務的元資訊)
2. DescribeCoverage(擷取Coverage的描述資訊)
3. GetCoverage(擷取Coverage)
關于服務涉及的基本元素,可以參考前面的章節:《服務涉及的基本元素》。
· GetCapabilities 操作
1. KVP格式請求
GetCapabilities操作需要以下的參數:
參數 | 是否必須 | 預設值 |
SERVICE | 是 | WCS |
REQUEST=GetCapabilities | 是 | |
ACCEPTVERSIONS | ||
SECTIONS | ||
UPDATESEQUENCE | ||
ACCEPTFORMATS |
以下是一個WCS使用KVP格式的GetCapabilities操作示例:
http://hostname:port/path?
service=WCS&
request=GetCapabilities
2. XML格式請求
以下是一個WCS使用XML格式的GetCapabilities操作示例:
xml version="1.0" encoding="UTF-8"?>
<
GetCapabilities
xmlns
="http://www.opengis.net/wcs/1.1.1"
xmlns
:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi
:schemaLocation
="http://www.opengis.net/wcs/1.1.1 ../wcsGetCapabilities.xsd"
service
="WCS"
/>
3. 響應示例
以下是一個WCS的GetCapabilities操作的響應示例:
xml version="1.0" encoding="UTF-8"?>
<
wcs
:Capabilities
xmlns
="http://www.opengis.net/wcs/1.1"
xmlns
:ows
="http://www.opengis.net/ows/1.1"
xmlns
:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi
:schemaLocation
="http://www.opengis.net/wcs/1.1 ../wcsDescribeCoverage.xsd http://www.opengis.net/ows/1.1 ../../../ows/1.1.0/owsAll.xsd"
>
<
ows
:ServiceIdentification
>
<
ows
:Title
>
Web Coverage Service
ows
:Title
>
<
ows
:Abstract
>
WCS
ows
:Abstract
>
<
ows
:ServiceType
>
WCS
ows
:ServiceType
>
<
ows
:AccessConstraints
>
NONE
ows
:AccessConstraints
>
ows :ServiceIdentification >
< ows :OperationsMetadata >
< ows :Operation name ="GetCapabilities" >
...
ows :Operation >
< ows :Operation name ="DescribeCoverage" >
...
ows :Operation >
< ows :Operation name ="GetCoverage" >
...
ows :Operation >
< ows :Constraint name ="PostEncoding" >
< ows :AllowedValues >
< ows :Value > XML
ows :Value >
ows :AllowedValues >
ows :Constraint >
ows :OperationsMetadata >
< wcs :Contents >
...
wcs :Contents >
wcs :Capabilities >
· DescribeCoverage 操作
1. KVP格式請求
DescribeCoverage操作需要以下的參數:
參數 | 是否必須 | 預設值 |
VERSION | 是 | 1.1.2 |
SERVICE | 是 | WCS |
REQUEST=DescribeCoverage | 是 | |
IDENTIFIERS | 是 |
以下是一個WCS使用KVP格式的DescribeCoverage操作示例:
http://server_address/path/script?
service=WCS &
request=DescribeCoverage&
version=1.1.2 &
identifiers=Cov1,Cov2,Cov3
2. XML格式請求
以下是一個WCS使用XML格式的DescribeCoverage操作示例:
xml version="1.0" encoding="UTF-8"?>
<
DescribeCoverage
xmlns
="http://www.opengis.net/wcs/1.1"
xmlns
:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi
:schemaLocation
="http://www.opengis.net/wcs/1.1 ../wcsDescribeCoverage.xsd"
service
="WCS"
version
="1.1.2"
>
<
Identifier
>
Cov1
Identifier
>
<
Identifier
>
Cov2
Identifier
>
<
Identifier
>
Cov3
Identifier
>
DescribeCoverage
>
3. 響應示例
以下是一個WCS的DescribeCoverage操作的響應示例:
xml version="1.0" encoding="UTF-8"?>
<
CoverageDescriptions
xmlns
="http://www.opengis.net/wcs/1.1"
xmlns
:ows
="http://www.opengis.net/ows/1.1"
xmlns
:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi
:schemaLocation
="http://www.opengis.net/wcs/1.1 ../wcsDescribeCoverage.xsd http://www.opengis.net/ows/1.1 ../../../ows/1.1.0/owsAll.xsd"
>
<
CoverageDescription
>
<
ows
:Title
>
TBD
ows
:Title
>
<
ows
:Abstract
>
TBD
ows
:Abstract
>
<
Identifier
>
TBD
Identifier
>
<
Domain
>
<
SpatialDomain
>
<
ows
:BoundingBox
>
<
ows
:LowerCorner
>
-30.00 -30.00
ows
:LowerCorner
>
<
ows
:UpperCorner
>
30.00 30.00
ows :UpperCorner >
ows :BoundingBox >
SpatialDomain >
Domain >
< Range >
< Field >
< ows :Title > TBD
ows :Title >
< ows :Abstract > TBD
ows :Abstract >
< Identifier > TBD
Identifier >
< Definition >
< ows :AnyValue />
Definition >
< InterpolationMethods >
< InterpolationMethod > linear
InterpolationMethod >
< Default > cubic
Default >
InterpolationMethods >
Field >
Range >
< SupportedCRS > urn:ogc:def:crs:EPSG::XXXX
SupportedCRS >
< SupportedCRS > urn:ogc:def:crs:EPSG::YYYY
SupportedCRS >
< SupportedFormat > text/xml
SupportedFormat >
CoverageDescription >
CoverageDescriptions >