IMPORT_WMS

The IMPORT_WMS command imports a chunk of WMS or WMTS (tiled WMS) data, such as satellite imagery or topographic maps. The following parameters are supported by the command:

  • SOURCE_DESC - text description of source. Should match name from the online source dialog. Used to match to a source in the source list if no match based on URL could be found.
  • WMS_SERVER_URL - URL to WMS server GetCapabilites
  • WMS_SERVICE - service name to use, typically WMS
  • WMS_LAYER - name of WMS layer to load
  • WMS_IS_TILED - specifies that the server is a WMTS (tiled WMS) service. Use WMS_IS_TILED=YES to enable.
  • WMTS_DIM_VAL - specifies the value to use for a dimension parameter on the WMTS source, like a 'Time' parameter. The format of the parameter is WMTS_DIM_VAL="param=value", like WMTS_DIM_VAL="Time=2020-11-15" so specify the value of the 'Time' dimension. If the source has multiple dimension parameters, you can use multiple WMTS_DIM_VAL parameters with a single IMPORT_WMS command.
  • ADDRESS - address to download data near. Use along with RADIUS to specify the bounds with an address and radius rather than a specific bounding box.
  • RADIUS - radius in kilometers around ADDRESS to search.
  • LAT_LON_BOUNDS - specifies the bounds to import in latitude/longitude degrees. There should be 4 values in a comma-delimited list following the parameter name. The values should be in order of west-most longitude, southern-most latitude, eastern-most longitude, northern-most latitude.
  • LAYER_BOUNDS - specifies that the import should use the bounds of the loaded layer(s) with the given filename. For example, to import to the bounds of the file "c:\test.tif", you would use LAYER_BOUNDS="c:\test.tif". Keep in mind that the file must be currently loaded.
  • LAYER_BOUNDS_EXPAND - specifies that the operation should expand the used LAYER_BOUNDS bounding box by some amount. The amount to expand the bounding rectangle by should be specified in the current global projection. For example, if you have a UTM/meters projection active and want to expand the bounds retrieved from the LAYER_BOUNDS parameter by 100 meters on the left and right, and 50 meters on the top and bottom, you could use LAYER_BOUNDS_EXPAND="100.0,50.0". You can also specify a single value to apply to all 4 sides, or supply 4 separate values in the order left,top,right,bottom.
  • DETAIL_MULT - specifies the detail scale to use when deciding while zoom level to get for the source. The calculated draw/export resolution is divided by this value to get the resolution to access the data at. For example, a value of DETAIL_MULT=0.5 means the source will be displayed from twice the detail it normally would, while DETAIL_MULT=2 would pull at half the resolution (i.e. much faster access).
  • NOTE: All style parameters that are supported by the IMPORT command are also supported by this command.

SAMPLE

Here is an example of an IMPORT_WMS command that pulls in NAIP imagery within 5 km of Blue Marble's headquarters:

 IMPORT_WMS WMS_SERVER_URL="http://isse.cr.usgs.gov/arcgis/services/Combined/USGS_EDC_Ortho_NAIP/MapServer/WMSServer"\ \
 WMS_SERVICE="WMS" WMS_LAYER="0" ADDRESS="397 WATER ST, GARDINER, ME" RADIUS="5" \
 LAYER_DESC="NAIP Color Imagery for US (1m Resolution)"