DOKK / manpages / debian 10 / grass-doc / r.in.wms.1grass.en
r.in.wms(1grass) Grass User's Manual r.in.wms(1grass)

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

raster, import, OGC web services

r.in.wms
r.in.wms --help
r.in.wms [-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]


Get the server capabilities then exit

Do not request transparent data

Allow output files to overwrite existing files

Print usage summary

Verbose module output

Quiet module output

Force launching GUI dialog


Typically starts with "http://"

Name for output raster map

Layer(s) to request from the map server

Layer style(s) to request from the map server

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

EPSG code of requested source projection
Default: 4326

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 standard version
Options: 1.1.1, 1.3.0
Default: 1.1.1

Maximum columns to request at a time
Default: 512

Maximum rows to request at a time
Default: 512

Additional query parameters to pass to the server

Username for server connection

Password for server connection

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

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

Background color
Format: 0xRRGGBB

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

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

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

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 (see examples)

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.

Into the parameter layers the name of the TiledGroup need to be inserted from Tile Service file. Time variable can be specified in urlparams parameter, e.g: urlparams=’time=2012-1-1’.

# Topographic WMS with OpenStreetMap by mundialis
r.in.wms -c url="http://ows.mundialis.de/services/service?"
r.in.wms -c url="http://ows.mundialis.de/services/service?" | grep Name
# Czech WMS
r.in.wms -c url="http://wms.cuzk.cz/wms.asp"

# OSM
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

# OSM Overlay WMS (can be used as an overlay for other maps)
r.in.wms url="http://ows.mundialis.de/services/service?" layer=OSM-Overlay-WMS output=osm_overlay format=png
# TOPO-OSM-WMS
r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-OSM-WMS output=topo_osm format=png
# TOPO-WMS
r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-WMS output=topo 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.

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

# North Carolina sample data
g.region raster=elevation -p
r.in.wms url="https://tiles.maps.eox.at/wms?" layers=s2cloudless output=sentinel2 format=png

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 obtained from IGN API website

r.in.wms url="http://wms.cuzk.cz/wms.asp" layers=prehledka_kraju-linie srs=4326 output=kn 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.

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

  • OGC WMS
  • OGC WMTS

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

See also WMS support in wxGUI.

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

Last changed: $Date: 2018-02-14 21:09:16 +0100 (Wed, 14 Feb 2018) $

Available at: r.in.wms source code (history)

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

© 2003-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual

GRASS 7.6.0