r.in.wms.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <h2>DESCRIPTION</h2>
  2. <em>r.in.wms</em> handles all of downloading and importing raster data
  3. from an <a href="http://www.opengeospatial.org/standards/wms">OGC
  4. WMS</a> and <a href="http://www.opengeospatial.org/standards/wmts">OGC
  5. WMTS</a> web mapping servers. It only needs be told the
  6. desired data to collect (bounds and resolution) via a region, the
  7. server to get the data from, and the layer or layers to get. It
  8. downloads the data in tiles, reprojects it, imports it, and patches it
  9. back together.
  10. <h2>NOTES</h2>
  11. To understand the data you are getting it is necessary to look at the
  12. capabilities of the WMS server. This should be available via a capabilities
  13. request (see examples)
  14. <p>
  15. When using GDAL WMS driver (<b>driver=WMS_GDAL</b>), the GDAL library
  16. needs to be built with WMS support,
  17. see <a href="http://gdal.org/frmt_wms.html">GDAL WMS</a> manual page
  18. for details.
  19. <h3>Tiled WMS</h3>
  20. Into the parameter <b>layers</b> the name of the <i>TiledGroup</i> need to
  21. be inserted from Tile Service file. Time variable can be specified
  22. in <b>urlparams</b> parameter,
  23. e.g: <tt>urlparams='time=2012-1-1'</tt>.
  24. <h2>EXAMPLES</h2>
  25. <h3>General Get Capabilities Request</h3>
  26. <div class="code"><pre>
  27. # Topographic WMS with OpenStreetMap by mundialis
  28. r.in.wms -c url="http://ows.mundialis.de/services/service?"
  29. r.in.wms -c url="http://ows.mundialis.de/services/service?" | grep Name
  30. # Czech WMS
  31. r.in.wms -c url="http://wms.cuzk.cz/wms.asp"
  32. </pre></div>
  33. <h3>Download raster data from WMS server (GetMap request)</h3>
  34. <h4>Open Street Map</h4>
  35. <div class="code"><pre>
  36. # OSM
  37. g.region n=90 s=-90 w=-180 e=180 res=0:10:00 -p
  38. r.in.wms url=http://watzmann-geog.urz.uni-heidelberg.de/cached/osm layers=osm_auto:all output=osm format=png
  39. </pre></div>
  40. <div class="code"><pre>
  41. # OSM
  42. r.in.wms url=http://irs.gis-lab.info layers=osm output=osm format=png
  43. </pre></div>
  44. <div class="code"><pre>
  45. # OSM Overlay WMS (can be used as an overlay for other maps)
  46. r.in.wms url="http://ows.mundialis.de/services/service?" layer=OSM-Overlay-WMS output=osm_overlay format=png
  47. # TOPO-OSM-WMS
  48. r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-OSM-WMS output=topo_osm format=png
  49. # TOPO-WMS
  50. r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-WMS output=topo format=png
  51. </pre></div>
  52. <p>
  53. More OSM WMS servers can be found online, e.g. on the OSM wiki in a
  54. <a href="http://wiki.openstreetmap.org/wiki/WMS#Public_WMS_Servers">OSM WMS Servers list</a>
  55. and on the <a href="http://wiki.openstreetmap.org/wiki/OSM-WMS-EUROPE">OSM-WMS-EUROPE</a> page.
  56. <h4>Image data</h4>
  57. <div class="code"><pre>
  58. # Landsat
  59. r.in.wms url=http://irs.gis-lab.info layers=landsat output=landsat format=png
  60. </pre></div>
  61. <h4>Countries and coastlines</h4>
  62. <div class="code"><pre>
  63. r.in.wms url=http://www2.demis.nl/WMS/wms.asp layers=Countries,Borders,Coastline output=countries srs=4326 format=png
  64. </pre></div>
  65. <h4>OGC WMTS Example</h4>
  66. <div class="code"><pre>
  67. 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=*
  68. </pre></div>
  69. Note: username, password and API key can be get from <a href="http://api.ign.fr/">IGN API</a> website
  70. <h4>Data covering the Czech Republic</h4>
  71. <div class="code"><pre>
  72. r.in.wms output=kn url=http://wms.cuzk.cz/wms.asp layers=prehledka_kraju-linie srs=4326 format=png
  73. </pre></div>
  74. <div class="code"><pre>
  75. 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
  76. </pre></div>
  77. Note: data are provided by <a href="http://cuzk.cz/Dokument.aspx?PRARESKOD=998&MENUID=10384&AKCE=DOC:10-ENGLISH">Czech office for surveying, mapping and cadastre</a>.
  78. <h2>REQUIREMENTS</h2>
  79. <em>r.in.wms</em>
  80. requires <a href="http://www.gdal.org/gdalwarp.html">gdalwarp</a>
  81. utility from GDAL/OGR library.
  82. <h2>REFERENCES</h2>
  83. <ul>
  84. <li><a href="http://www.opengeospatial.org/standards/wms">OGC WMS</a></li>
  85. <li><a href="http://www.opengeospatial.org/standards/wmts">OGC WMTS</a></li>
  86. </ul>
  87. <h2>SEE ALSO</h2>
  88. <em>
  89. <a href="r.in.gdal.html">r.in.gdal</a>,
  90. <a href="r.patch.html">r.patch</a>,
  91. <a href="r.colors.html">r.colors</a>,
  92. <a href="r.composite.html">r.composite</a>,
  93. <a href="v.in.wfs.html">v.in.wfs</a>
  94. </em>
  95. <p>
  96. See
  97. also <a href="http://grasswiki.osgeo.org/wiki/WxGUI/Video_tutorials#Add_web_service_layer">WMS
  98. support in wxGUI</a>.
  99. <h2>AUTHOR</h2>
  100. Stepan Turek, Czech Technical University in Prague, Czech Republic
  101. (bachelor's final project 2012, mentor: Martin Landa)
  102. <p>
  103. <i>Last changed: $Date$</i>