[GRASS-SVN] r53347 - in grass-addons/grass7/raster: . r.in.wms2

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 9 14:50:21 PDT 2012


Author: turek
Date: 2012-10-09 14:50:21 -0700 (Tue, 09 Oct 2012)
New Revision: 53347

Added:
   grass-addons/grass7/raster/r.in.wms2/
   grass-addons/grass7/raster/r.in.wms2/r.in.wms2.html
   grass-addons/grass7/raster/r.in.wms2/r.in.wms2.py
Removed:
   grass-addons/grass7/raster/r.in.wms/
   grass-addons/grass7/raster/r.in.wms2/r.in.wms.html
   grass-addons/grass7/raster/r.in.wms2/r.in.wms.py
Modified:
   grass-addons/grass7/raster/Makefile
   grass-addons/grass7/raster/r.in.wms2/Makefile
Log:
r.in.wms -> r.in.wms2, Makefiles modified

Modified: grass-addons/grass7/raster/Makefile
===================================================================
--- grass-addons/grass7/raster/Makefile	2012-10-09 21:20:55 UTC (rev 53346)
+++ grass-addons/grass7/raster/Makefile	2012-10-09 21:50:21 UTC (rev 53347)
@@ -7,6 +7,7 @@
 	r.fuzzy \
 	r.hydrodem \
 	r.in.srtm.region \
+	r.in.wms2 \
 	r.modis \
 	r.regression.multi \
 	r.regression.series \

Modified: grass-addons/grass7/raster/r.in.wms2/Makefile
===================================================================
--- grass-addons/grass7/raster/r.in.wms/Makefile	2012-10-09 21:20:55 UTC (rev 53346)
+++ grass-addons/grass7/raster/r.in.wms2/Makefile	2012-10-09 21:50:21 UTC (rev 53347)
@@ -1,20 +1,18 @@
 MODULE_TOPDIR = ../..
 
-PGM = r.in.wms
+PGM = r.in.wms2
 
+MODULES = wms_base wms_drv wms_gdal_drv
+PYFILES := $(patsubst %,$(ETC)/%.py,$(MODULES))
+PYCFILES := $(patsubst %,$(ETC)/%.pyc,$(MODULES))
+
 include $(MODULE_TOPDIR)/include/Make/Script.make
 include $(MODULE_TOPDIR)/include/Make/Python.make
 
-ETCDIR = $(ETC)/r.in.wms
-
-MODULES = wms_base wms_drv wms_gdal_drv
-PYFILES := $(patsubst %,$(ETCDIR)/%.py,$(MODULES))
-PYCFILES := $(patsubst %,$(ETCDIR)/%.pyc,$(MODULES))
-
 default: script $(PYFILES) $(PYCFILES)
 
 $(ETCDIR):
 	$(MKDIR) $@
 
-$(ETCDIR)/%: % | $(ETCDIR)
+$(ETC)/%: % | $(ETC)
 	$(INSTALL_DATA) $< $@

Deleted: grass-addons/grass7/raster/r.in.wms2/r.in.wms.html
===================================================================
--- grass-addons/grass7/raster/r.in.wms/r.in.wms.html	2012-10-09 21:20:55 UTC (rev 53346)
+++ grass-addons/grass7/raster/r.in.wms2/r.in.wms.html	2012-10-09 21:50:21 UTC (rev 53347)
@@ -1,76 +0,0 @@
-<h2>DESCRIPTION</h2>
-
-<em>r.in.wms</em> handles all of downloading and importing raster
-data from an <a href="http://www.opengeospatial.org/standards/wms">OGC
-WMS</a> web mapping server. It need only 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.
-
-<h2>NOTES</h2>
-
-<!--
-By default data is downloaded to <tt>$GISDBASE/wms_download</tt>. This can be changed
-by setting the <b>folder</b> option when using <em>r.in.wms</em>.
--->
-
-<p>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. This is an
-<a href="http://wms.jpl.nasa.gov/wms.cgi?request=GetCapabilities">example
-capabilities request to NASA's OnEarth server</a>.
-
-<h2>EXAMPLES</h2>
-
-<h3>General Get Capabilities Request</h3>
-
-<div class="code"><pre>
-r.in.wms -c mapserver=http://wms.cuzk.cz/wms.asp
-</pre></div>
-
-<h3>CUZK download</h3>
-
-
-World extend data:
-
-<div class="code"><pre>
-r.in.wms mapserver=http://iceds.ge.ucl.ac.uk/cgi-bin/icedswms layers=bluemarble,landsat_1_01 styles=default,default output=landsat srs=4326 format=png 
-</pre></div>
-* Server supports only WMS 1.1.1 <br>
-
-<div class="code"><pre>
-r.in.wms mapserver=http://132.156.97.59/cgi-bin/worldmin_en-ca_ows layers=GSC:WORLD_PrecambrianDomains output=pokus srs=4326 format=jpeg 
-</pre></div>
-* Server supports only WMS 1.1.1 
-<br>
-<br>
-
-Data in extend of Czech Republic:
-
-<div class="code"><pre>
-r.in.wms output=kn mapserver=http://wms.cuzk.cz/wms.asp layers=prehledka_kraju-linie srs=4326 format=png
-</pre></div>
-
-
-<h2>TODO</h2>
-
-<ul>
-  <li>Implement Tiled WMS</li>
-</ul>
-
-<h2>SEE ALSO</h2>
-
-<em>
-  <a href="r.in.gdal.html">r.in.gdal</a>,
-  <a href="r.patch.html">r.patch</a>,
-  <a href="r.colors.html">r.colors</a>,
-  <a href="r.composite.html">r.composite</a>,
-  <a href="v.in.wfs.html">v.in.wfs</a>
-</em>
-
-<h2>AUTHORS</h2>
-
-Stepan Turek, Czech Technical University in Prague, Czech Republic (bachelor's final project 2012, mentor: Martin Landa) 
-
-<p>
-<i>Last changed: $Date$</i>

Deleted: grass-addons/grass7/raster/r.in.wms2/r.in.wms.py
===================================================================
--- grass-addons/grass7/raster/r.in.wms/r.in.wms.py	2012-10-09 21:20:55 UTC (rev 53346)
+++ grass-addons/grass7/raster/r.in.wms2/r.in.wms.py	2012-10-09 21:50:21 UTC (rev 53347)
@@ -1,163 +0,0 @@
-#!/usr/bin/env python
-"""
-MODULE:    r.in.wms
-
-AUTHOR(S): Stepan Turek <stepan.turek AT seznam.cz>
-
-PURPOSE:   Downloads and imports data from WMS server.
-
-COPYRIGHT: (C) 2012 Stepan Turek, and by the GRASS Development Team
-
-This program is free software under the GNU General Public License
-(>=v2). Read the file COPYING that comes with GRASS for details.
-"""
-
-#%module
-#% description: Downloads and imports data from WMS servers.
-#% keywords: raster
-#% keywords: import
-#% keywords: wms
-#%end
-
-#%option
-#% key: mapserver
-#% type: string
-#% description:URL of WMS server 
-#% required: yes
-#%end
-
-#%option
-#% key: layers
-#% type: string
-#% description: Layers to request from map server
-#% multiple: yes
-#% required: yes
-#%end
-
-#%option G_OPT_R_OUTPUT
-#% description: Name for output raster map
-#%end
-
-#%option
-#% key: srs
-#% type: integer
-#% description: EPSG number of source projection for request 
-#% guisection: Request properties
-#%end
-
-#%option
-#% key: region
-#% type: string
-#% description: Named region to request data for. Current region used if omitted
-#% guisection: Request properties
-#%end
-
-#%option
-#% key: wms_version
-#% type:string
-#% description:WMS standard
-#% options:1.1.1,1.3.0
-#% answer:1.1.1
-#% guisection: Request properties
-#%end
-
-#%option
-#% key: format
-#% type: string
-#% description: Image format requested from the server
-#% options: geotiff,tiff,jpeg,gif,png
-#% answer: geotiff
-#% guisection: Request properties
-#%end
-
-#%option
-#% key: method
-#% type: string
-#% description: Reprojection method to use
-#% options:near,bilinear,cubic,cubicspline
-#% answer:near
-#% guisection: Request properties
-#%end
-
-#%option
-#% key: maxcols
-#% type:integer
-#% description: Maximum columns to request at a time
-#% answer:400
-#% guisection: Request properties
-#%end
-
-#%option
-#% key: maxrows
-#% type: integer
-#% description: Maximum rows to request at a time
-#% answer: 300
-#% guisection: Request properties
-#%end
-
-#%option
-#% key: urlparams
-#% type:string
-#% description: Addition query parameters for server (only with 'd' flag)
-#% guisection: Request properties
-#%end
-
-#%option
-#% key: styles
-#% type: string
-#% description: Styles to request from map server
-#% multiple: yes
-#% guisection: Map style
-#%end
-
-#%option
-#% key: bgcolor
-#% type: string
-#% description: Color of map background (only with 'd' flag)
-#% guisection: Map style
-#%end
-
-#%flag
-#% key: o
-#% description: Don't request transparent data
-#% guisection: Map style
-#%end
-
-#%flag
-#% key: c
-#% description: Get capabilities
-#% guisection: Request properties
-#% suppress_required: yes
-#%end
-
-#%flag
-#% key: d
-#% description: Do not use GDAL WMS driver
-#%end
-
-import os
-import sys
-sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'r.in.wms'))
-
-import grass.script as grass
-
-def main():
-    if flags['d']:
-        grass.debug("Using own driver")
-        from wms_drv import WMSDrv
-        wms = WMSDrv()
-    else:
-        grass.debug("Using GDAL WMS driver")
-        from wms_gdal_drv import WMSGdalDrv
-        wms = WMSGdalDrv()
-    
-    if flags['c']:
-        wms.GetCapabilities(options)
-    else:
-        wms.GetMap(options, flags)  
-    
-    return 0
-
-if __name__ == "__main__":
-    options, flags = grass.parser()
-    sys.exit(main())

Copied: grass-addons/grass7/raster/r.in.wms2/r.in.wms2.html (from rev 53346, grass-addons/grass7/raster/r.in.wms/r.in.wms.html)
===================================================================
--- grass-addons/grass7/raster/r.in.wms2/r.in.wms2.html	                        (rev 0)
+++ grass-addons/grass7/raster/r.in.wms2/r.in.wms2.html	2012-10-09 21:50:21 UTC (rev 53347)
@@ -0,0 +1,76 @@
+<h2>DESCRIPTION</h2>
+
+<em>r.in.wms</em> handles all of downloading and importing raster
+data from an <a href="http://www.opengeospatial.org/standards/wms">OGC
+WMS</a> web mapping server. It need only 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.
+
+<h2>NOTES</h2>
+
+<!--
+By default data is downloaded to <tt>$GISDBASE/wms_download</tt>. This can be changed
+by setting the <b>folder</b> option when using <em>r.in.wms</em>.
+-->
+
+<p>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. This is an
+<a href="http://wms.jpl.nasa.gov/wms.cgi?request=GetCapabilities">example
+capabilities request to NASA's OnEarth server</a>.
+
+<h2>EXAMPLES</h2>
+
+<h3>General Get Capabilities Request</h3>
+
+<div class="code"><pre>
+r.in.wms -c mapserver=http://wms.cuzk.cz/wms.asp
+</pre></div>
+
+<h3>CUZK download</h3>
+
+
+World extend data:
+
+<div class="code"><pre>
+r.in.wms mapserver=http://iceds.ge.ucl.ac.uk/cgi-bin/icedswms layers=bluemarble,landsat_1_01 styles=default,default output=landsat srs=4326 format=png 
+</pre></div>
+* Server supports only WMS 1.1.1 <br>
+
+<div class="code"><pre>
+r.in.wms mapserver=http://132.156.97.59/cgi-bin/worldmin_en-ca_ows layers=GSC:WORLD_PrecambrianDomains output=pokus srs=4326 format=jpeg 
+</pre></div>
+* Server supports only WMS 1.1.1 
+<br>
+<br>
+
+Data in extend of Czech Republic:
+
+<div class="code"><pre>
+r.in.wms output=kn mapserver=http://wms.cuzk.cz/wms.asp layers=prehledka_kraju-linie srs=4326 format=png
+</pre></div>
+
+
+<h2>TODO</h2>
+
+<ul>
+  <li>Implement Tiled WMS</li>
+</ul>
+
+<h2>SEE ALSO</h2>
+
+<em>
+  <a href="r.in.gdal.html">r.in.gdal</a>,
+  <a href="r.patch.html">r.patch</a>,
+  <a href="r.colors.html">r.colors</a>,
+  <a href="r.composite.html">r.composite</a>,
+  <a href="v.in.wfs.html">v.in.wfs</a>
+</em>
+
+<h2>AUTHORS</h2>
+
+Stepan Turek, Czech Technical University in Prague, Czech Republic (bachelor's final project 2012, mentor: Martin Landa) 
+
+<p>
+<i>Last changed: $Date$</i>

Copied: grass-addons/grass7/raster/r.in.wms2/r.in.wms2.py (from rev 53346, grass-addons/grass7/raster/r.in.wms/r.in.wms.py)
===================================================================
--- grass-addons/grass7/raster/r.in.wms2/r.in.wms2.py	                        (rev 0)
+++ grass-addons/grass7/raster/r.in.wms2/r.in.wms2.py	2012-10-09 21:50:21 UTC (rev 53347)
@@ -0,0 +1,163 @@
+#!/usr/bin/env python
+"""
+MODULE:    r.in.wms
+
+AUTHOR(S): Stepan Turek <stepan.turek AT seznam.cz>
+
+PURPOSE:   Downloads and imports data from WMS server.
+
+COPYRIGHT: (C) 2012 Stepan Turek, and by the GRASS Development Team
+
+This program is free software under the GNU General Public License
+(>=v2). Read the file COPYING that comes with GRASS for details.
+"""
+
+#%module
+#% description: Downloads and imports data from WMS servers.
+#% keywords: raster
+#% keywords: import
+#% keywords: wms
+#%end
+
+#%option
+#% key: mapserver
+#% type: string
+#% description:URL of WMS server 
+#% required: yes
+#%end
+
+#%option
+#% key: layers
+#% type: string
+#% description: Layers to request from map server
+#% multiple: yes
+#% required: yes
+#%end
+
+#%option G_OPT_R_OUTPUT
+#% description: Name for output raster map
+#%end
+
+#%option
+#% key: srs
+#% type: integer
+#% description: EPSG number of source projection for request 
+#% guisection: Request properties
+#%end
+
+#%option
+#% key: region
+#% type: string
+#% description: Named region to request data for. Current region used if omitted
+#% guisection: Request properties
+#%end
+
+#%option
+#% key: wms_version
+#% type:string
+#% description:WMS standard
+#% options:1.1.1,1.3.0
+#% answer:1.1.1
+#% guisection: Request properties
+#%end
+
+#%option
+#% key: format
+#% type: string
+#% description: Image format requested from the server
+#% options: geotiff,tiff,jpeg,gif,png
+#% answer: geotiff
+#% guisection: Request properties
+#%end
+
+#%option
+#% key: method
+#% type: string
+#% description: Reprojection method to use
+#% options:near,bilinear,cubic,cubicspline
+#% answer:near
+#% guisection: Request properties
+#%end
+
+#%option
+#% key: maxcols
+#% type:integer
+#% description: Maximum columns to request at a time
+#% answer:400
+#% guisection: Request properties
+#%end
+
+#%option
+#% key: maxrows
+#% type: integer
+#% description: Maximum rows to request at a time
+#% answer: 300
+#% guisection: Request properties
+#%end
+
+#%option
+#% key: urlparams
+#% type:string
+#% description: Addition query parameters for server (only with 'd' flag)
+#% guisection: Request properties
+#%end
+
+#%option
+#% key: styles
+#% type: string
+#% description: Styles to request from map server
+#% multiple: yes
+#% guisection: Map style
+#%end
+
+#%option
+#% key: bgcolor
+#% type: string
+#% description: Color of map background (only with 'd' flag)
+#% guisection: Map style
+#%end
+
+#%flag
+#% key: o
+#% description: Don't request transparent data
+#% guisection: Map style
+#%end
+
+#%flag
+#% key: c
+#% description: Get capabilities
+#% guisection: Request properties
+#% suppress_required: yes
+#%end
+
+#%flag
+#% key: d
+#% description: Do not use GDAL WMS driver
+#%end
+
+import os
+import sys
+sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'r.in.wms'))
+
+import grass.script as grass
+
+def main():
+    if flags['d']:
+        grass.debug("Using own driver")
+        from wms_drv import WMSDrv
+        wms = WMSDrv()
+    else:
+        grass.debug("Using GDAL WMS driver")
+        from wms_gdal_drv import WMSGdalDrv
+        wms = WMSGdalDrv()
+    
+    if flags['c']:
+        wms.GetCapabilities(options)
+    else:
+        wms.GetMap(options, flags)  
+    
+    return 0
+
+if __name__ == "__main__":
+    options, flags = grass.parser()
+    sys.exit(main())



More information about the grass-commit mailing list