OGC标准介绍 17

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 >