[GRASS-SVN] r56991 - grass/trunk/scripts/r.in.wms

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 3 01:37:57 PDT 2013


Author: turek
Date: 2013-07-03 01:37:56 -0700 (Wed, 03 Jul 2013)
New Revision: 56991

Modified:
   grass/trunk/scripts/r.in.wms/r.in.wms.py
Log:
r.in.wms:porting back most of Hamish Bowman's changes of the module options from G6 r.in.wms2 (r56970)

Modified: grass/trunk/scripts/r.in.wms/r.in.wms.py
===================================================================
--- grass/trunk/scripts/r.in.wms/r.in.wms.py	2013-07-03 08:04:33 UTC (rev 56990)
+++ grass/trunk/scripts/r.in.wms/r.in.wms.py	2013-07-03 08:37:56 UTC (rev 56991)
@@ -4,7 +4,7 @@
 
 AUTHOR(S): Stepan Turek <stepan.turek AT seznam.cz>
 
-PURPOSE:   Downloads and imports data from WMS server.
+PURPOSE:   Downloads and imports data from WMS/WMTS/NASA OnEarth server.
 
 COPYRIGHT: (C) 2012 Stepan Turek, and by the GRASS Development Team
 
@@ -13,160 +13,163 @@
 """
 
 #%module
-#% description: Downloads and imports data from WMS server.
+#% description: Downloads and imports data from WMS/WMTS/NASA OnEarth server.
 #% keywords: raster
 #% keywords: import
 #% keywords: WMS
+#% keywords: WMTS 
+#% keywords: OnEarth
 #%end
 
 #%option
 #% key: url
 #% type: string
-#% description: URL of WMS server 
+#% description: Typically starts with "http://"
 #% required: yes
 #%end
 
+#%option G_OPT_R_OUTPUT
+#% description: Name for output raster map
+#%end
+
 #%option
 #% key: layers
 #% type: string
-#% description: Layers to request from WMS server
+#% description: Layer(s) to request from the map server
 #% multiple: yes
 #% required: yes
 #%end
 
-#%option G_OPT_R_OUTPUT
-#% description: Name for output raster map
+#%option
+#% key: styles
+#% type: string
+#% description: Layer style(s) to request from the map server
+#% multiple: yes
+#% guisection: Map style
 #%end
 
 #%option
+#% key: format
+#% type: string
+#% description: Image format requested from the server
+#% options: geotiff,tiff,jpeg,gif,png
+#% answer: geotiff
+#% guisection: Request
+#%end
+
+#%option
 #% key: srs
 #% type: integer
-#% description: EPSG number of source projection for request 
+#% description: EPSG code of requested source projection 
 #% answer:4326 
-#% guisection: Request properties
+#% guisection: Request
 #%end
 
 #%option
-#% key: region
-#% type: string
-#% description: Named region to request data for. Current region used if omitted
-#% guisection: Request properties
+#% key: driver
+#% type:string
+#% description: Driver used to communication with server
+#% descriptions: WMS_GDAL;Download data using GDAL WMS driver;WMS_GRASS;Download data using native GRASS-WMS driver;WMTS_GRASS;Download data using native GRASS-WMTS driver;OnEarth_GRASS;Download data using native GRASS-OnEarth driver;
+#% options:WMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS
+#% answer:WMS_GRASS
+#% guisection: Connection
 #%end
 
 #%option
 #% key: wms_version
 #% type:string
-#% description: WMS standard
+#% description: WMS standard version
 #% options: 1.1.1,1.3.0
 #% answer: 1.1.1
-#% guisection: Request properties
+#% guisection: Request
 #%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:nearest,linear,cubic,cubicspline
-#% answer:nearest
-#% guisection: Request properties
-#%end
-
-#%option
 #% key: maxcols
 #% type:integer
 #% description: Maximum columns to request at a time
-#% answer:400
-#% guisection: Request properties
+#% answer:512
+#% guisection: Request
 #%end
 
 #%option
 #% key: maxrows
 #% type: integer
 #% description: Maximum rows to request at a time
-#% answer: 300
-#% guisection: Request properties
+#% answer: 512
+#% guisection: Request
 #%end
 
 #%option
 #% key: urlparams
 #% type:string
-#% description: Additional query parameters for server
-#% guisection: Request properties
+#% description: Additional query parameters to pass to the server
+#% guisection: Request
 #%end
 
 #%option
 #% key: username
 #% type:string
 #% description: Username for server connection
-#% guisection: Request properties
+#% guisection: Connection
 #%end
 
 #%option
 #% key: password
 #% type:string
 #% description: Password for server connection
-#% guisection: Request properties
+#% guisection: Connection
 #%end
 
 #%option
-#% key: styles
+#% key: method
 #% type: string
-#% description: Styles to request from map server
-#% multiple: yes
-#% guisection: Map style
+#% description: Interpolation method to use in reprojection
+#% options:nearest,linear,cubic,cubicspline
+#% answer:nearest
+#% guisection: Request
 #%end
 
 #%option
-#% key: bgcolor
+#% key: region
 #% type: string
-#% description: Color of map background
-#% guisection: Map style
+#% description: Request data for this named region instead of the current region bounds
+#% guisection: Request
 #%end
 
-#%flag
-#% key: o
-#% description: Don't request transparent data
+#%option
+#% key: bgcolor
+#% type: string
+#% description: Background color
 #% guisection: Map style
 #%end
 
-#%flag
-#% key: c
-#% description: Get capabilities
-#% guisection: Request properties
-#% suppress_required: yes
-#%end
-
-#%option
-#% key: driver
-#% type:string
-#% description: Driver for communication with server
-#% descriptions: WMS_GDAL;Download data using GDAL WMS driver;WMS_GRASS;Download data using native GRASS-WMS driver;WMTS_GRASS;Download data using native GRASS-WMTS driver;OnEarth_GRASS;Download data using native GRASS-OnEarth driver;
-#% options:WMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS
-#% answer:WMS_GRASS
-#%end
-
 #%option G_OPT_F_INPUT
 #% key: capfile
 #% required: no
 #% gisprompt: old,bin,file
-#% description: Capabilities file to load
+#% description: Capabilities file to parse (input). It is relevant for WMTS_GRASS and OnEarth_GRASS drivers
 #%end
 
 #%option G_OPT_F_OUTPUT
 #% key: capfile_output
 #% required: no
-#% description: File where capabilities will be saved (only with 'c' flag).
+#% description: File in which the server capabilities will be saved ('c' flag)
 #%end
 
+#%flag
+#% key: c
+#% description: Get the server capabilities then exit
+#% guisection: Request
+#% suppress_required: yes
+#%end
+
+#%flag
+#% key: o
+#% description: Don't request transparent data
+#% guisection: Map style
+#%end
+
 import os
 import sys
 sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'r.in.wms'))



More information about the grass-commit mailing list