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
以下是一个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>Cov123 ows:Identifier> <DomainSubset> <ows:BoundingBox crs="urn:ogc:def:crs:OGC:2:84"> <ows:LowerCorner>-71 47 ows:LowerCorner> <ows:UpperCorner>-66 51 ows:UpperCorner> ows:BoundingBox> DomainSubset> <Output format="image/netcdf" /> GetCoverage>
以下是一个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>TBD ows:Title> <ows:Abstract>Coverage created from GetCoverage operation request to a WCS ows:Abstract> <Identifier>TBD Identifier> <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 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版本不同。