Time for action – retrieving raster data
We will use WCS to get raster data, using the sample data shipped with GeoServer. In case you disabled it, as we did in Chapter 11, Tuning GeoServer in a Production Environment, you will need to enable the WCS in GeoServer. Like WFS examples, we will use cUrl
for sending requests:
The first operation we will use is
GetCapabilities
. As with WFS, it returns a list of availablefeaturetype
and operations:~$ curl -XGET "http://localhost/geoserver/wcs?service=wcs&version=1.0.0&request=GetCapabilities" -o getCapabilities.xml
The following lines show you the brief description for a coverage, extracted from the list returned:
<wcs:CoverageOfferingBrief> <wcs:description>A very rough imagery of North America</wcs:description> <wcs:name>nurc:Img_Sample</wcs:name> <wcs:label>North America sample imagery</wcs:label> <wcs:lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"> <gml...