|
@@ -4,7 +4,7 @@ MODULE: r.in.wms
|
|
|
|
|
|
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,158 +13,161 @@ This program is free software under the GNU General Public License
|
|
|
"""
|
|
|
|
|
|
#%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
|
|
|
-#%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
|
|
|
+#% guisection: Request
|
|
|
#%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
|
|
|
-#%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
|
|
|
+#% description: Request data for this named region instead of the current region bounds
|
|
|
+#% guisection: Request
|
|
|
#%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
|
|
|
+#% key: bgcolor
|
|
|
+#% type: string
|
|
|
+#% description: Background color
|
|
|
+#% guisection: Map style
|
|
|
#%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
|