r.in.wms(1)
π¦ r.in.wms π¦
okay so bestie, this is the GRASS GIS User's Manual page for r.in.wms (manual section 1, yes, we're official β¨). And what does it do? It downloads and imports data from OGC WMS and OGC WMTS web mapping servers. That's the whole vibe. No cap. π
π NAME π
r.in.wms β downloads and imports data from OGC WMS and OGC WMTS web mapping servers. π
πΈ KEYWORDS πΈ
raster, import, OGC web services, OGC WMS, OGC WMTS
β¨ SYNOPSIS β¨
r.in.wms
r.in.wms --help
r.in.wms [-cob] 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]
[gdal_createopt=string[,string,...]] [region=string]
[bgcolor=string] [proxy=string] [proxy_user_pw=string]
[capfile=name] [capfile_output=name] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
π© Flags π©
-cβ get the server capabilities, print them out, then exit. literally peek at the menu and dip. π-oβ do not request transparent data. opaque only, periodt.-bβ keep original bands (default is to create a composite).--overwriteβ allow output files to overwrite existing files. queen behavior, but careful bestie π--helpβ print usage summary.--verboseβ verbose module output. give me ALL the lore.--quietβ quiet module output. shhh π€«--uiβ force launching GUI dialog. for the visual learners π«Ά
π§ 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
- Options:
srs=integerβ EPSG code of requested source projection.- Default:
4326
- Default:
driver=stringβ driver used for communication with the server.- Options:
WMS_GDAL,WMS_GRASS,WMTS_GRASS,OnEarth_GRASS - Default:
WMS_GRASS WMS_GDAL: download data using GDAL WMS driverWMS_GRASS: download data using native GRASS-WMS driverWMTS_GRASS: download data using native GRASS-WMTS driverOnEarth_GRASS: download data using native GRASS-OnEarth driver
- Options:
wms_version=stringβ WMS standard version.- Options:
1.1.0,1.1.1,1.3.0 - Default:
1.1.1
- Options:
maxcols=integerβ maximum columns to request at a time.- Default:
512
- Default:
maxrows=integerβ maximum rows to request at a time.- Default:
512
- Default:
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
- Options:
gdal_createopt=string[,string,...]β GDAL creation option(s) to pass to the output format driver. In the form of"NAME=VALUE", separate multiple entries with a comma.region=stringβ request data for this named region instead of the current region bounds.bgcolor=stringβ background color. Format:0xRRGGBBproxy=stringβ HTTP proxy only GDAL driver (GDAL_HTTP_PROXY); HTTP proxy.proxy_user_pw=stringβ user and password for HTTP proxy only for GDAL driver (GDAL_HTTP_PROXYUSERPWD). Must be in the form of[user name]:[password]. User and password for HTTP proxy.capfile=nameβ capabilities file to parse (input). It is relevant forWMTS_GRASSandOnEarth_GRASSdrivers.capfile_output=nameβ file where the server capabilities will be saved (thecflag).
π DESCRIPTION π
okay so r.in.wms handles all of it β the downloading and the importing of raster data from OGC WMS and OGC WMTS web mapping servers. it only needs to be told the desired data to collect (that's the bounds and resolution) via a region, the server to get the data from, and the layer or layers to get. then it downloads the data in tiles, reprojects it, imports it, and patches it back together. the way that it just... does all of that for you? main character energy fr fr. π
π 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 (see examples). iykyk β always check the menu before you order. π
If possible, the EPSG code of the current project should be used with the srs option to avoid unnecessary reprojection. save yourself the work bestie, it's giving efficiency. β¨
When using the GDAL WMS driver (driver=WMS_GDAL), the GDAL library needs to be built with WMS support β see the GDAL WMS manual page for details.
π Tiled WMS π
Into the parameter layers the name of the TiledGroup need to be inserted from Tile Service file. A time variable can be specified in the urlparams parameter, e.g: urlparams='time=2012-1-1'. π
π₯ EXAMPLES π₯
π General Get Capabilities Request π
# Topographic WMS with OpenStreetMap by mundialis
r.in.wms -c url="https://ows.mundialis.de/services/service?"
r.in.wms -c url="https://ows.mundialis.de/services/service?" | grep Name
# Czech WMS
r.in.wms -c url="https://wms.cuzk.cz/wms.asp"
π°οΈ Download raster data from WMS server (GetMap request) π°οΈ
πΊοΈ Open Street Map πΊοΈ
# OSM, using WMS_GRASS driver
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.info osm
# 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
r.info topo_osm
# TOPO-WMS
r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-WMS output=topo format=png
r.info topo
More OSM WMS servers can be found online, e.g. on the OSM wiki in a OSM WMS Servers list and on the WORLD_OSM_WMS page. π
ποΈ Countries and coastlines ποΈ
# using WMS_GRASS driver
r.in.wms url="http://www2.demis.nl/WMS/wms.asp" layers=Countries,Borders,Coastline output=countries srs=4326 format=png
r.info countries
πΈ Sentinel-2 satellite cloud free global coverage πΈ
# North Carolina sample data
g.region raster=elevation -p
# using WMS_GRASS driver
r.in.wms url="https://tiles.maps.eox.at/wms?" layers=s2cloudless output=sentinel2 format=png
r.info sentinel2
Figure: Raleigh (NC, USA) seen by Sentinel-2 (10m resolution; image courtesy: EOX)
π§ OGC WMTS Example π§
# using WMTS_GRASS driver
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="*"
r.info orthophoto
Note: username, password and API key can be obtained from IGN API website
π¨πΏ Data covering the Czech Republic π¨πΏ
# using WMS_GRASS driver
r.in.wms url="http://wms.cuzk.cz/wms.asp" layers=prehledka_kraju-linie srs=4326 output=kn format=png
# using WMTS_GRASS driver
r.in.wms url="http://geoportal.cuzk.cz/WMTS_ORTOFOTO/WMTService.aspx" layers=orto output=orthophoto \
srs=3857 format=jpeg driver=WMTS_GRASS style=default
r.info orthophoto
Note: data are provided by Czech office for surveying, mapping and cadastre.
π Satellite data covering Europe π
Copernicus Core003 View Services - Optical VHR2 coverage over EU 2011-2013 (provided by JRC; usage is restricted to non-commercial activities):
# get WMS layer list
r.in.wms -c url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?"
r.in.wms -c url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" | grep Name
# spatial subset of Europe
# enlarging maxcols and maxrows in order to minimize impact of copyright notice in map
g.region n=56 s=47 w=5 e=16 res=0:00:10 -pa
# using WMS_GRASS driver
r.in.wms url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" \
layer="OI.Mosaic.NaturalColor.Feathering" output="jrc_copernicus_core003_mosaik" \
maxcols=3400 maxrows=3400
r.info jrc_copernicus_core003_mosaik
# Alternatively, using WMS_GDAL driver with BIGTIFF and compression enabled
r.in.wms url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" \
layer="OI.Mosaic.NaturalColor.Feathering" output="jrc_copernicus_core003_mosaik2" \
maxcols=3400 maxrows=3400 driver=WMS_GDAL gdal_createopt="BIGTIFF=YES,COMPRESS=DEFLATE"
r.info jrc_copernicus_core003_mosaik2
β οΈ REQUIREMENTS β οΈ
r.in.wms requires the gdalwarp utility from the GDAL/OGR library. no gdalwarp, no vibes. π
π 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) πβ¨
π» SOURCE CODE π»
Available at: r.in.wms source code (history)
Accessed: Saturday Jan 17 05:41:52 2026
Main index | Raster index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
okay bestie that's the whole page, and that's a wrap on r.in.wms(1) from GRASS GIS 8.4.2 (accessed Saturday Jan 17 05:41:52 2026) π«Ά go download some tiles, you ate π
πβ¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms