docstr: Determine the image that provides complete coverage of target
  location.
  
  The composed image is merged from one or more image tiles that overlay
  the target location and provide complete image coverage of the target
  location.
  
  Parameters
  ----------
  target_domain
      A :class:`~shapely.geometry.linestring.LineString`
      instance that specifies the target location requiring image
      coverage.
  target_z
      The name of the target :class`~cartopy.io.img_nest.ImageCollection`
      which specifies the target zoom level (resolution) of the required
      images.
  
  Returns
  -------
  img, extent, origin
      A tuple containing three items, consisting of the target
      location :class:`numpy.ndarray` image data, the
      (x-lower, x-upper, y-lower, y-upper) extent of the image, and the
      origin for the target location.
docstr_tok: ["Determine","the","image","that","provides","complete","coverage","of","target","location",".","The","composed","image","is","merged","from","one","or","more","image","tiles","that","overlay","the","target","location","and","provide","complete","image","coverage","of","the","target","location",".","Parameters","--","--","--","--","--","target_domain","A",":","class",":","`","~shapely.geometry.linestring.LineString","`","instance","that","specifies","the","target","location","requiring","image","coverage",".","target_z","The","name","of","the","target",":","class","`","~cartopy.io.img_nest.ImageCollection","`","which","specifies","the","target","zoom","level","(","resolution",")","of","the","required","images",".","Returns","--","--","--","-","img",",","extent",",","origin","A","tuple","containing","three","items",",","consisting","of","the","target","location",":","class",":","`","numpy.ndarray","`","image","data",",","the","(","x-lower",",","x-upper",",","y-lower",",","y-upper",")","extent","of","the","image",",","and","the","origin","for","the","target","location","."]
code: def image_for_domain(self, target_domain, target_z):
      """
      Determine the image that provides complete coverage of target
      location.
  
      The composed image is merged from one or more image tiles that overlay
      the target location and provide complete image coverage of the target
      location.
  
      Parameters
      ----------
      target_domain
          A :class:`~shapely.geometry.linestring.LineString`
          instance that specifies the target location requiring image
          coverage.
      target_z
          The name of the target :class`~cartopy.io.img_nest.ImageCollection`
          which specifies the target zoom level (resolution) of the required
          images.
  
      Returns
      -------
      img, extent, origin
          A tuple containing three items, consisting of the target
          location :class:`numpy.ndarray` image data, the
          (x-lower, x-upper, y-lower, y-upper) extent of the image, and the
          origin for the target location.
  
      """
      # XXX Copied from cartopy.io.img_tiles
      if target_z not in self._collections_by_name:
          # TODO: Handle integer depths also?
          raise ValueError(
              f"{target_z!r} is not one of the possible collections."
          )
  
      tiles = []
      for tile in self.find_images(target_domain, target_z):
          try:
              img, extent, origin = self.get_image(tile)
          except OSError:
              continue
  
          img = np.array(img)
  
          x = np.linspace(
              extent[0], extent[1], img.shape[1], endpoint=False
          )
          y = np.linspace(
              extent[2], extent[3], img.shape[0], endpoint=False
          )
          tiles.append([np.array(img), x, y, origin])
  
      from cartopy.io.img_tiles import _merge_tiles
  
      img, extent, origin = _merge_tiles(tiles)
      return img, extent, origin
  
imports: import collections
  from pathlib import Path
  import numpy
  from PIL import Image
  import shapely.geometry
label_desc: Use image node_id 3 for calling the NestedImageCollection obj's underlying member method code with example usage: obj.image_for_domain(target_domain, target_z) and returns: img,  extent,  origin