gemgis.web.load_as_files#

gemgis.web.load_as_files(wcs_url: str, version: str, identifier: str, form: str, extent: List[Union[int, float]], size: int, path: str = '', create_directory: bool = False)#

Executing WCS requests and downloading files into specified folder

Parameters
  • wcs_url (str) – Url of the WCS server, e.g. url='https://www.wcs.nrw.de/geobasis/wcs_nw_dgm'

  • version (str) – Version number of the WCS as string, e.g. version='2.0.1'

  • identifier (str) – Name of the layer, e.g. identifier='nw_dgm'

  • form (str) – Format of the layer, e.g. form='image/tiff'

  • extent (List[Union[float,int]]) – Extent of the tile to be downloaded, size may be restricted by server, e.g. extent=[0, 972, 0, 1069]

  • size (int) – Size of the quadratic tile that is downloaded, e.g. size=2000

  • path (str) – Path where the file is going to be downloaded, e.g. name='tile1'

  • create_directory (bool) – Variable to create a new directory of directory does not exist Options include: True or False, default set to False

New in version 1.0.x.

Example

>>> # Loading Libraries and WCS Service
>>> import gemgis as gg
>>> wcs = gg.web.load_wms(url='https://www.wcs.nrw.de/geobasis/wcs_nw_dgm')
>>> wcs
<owslib.coverage.wcs201.WebCoverageService_2_0_1 at 0x27fc64783d0>
>>> # Downloading files from WCS Service
>>> gg.web.load_as_files(wcs_url=wcs.url, version=wcs.version, form='image/tiff', extent=[0, 10000, 0, 10000], size=2000, path='tile.tif')

See also

load_wcs

Load WCS Service

create_request

Create request for WCS

load_as_file

Download WCS data file