class_docstr: A source of SRTM data, which implements Cartopy's :ref:`RasterSource
  interface <raster-source-interface>`.
class_docstr_tok: ["A","source","of","SRTM","data",",","which","implements","Cartopy","'s",":","ref",":","`","RasterSource","interface","<","raster-source-interface",">","`","."]
docstr: Parameters
  ----------
  resolution
      The resolution of SRTM to download, in integer arc-seconds.
      Data is available at resolutions of 3 and 1 arc-seconds.
  downloader: :class:`cartopy.io.Downloader` instance or None
      The downloader to use for the SRTM dataset. If None, the
      downloader will be taken using
      :class:`cartopy.io.Downloader.from_config` with ('SRTM',
      'SRTM{resolution}') as the target.
  max_nx
      The maximum number of x tiles to be combined when producing a
      wider composite for this RasterSource.
  max_ny
      The maximum number of y tiles to be combined when producing a
      taller composite for this RasterSource.
docstr_tok: ["Parameters","--","--","--","--","--","resolution","The","resolution","of","SRTM","to","download",",","in","integer","arc-seconds",".","Data","is","available","at","resolutions","of","3","and","1","arc-seconds",".","downloader",":",":","class",":","`","cartopy.io.Downloader","`","instance","or","None","The","downloader","to","use","for","the","SRTM","dataset",".","If","None",",","the","downloader","will","be","taken","using",":","class",":","`","cartopy.io.Downloader.from_config","`","with","(","'SRTM","'",",","'SRTM","{","resolution","}","'",")","as","the","target",".","max_nx","The","maximum","number","of","x","tiles","to","be","combined","when","producing","a","wider","composite","for","this","RasterSource",".","max_ny","The","maximum","number","of","y","tiles","to","be","combined","when","producing","a","taller","composite","for","this","RasterSource","."]
code: def __init__(self, resolution, downloader, max_nx, max_ny):
      """
      Parameters
      ----------
      resolution
          The resolution of SRTM to download, in integer arc-seconds.
          Data is available at resolutions of 3 and 1 arc-seconds.
      downloader: :class:`cartopy.io.Downloader` instance or None
          The downloader to use for the SRTM dataset. If None, the
          downloader will be taken using
          :class:`cartopy.io.Downloader.from_config` with ('SRTM',
          'SRTM{resolution}') as the target.
      max_nx
          The maximum number of x tiles to be combined when producing a
          wider composite for this RasterSource.
      max_ny
          The maximum number of y tiles to be combined when producing a
          taller composite for this RasterSource.
  
      """
      if resolution == 3:
          self._shape = (1201, 1201)
      elif resolution == 1:
          self._shape = (3601, 3601)
      else:
          raise ValueError(
              f"Resolution is an unexpected value ({resolution})."
          )
      self._resolution = resolution
  
      #: The CRS of the underlying SRTM data.
      self.crs = ccrs.PlateCarree()
  
      #: The Cartopy Downloader which can handle SRTM data. Normally, this
      #: will be a :class:`SRTMDownloader` instance.
      self.downloader = downloader
  
      if self.downloader is None:
          self.downloader = Downloader.from_config(
              ("SRTM", f"SRTM{resolution}")
          )
  
      #: A tuple of (max_x_tiles, max_y_tiles).
      self._max_tiles = (max_nx, max_ny)
  
imports: import io
  from pathlib import Path
  import warnings
  import numpy
  from cartopy import config
  import cartopy.crs
  from cartopy.io import Downloader, LocatedImage, RasterSource, fh_getter
label_desc: Use image node_id 1 to create a new _SRTMSource object from inherited base classes: RasterSource with example: obj = _SRTMSource(resolution, downloader, max_nx, max_ny)