.TH r.in.wms 1grass "" "GRASS 8.3.1" "GRASS GIS User's Manual" .SH NAME \fI\fBr.in.wms\fR\fR \- Downloads and imports data from OGC WMS and OGC WMTS web mapping servers. .SH KEYWORDS raster, import, OGC web services, OGC WMS, OGC WMTS .SH SYNOPSIS \fBr.in.wms\fR .br \fBr.in.wms \-\-help\fR .br \fBr.in.wms\fR [\-\fBcob\fR] \fBurl\fR=\fIstring\fR \fBoutput\fR=\fIname\fR \fBlayers\fR=\fIstring\fR[,\fIstring\fR,...] [\fBstyles\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBformat\fR=\fIstring\fR] [\fBsrs\fR=\fIinteger\fR] [\fBdriver\fR=\fIstring\fR] [\fBwms_version\fR=\fIstring\fR] [\fBmaxcols\fR=\fIinteger\fR] [\fBmaxrows\fR=\fIinteger\fR] [\fBurlparams\fR=\fIstring\fR] [\fBusername\fR=\fIstring\fR] [\fBpassword\fR=\fIstring\fR] [\fBmethod\fR=\fIstring\fR] [\fBgdal_createopt\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBregion\fR=\fIstring\fR] [\fBbgcolor\fR=\fIstring\fR] [\fBproxy\fR=\fIstring\fR] [\fBproxy_user_pw\fR=\fIstring\fR] [\fBcapfile\fR=\fIname\fR] [\fBcapfile_output\fR=\fIname\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-c\fR" 4m .br Get the server capabilities, print them out, then exit .IP "\fB\-o\fR" 4m .br Do not request transparent data .IP "\fB\-b\fR" 4m .br Keep original bands (default: create composite) .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBurl\fR=\fIstring\fR \fB[required]\fR" 4m .br Typically starts with \(dqhttp://\(dq .IP "\fBoutput\fR=\fIname\fR \fB[required]\fR" 4m .br Name for output raster map .IP "\fBlayers\fR=\fIstring[,\fIstring\fR,...]\fR \fB[required]\fR" 4m .br Layer(s) to request from the map server .IP "\fBstyles\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br Layer style(s) to request from the map server .IP "\fBformat\fR=\fIstring\fR" 4m .br Image format requested from the server .br Options: \fIgeotiff, tiff, jpeg, gif, png, png8\fR .br Default: \fIpng\fR .IP "\fBsrs\fR=\fIinteger\fR" 4m .br EPSG code of requested source projection .br Default: \fI4326\fR .IP "\fBdriver\fR=\fIstring\fR" 4m .br Driver used for communication with the server .br Options: \fIWMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS\fR .br Default: \fIWMS_GRASS\fR .br \fBWMS_GDAL\fR: Download data using GDAL WMS driver .br \fBWMS_GRASS\fR: Download data using native GRASS\-WMS driver .br \fBWMTS_GRASS\fR: Download data using native GRASS\-WMTS driver .br \fBOnEarth_GRASS\fR: Download data using native GRASS\-OnEarth driver .IP "\fBwms_version\fR=\fIstring\fR" 4m .br WMS standard version .br Options: \fI1.1.0, 1.1.1, 1.3.0\fR .br Default: \fI1.1.1\fR .IP "\fBmaxcols\fR=\fIinteger\fR" 4m .br Maximum columns to request at a time .br Default: \fI512\fR .IP "\fBmaxrows\fR=\fIinteger\fR" 4m .br Maximum rows to request at a time .br Default: \fI512\fR .IP "\fBurlparams\fR=\fIstring\fR" 4m .br Additional query parameters to pass to the server .IP "\fBusername\fR=\fIstring\fR" 4m .br Username for server connection .IP "\fBpassword\fR=\fIstring\fR" 4m .br Password for server connection .IP "\fBmethod\fR=\fIstring\fR" 4m .br Interpolation method to use in reprojection .br Options: \fInearest, linear, cubic, cubicspline\fR .br Default: \fInearest\fR .IP "\fBgdal_createopt\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br GDAL creation option(s) to pass to the output format driver .br In the form of \(dqNAME=VALUE\(dq, separate multiple entries with a comma .IP "\fBregion\fR=\fIstring\fR" 4m .br Request data for this named region instead of the current region bounds .IP "\fBbgcolor\fR=\fIstring\fR" 4m .br Background color .br Format: 0xRRGGBB .IP "\fBproxy\fR=\fIstring\fR" 4m .br HTTP proxy only GDAL driver (GDAL_HTTP_PROXY) .br HTTP proxy .IP "\fBproxy_user_pw\fR=\fIstring\fR" 4m .br User and password for HTTP proxy only for GDAL driver (GDAL_HTTP_PROXYUSERPWD). Must be in the form of [user name]:[password]. .br User and password for HTTP proxy .IP "\fBcapfile\fR=\fIname\fR" 4m .br Capabilities file to parse (input). It is relevant for WMTS_GRASS and OnEarth_GRASS drivers .IP "\fBcapfile_output\fR=\fIname\fR" 4m .br File where the server capabilities will be saved (\(cqc\(cq flag) .SH DESCRIPTION \fIr.in.wms\fR handles all of downloading and importing raster data from 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. .SH 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) .PP If possible, the EPSG code of the current location should be used with the \fBsrs\fR option to avoid unnecessary reprojection. .PP When using GDAL WMS driver (\fBdriver=WMS_GDAL\fR), the GDAL library needs to be built with WMS support, see GDAL WMS manual page for details. .SS Tiled WMS Into the parameter \fBlayers\fR the name of the \fITiledGroup\fR need to be inserted from Tile Service file. Time variable can be specified in \fBurlparams\fR parameter, e.g: urlparams=\(cqtime=2012\-1\-1\(cq. .SH EXAMPLES .SS General Get Capabilities Request .br .nf \fC # Topographic WMS with OpenStreetMap by mundialis r.in.wms \-c url=\(dqhttp://ows.mundialis.de/services/service?\(dq r.in.wms \-c url=\(dqhttp://ows.mundialis.de/services/service?\(dq | grep Name # Czech WMS r.in.wms \-c url=\(dqhttp://wms.cuzk.cz/wms.asp\(dq \fR .fi .SS Download raster data from WMS server (GetMap request) .SS Open Street Map .br .nf \fC # OSM, using WMS_GRASS driver g.region n=90 s=\-90 w=\-180 e=180 res=0:10:00 \-p r.in.wms url=\(dqhttp://watzmann\-geog.urz.uni\-heidelberg.de/cached/osm\(dq layers=osm_auto:all output=osm format=png r.info osm \fR .fi .br .nf \fC # OSM Overlay WMS (can be used as an overlay for other maps) r.in.wms url=\(dqhttp://ows.mundialis.de/services/service?\(dq layer=OSM\-Overlay\-WMS output=osm_overlay format=png # TOPO\-OSM\-WMS r.in.wms url=\(dqhttp://ows.mundialis.de/services/service?\(dq layer=TOPO\-OSM\-WMS output=topo_osm format=png r.info topo_osm # TOPO\-WMS r.in.wms url=\(dqhttp://ows.mundialis.de/services/service?\(dq layer=TOPO\-WMS output=topo format=png r.info topo \fR .fi .PP 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. .SS Countries and coastlines .br .nf \fC # using WMS_GRASS driver r.in.wms url=\(dqhttp://www2.demis.nl/WMS/wms.asp\(dq layers=Countries,Borders,Coastline output=countries srs=4326 format=png r.info countries \fR .fi .SS Sentinel\-2 satellite cloud free global coverage .br .nf \fC # North Carolina sample data g.region raster=elevation \-p # using WMS_GRASS driver r.in.wms url=\(dqhttps://tiles.maps.eox.at/wms?\(dq layers=s2cloudless output=sentinel2 format=png r.info sentinel2 \fR .fi .br \fIFigure: Raleigh (NC, USA) seen by Sentinel\-2 (10m resolution; image courtesy: EOX)\fR .SS OGC WMTS Example .br .nf \fC # using WMTS_GRASS driver r.in.wms url=\(dqhttp://gpp3\-wxs.ign.fr/yourAPIkey/geoportail/wmts\(dq layers=ORTHOIMAGERY.ORTHOPHOTOS \(rs output=orthophoto srs=3857 format=jpeg driver=WMTS_GRASS style=normal password=\(dq*\(dq username=\(dq*\(dq r.info orthophoto \fR .fi Note: username, password and API key can be obtained from IGN API website .SS Data covering the Czech Republic .br .nf \fC # using WMS_GRASS driver r.in.wms url=\(dqhttp://wms.cuzk.cz/wms.asp\(dq layers=prehledka_kraju\-linie srs=4326 output=kn format=png \fR .fi .br .nf \fC # using WMTS_GRASS driver r.in.wms url=\(dqhttp://geoportal.cuzk.cz/WMTS_ORTOFOTO/WMTService.aspx\(dq layers=orto output=orthophoto \(rs srs=3857 format=jpeg driver=WMTS_GRASS style=default r.info orthophoto \fR .fi Note: data are provided by Czech office for surveying, mapping and cadastre. .SS 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): .br .nf \fC # get WMS layer list r.in.wms \-c url=\(dqhttp://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?\(dq r.in.wms \-c url=\(dqhttp://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?\(dq | 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=\(dqhttp://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?\(dq \(rs layer=\(dqOI.Mosaic.NaturalColor.Feathering\(dq output=\(dqjrc_copernicus_core003_mosaik\(dq \(rs maxcols=3400 maxrows=3400 r.info jrc_copernicus_core003_mosaik # Alternatively, using WMS_GDAL driver with BIGTIFF and compression enabled r.in.wms url=\(dqhttp://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?\(dq \(rs layer=\(dqOI.Mosaic.NaturalColor.Feathering\(dq output=\(dqjrc_copernicus_core003_mosaik2\(dq \(rs maxcols=3400 maxrows=3400 driver=WMS_GDAL gdal_createopt=\(dqBIGTIFF=YES,COMPRESS=DEFLATE\(dq r.info jrc_copernicus_core003_mosaik2 \fR .fi .SH REQUIREMENTS \fIr.in.wms\fR requires the gdalwarp utility from the GDAL/OGR library. .SH REFERENCES .RS 4n .IP \(bu 4n OGC WMS .IP \(bu 4n OGC WMTS .RE .SH SEE ALSO \fI r.in.gdal, r.patch, r.colors, r.composite, v.in.wfs \fR .PP See also WMS support in wxGUI. .SH AUTHOR Stepan Turek, Czech Technical University in Prague, Czech Republic .br (bachelor\(cqs final project 2012, mentor: Martin Landa) .SH SOURCE CODE .PP Available at: r.in.wms source code (history) .PP Accessed: Sunday Dec 17 17:22:50 2023 .PP Main index | Raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual