WMS: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(pic)
mNo edit summary
 
(34 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__TOC__
This page is about support of OGC web map services (WMS) in GRASS GIS.
== Metasites and collections of WMS servers ==
* [http://www.mapmatters.org/ Extensive catalogue of OGC web map services (WMS) worldwide]
* Telascience WMS services (in collaboration with OSGeo): see list at http://wms.telascience.org/
== Italian Public administration WMS ==
Example for public administration data imported via WMS into [[wxGUI]]
[[Image:WxGUI and Piedmont (Italy) WMS.png|thumb|center|300px|City of Orbassano map]]
== NASA's OnEarth WMS Example ==
[[Image:Akl_landsat.png|thumb|right|300px]]
[[Image:Akl_landsat.png|thumb|right|300px]]


Mini tutorial for downloading SRTM elevation and LANDSAT imagery from NASA's OnEarth WMS server.
{{wikipedia|Web_Map_Service|desc=Web Map Service}} (WMS) data can be downloaded and imported into GRASS using the {{cmd|r.in.wms}} module.
 
Mini tutorial for downloading [[SRTM]] elevation and [[LANDSAT]] imagery from [http://onearth.jpl.nasa.gov NASA's OnEarth WMS server].


* create a NZTM location (EPSG:2193) with the startup wizard.
Create a NZTM location (EPSG:2193) with the [[WxGUI#Location_wizard|location wizard]].


<source lang="bash">
<source lang="bash">
# Zoom to AKL region
# Zoom to AKL region
g.region n=5936130 s=5900340 \
g.region n=5936130 s=5900340 w=1740030 e=1776030 res=30
        w=1740030 e=1776030 res=30
</source>
</source>


If downloading for your own area, try to keep the region rows and columns smaller than the maxrow,maxcol options given to {{cmd|r.in.wms}}.
If downloading for your own area, try to keep the region rows and columns smaller than the maxrow,maxcol options given to {{cmd|r.in.wms}}. Please don't abuse the server, just download small chunks.


<source lang="bash">
<source lang="bash">
Line 24: Line 41:
g.rename akl_srtm.1,akl_srtm
g.rename akl_srtm.1,akl_srtm
r.colors akl_srtm color=srtm
r.colors akl_srtm color=srtm


### Download and process LANDSAT:
### Download and process LANDSAT:
Line 37: Line 53:
r.composite r=akl_landsat.red g=akl_landsat.green b=akl_landsat.blue \
r.composite r=akl_landsat.red g=akl_landsat.green b=akl_landsat.blue \
   output=akl_landsat --overwrite
   output=akl_landsat --overwrite


### Shaeded relief map
### Shaeded relief map
r.shaded.relief akl_strm
r.shaded.relief akl_strm
d.shadedmap relief=akl_strm.shade drape=akl_landsat bright=70
d.shadedmap relief=akl_strm.shade drape=akl_landsat bright=70


### 3D view
### 3D view
Line 48: Line 62:
</source>
</source>


* In the Visualization &rarr; Raster Surface menu set the fine raster grid size to 1.
In the [[NVIZ]] (or [[wxNviz]]) <tt>Visualization &rarr; Raster Surface</tt> menu set the fine raster grid size to 1. Set the vertical exaggeration to 1.0 or 2.0
 
== MetaCarta WMS Example ==
 
Create a NZTM location (EPSG:4326) with the [[WxGUI#Location_wizard|location wizard]].
 
<source lang=bash>
g.region n=90 s=-90 w=-180 e=180 res=0.5
 
r.in.wms -c output=map \
  mapserver="http://labs.metacarta.com/wms-c/Basic.py" \
  layers=basic format=geotiff \
</source>
 
== OpenStreetMap WMS Example ==
 
''Note: European coverage:''
 
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
 
See also example in {{cmd|r.in.wms}}
 
List of Servers: http://wiki.openstreetmap.org/wiki/WMS
 
== WMS support in GRASS 7 ==


{{YouTube|vfNw4SAP2Uc}}


[[Category: Documentation]]
[[Category: FAQ]]
[[Category: FAQ]]
[[Category: Geodata]]
[[Category: OGC]]
[[Category: Raster]]

Latest revision as of 10:51, 4 December 2018

This page is about support of OGC web map services (WMS) in GRASS GIS.

Metasites and collections of WMS servers

Italian Public administration WMS

Example for public administration data imported via WMS into wxGUI

City of Orbassano map


NASA's OnEarth WMS Example

Web_Map_Service (WMS) data can be downloaded and imported into GRASS using the r.in.wms module. Mini tutorial for downloading SRTM elevation and LANDSAT imagery from NASA's OnEarth WMS server.

Create a NZTM location (EPSG:2193) with the location wizard.

# Zoom to AKL region
g.region n=5936130 s=5900340 w=1740030 e=1776030 res=30

If downloading for your own area, try to keep the region rows and columns smaller than the maxrow,maxcol options given to r.in.wms. Please don't abuse the server, just download small chunks.

### Download and process SRTM elevation:

r.in.wms output=akl_srtm \
  mapserver="http://onearth.jpl.nasa.gov/wms.cgi" \
  -c layers=worldwind_dem format=geotiff style=short_int \
  maxcols=1600 maxrows=1600

g.rename akl_srtm.1,akl_srtm
r.colors akl_srtm color=srtm

### Download and process LANDSAT:

r.in.wms output=akl_landsat \
  mapserver="http://onearth.jpl.nasa.gov/wms.cgi" \
  -c layers=global_mosaic_base format=geotiff style=visual \
  maxcols=1600 maxrows=1600

i.landsat.rgb -p r=akl_landsat.red g=akl_landsat.green b=akl_landsat.blue
d.rgb r=akl_landsat.red g=akl_landsat.green b=akl_landsat.blue
r.composite r=akl_landsat.red g=akl_landsat.green b=akl_landsat.blue \
   output=akl_landsat --overwrite

### Shaeded relief map
r.shaded.relief akl_strm
d.shadedmap relief=akl_strm.shade drape=akl_landsat bright=70

### 3D view
nviz akl_srtm color=akl_landsat

In the NVIZ (or wxNviz) Visualization → Raster Surface menu set the fine raster grid size to 1. Set the vertical exaggeration to 1.0 or 2.0

MetaCarta WMS Example

Create a NZTM location (EPSG:4326) with the location wizard.

g.region n=90 s=-90 w=-180 e=180 res=0.5

r.in.wms -c output=map \
  mapserver="http://labs.metacarta.com/wms-c/Basic.py" \
  layers=basic format=geotiff \

OpenStreetMap WMS Example

Note: European coverage:

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

See also example in r.in.wms

List of Servers: http://wiki.openstreetmap.org/wiki/WMS

WMS support in GRASS 7