OGC标准介绍 18

· GetCoverage操作

1. KVP格式请求

GetCoverage操作需要以下的参数:

参数

是否必须

默认值

VERSION

1.1.2

SERVICE

WCS

REQUEST=GetCoverage

 

IDENTIFIER

 

BOUNDINGBOX

 

FORMAT

 

TIMESEQUENCE

   

RANGESUBSET

   

STORE

   

GRIDBASECRS

   

GRIDTYPE

   

GRIDCS

   

GRIDORIGIN

   

GRIDOFFSETS

   

以下是一个WCS使用KVP格式的GetCoverage操作示例:

http://my.service.org/path/script?

service=WCS&

version=1.1.2&

request=GetCoverage&

identifier=Cov123&

BoundingBox=-71,47,-66,51,urn:ogc:def:crs:OGC:2:84&

format=image/netcdf

2. XML格式请求

以下是一个WCS使用XML格式的GetCoverage操作示例:

<?xml version="1.0" encoding="UTF-8"?>

<GetCoverage 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 ../wcsGetCoverage.xsd"

service="WCS" version="1.1.2">

<ows:Identifier>Cov123ows:Identifier>

<DomainSubset>

<ows:BoundingBox crs="urn:ogc:def:crs:OGC:2:84">

<ows:LowerCorner>-71 47ows:LowerCorner>

<ows:UpperCorner>-66 51ows:UpperCorner>

ows:BoundingBox>

DomainSubset>

<Output format="image/netcdf" />

GetCoverage>

3. 响应示例

以下是一个WCS的GetCoverage操作的响应示例:

<?xml version="1.0" encoding="UTF-8"?>

<Coverages xmlns="http://www.opengis.net/wcs/1.1" xmlns:ows="http://www.opengis.net/ows"

xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:schemaLocation="http://www.opengis.net/wcs/1.1 ../owsCoverages.xsd http://www.opengis.net/ows/1.1 ../../../ows/1.1.0/owsAll.xsd">

<Coverage>

<ows:Title>TBDows:Title>

<ows:Abstract>Coverage created from GetCoverage operation

request to a WCSows:Abstract>

<Identifier>TBDIdentifier>

<Reference xlink:href="http://my.server.com/coverage/image.tiff"

xlink:role="urn:ogc:def:role:WCS:1.1:coverage" />

<Reference xlink:href="http://my.server.com/coverage/metadata.xml"

xlink:role="urn:ogc:def:role:WCS:1.1:metadata" />

Coverage>

Coverages>

· ArcGIS Server对WCS的支持

ArcGIS Server 10中支持的WCS版本为1.0.0[1]。在ArcGIS Server中,只需简单地勾选的Capabilities选项卡中可以选择支持WCS,如图 22。

22 ArcGIS Server发布WCS服务

现在我们通过浏览器直接发送请求获取栅格数据,返回格式选择GeoTIFF:

http://localhost:8399/arcgis/services/basemap/World/MapServer/WCSServer?

version=1.0.0&request=GetCoverage&service=WCS&

crs=EPSG:4326&bbox=-180,-90,180,90&

width=720&height=360&

format=geotiff&

coverage=1

这个请求将会返回如下的结果:

[1] 并非最新版本,因此下面例子的参数和前面叙述的1.1.2版本不同。

退出移动版