Difference between revisions of "WCS"

From GRASS-Wiki
Jump to: navigation, search
(new)
 
m (Using WCS in GRASS GIS, limit to BB)
Line 31: Line 31:
  
 
[[Image:WCS import with r external.png|thumb|center|400px|Import of WCS via r.external, display with RGB viewer]]
 
[[Image:WCS import with r external.png|thumb|center|400px|Import of WCS via r.external, display with RGB viewer]]
 +
 +
In order to limit the WCS to a bounding box (e.g. from current region) a GDAL vrt file can be created from the WCS ASCII file using gdalbuildvrt:
 +
<source lang="bash">
 +
gdalbuildvrt wcs_geoserver_LL_BB.vrt wcs_geoserver_LL.wcs -te xmin ymin xmax ymax
 +
</source>
  
 
== See also ==
 
== See also ==

Revision as of 15:55, 4 January 2014

This page is about support of OGC web coverage services (WCS) in GRASS GIS.

Metasites and collections of WCS servers

  • ...

Using WCS in GRASS GIS

One option is to register the WCS service via r.external.

First create ASCII file with this content, named e.g. "wcs_geoserver_LL.wcs":

 
<WCS_GDAL>
  <ServiceURL>http://demo.opengeo.org/geoserver/wcs?</ServiceURL>
  <CoverageName>Img_Sample</CoverageName>
</WCS_GDAL>

or simply download this file from here.

Start GRASS in a latlong location (EPSG 4326), then register the WCS file:

 
r.external input=wcs_geoserver_LL.wcs output=wcs_data

Then you can look at the map in the wxGUI map display:

Import of WCS via r.external, display with RGB viewer

In order to limit the WCS to a bounding box (e.g. from current region) a GDAL vrt file can be created from the WCS ASCII file using gdalbuildvrt:

 
gdalbuildvrt wcs_geoserver_LL_BB.vrt wcs_geoserver_LL.wcs -te xmin ymin xmax ymax

See also