r.in.wms(1)

NAME
r.in.wms.py - Downloads and imports data from WMS/WMTS/NASA OnEarth server.

KEYWORDS
raster, import, OGC web services

SYNOPSIS
r.in.wms.py
r.in.wms.py --help
r.in.wms.py [-co] url=string output=name layers=string[,string,...] [styles=string[,string,...]] [format=string] [srs=integer] [driver=string] [wms_version=string] [maxcols=integer] [maxrows=integer] [urlparams=string] [username=string] [password=string] [method=string] [region=string] [bgcolor=string] [capfile=name] [capfile_output=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

  Flags:

-c
    Get the server capabilities then exit

-o
    Do not request transparent data

--overwrite
    Allow output files to overwrite existing files

--help
    Print usage summary

--verbose
    Verbose module output

--quiet
    Quiet module output

--ui
    Force launching GUI dialog

  Parameters:

url=string [required]
    Typically starts with "http://"

output=name [required]
    Name for output raster map

layers=string[,string,...] [required]
    Layer(s) to request from the map server

styles=string[,string,...]
    Layer style(s) to request from the map server

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

srs=integer
    EPSG code of requested source projection
    Default: 4326

driver=string
    Driver used to communication with server
    Options: WMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS
    Default: WMS_GRASS
    WMS_GDAL: Download data using GDAL WMS driver
    WMS_GRASS: Download data using native GRASS-WMS driver
    WMTS_GRASS: Download data using native GRASS-WMTS driver
    OnEarth_GRASS: Download data using native GRASS-OnEarth driver

wms_version=string
    WMS standard version
    Options: 1.1.1, 1.3.0
    Default: 1.1.1

maxcols=integer
    Maximum columns to request at a time
    Default: 512

maxrows=integer
    Maximum rows to request at a time
    Default: 512

urlparams=string
    Additional query parameters to pass to the server

username=string
    Username for server connection

password=string
    Password for server connection

method=string
    Interpolation method to use in reprojection
    Options: nearest, linear, cubic, cubicspline
    Default: nearest

region=string
    Request data for this named region instead of the current region bounds

bgcolor=string
    Background color
    Format: 0xRRGGBB

capfile=name
    Capabilities file to parse (input). It is relevant for WMTS_GRASS and OnEarth_GRASS drivers

capfile_output=name
    File where the server capabilities will be saved (’c’ flag)

DESCRIPTION
r.in.wms handles all of downloading and importing raster data from an OGC WMS, OGC WMTS and NASA OnEarth Tiled WMS web mapping servers. It needs 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.

NOTES
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, an example capabilities request to NASA’s OnEarth server.

When using GDAL WMS driver (driver=WMS_GDAL), the GDAL library needs to be built with WMS support, see GDAL WMS manual page for details.

  NASA OnEarth Tiled WMS
Into parameter layers insert name of TiledGroup from Tile Service file. Time variable is possible to specify in urlparams parameter, e.g: urlparams=’time=2012-1-1’.

EXAMPLES

  General Get Capabilities Request

r.in.wms -c url=http://wms.cuzk.cz/wms.asp

  Download raster data from WMS server (GetMap request)

  Open Street Map

g.region n=90 s=-90 w=-180 e=180 res=0:10:00 -p
r.in.wms url=http://watzmann-geog.urz.uni-heidelberg.de/cached/osm layers=osm_auto:all output=osm format=png

r.in.wms url=http://irs.gis-lab.info layers=osm output=osm format=png

More OSM WMS servers can be found online, e.g. on the OSM wiki in a OSM WMS Servers list and on the OSM-WMS-EUROPE page.

  World data

r.in.wms url=http://iceds.ge.ucl.ac.uk/cgi-bin/icedswms layers=bluemarble,landsat_1_01 styles=default,default output=landsat srs=4326 format=png

Note: server supports only WMS 1.1.1

r.in.wms url=http://www2.demis.nl/WMS/wms.asp layers=Countries,Borders,Coastline output=countries srs=4326 format=png

  OGC WMTS Example

r.in.wms url=http://gpp3-wxs.ign.fr/yourAPIkey/geoportail/wmts layers=ORTHOIMAGERY.ORTHOPHOTOS output=orthophoto srs=3857 format=jpeg driver=WMTS_GRASS style=normal password=* username=*

Note: username, password and API key can be get from IGN API website

  NASA OnEarth Tiled WMS Example

r.in.wms output=global_mosaic url=http://onearth.jpl.nasa.gov/wms.cgi layers=’Global Mosaic, visual’ driver=OnEarth_GRASS

  Data covering the Czech Republic

r.in.wms output=kn url=http://wms.cuzk.cz/wms.asp layers=prehledka_kraju-linie srs=4326 format=png

r.in.wms url=http://geoportal.cuzk.cz/WMTS_ORTOFOTO/WMTService.aspx layers=orto output=ortofoto srs=3857 format=jpeg driver=WMTS_GRASS style=default

Note: data are provided by Czech office for surveying, mapping and cadastre.

REQUIREMENTS
r.in.wms requires gdalwarp utility from GDAL/OGR library.

REFERENCES

    •   OGC WMS

    •   OGC WMTS

SEE ALSO
r.in.gdal, r.patch, r.colors, r.composite, v.in.wfs

See also WMS support in wxGUI.

AUTHOR
Stepan Turek, Czech Technical University in Prague, Czech Republic (bachelor’s final project 2012, mentor: Martin Landa)

Last changed: $Date: 2014-09-20 05:52:03 +0200 (so, 20 9 2014) $

Main index | Raster index | Topics index | Keywords index | Full index

© 2003-2015 GRASS Development Team, GRASS GIS 7.0.1 Reference Manual