Ubuntu Manpages

r.in.wms

Downloads and imports data from WMS servers.

wms

r.in.wms
r.in.wms help
r.in.wms [-ldockpg] [output=string] mapserver=string [layers=string[,string,...]] [styles=string[,string,...]] [srs=string] format=string [wmsquery=string] maxcols=integer maxrows=integer [tileoptions=string] [region=string] [folder=string] [wgetoptions=string] [curloptions=string] method=string [cap_file=string] [v=integer] [--overwrite] [--verbose] [--quiet]


List available layers and exit

Skip to downloading (to resume downloads faster)

Don't request transparent data

Clean existing data out of download directory

Keep band numbers instead of using band color names

Don't reproject the data, just patch it

Use GET method instead of POST data method
This may be needed to connect to servers which lack POST capability

Allow output files to overwrite existing files

Verbose module output

Quiet module output


Name for output raster map

Mapserver to request data from

Layers to request from map server

Styles to request from map server

Source projection to request from server
Default: EPSG:4326

Image format requested from the server
Options: geotiff,tiff,jpeg,gif,png
Default: geotiff

Addition query options for server
Default: version=1.1.1

Maximum columns to request at a time
Default: 1024

Maximum rows to request at a time
Default: 1024

Additional options for r.tileset

Named region to request data for. Current region used if omitted

Folder to save downloaded data to

Additional options for wget
Default: -c -t 5 -nv

Additional options for curl
Default: -C - --retry 5 -s -S

Reprojection method to use
Options: nearest,bilinear,cubic,cubicspline
Default: nearest

Filename to save capabilities XML file to
Requires list available layers flag

Verbosity level
Default: 1

r.in.wms handles all of downloading and importing raster data from an OGC WMS web mapping server. It need only be told the desired data to collect (bounds and resolution) via a region, the server to get the data from, and the layer or layers to get. It downloads the data in tiles, reprojects it, imports it, and patches it back together.

By default data is downloaded to $GISDBASE/wms_download. This can be changed by setting the folder option when using r.in.wms.

To understand the data you are getting it is necessary to look at the capabilities of the WMS server. This should be available via a capabilities request. This is an example capabilities request to NASA's OnEarth server.

Other brain-dead servers will not accept queries in the form of POST data. If you get an error try using the -g flag to force r.in.wms to send an atomic GET request instead.

A capabilities request like http://mapserver.flightgear.org/ms?Service=WMS&Version=1.1.1&request=GetCapabilities is where you should start. It tells you what data is offered, the projections it is in, where to find meta data, resolutions, scales, and bounds for data, etc. For example lists the layers available from TelaScience's OSGeo/FlightGear landcover server.
r.in.wms mapserver="http://mapserver.flightgear.org/ms" -l

In a Lat/Lon location first set the region to cover the state of North Carolina and the resolution to 30 arc-seconds.
g.region -p n=37N s=33N w=85W e=75W res=0:00:30
r.in.wms output=nc_landcover mapserver="http://mapserver.flightgear.org/ms" \
layer=LANDCOVER format=png
North Carolina landcover map

Set the resolution to 1.2 meters for DRGs. Their native resolution is 2.4 meters, so this is some pretty hefty oversampling:
g.region res=1.2 -ap
g.region save=drg-resolution
r.in.wms output=terraserver-drg mapserver="http://terraserver.microsoft.com/ogcmap6.ashx" \
layers=DRG region=drg-resolution format=jpeg srs=EPSG:26910
Downloads digital raster graphics from Microsoft TerraServer. Note that srs will need to be changed to a projection that is appropriate for your region.

r.in.wms requires the following programs to work:

wget: An http download program, or
curl: Alternate http download program
bc: A calculator program
sed, grep: Unix string processing and search programs
gdalwarp: A reprojection tool, needed only if data is projected into this location.
xml2: An xml parser. Enables more accurate listing of layers on the server.

r.tileset, r.in.gdal, r.patch, r.colors, r.composite
v.in.wfs

Soeren Gebbert, Jachym Cepicky, and Cedric Shock

Last changed: $Date: 2013-07-18 20:23:35 +0200 (Thu, 18 Jul 2013) $

Full index

© 2003-2013 GRASS Development Team