class_docstr: Projects an geoviews Image to the specified projection,
  returning a regular HoloViews Image type. Works by
  regridding the data along projected bounds. Only supports
  rectangular projections.
class_docstr_tok: ["Projects","an","geoviews","Image","to","the","specified","projection",",","returning","a","regular","HoloViews","Image","type",".","Works","by","regridding","the","data","along","projected","bounds",".","Only","supports","rectangular","projections","."]
code: def _process(self, img, key=None):
      from cartopy.img_transform import warp_array
  
      if self.p.fast:
          return self._fast_process(img, key)
  
      proj = self.p.projection
      x0, x1 = img.range(0, dimension_range=False)
      y0, y1 = img.range(1, dimension_range=False)
      yn, xn = img.interface.shape(img, gridded=True)[:2]
      (px0, py0, px1, py1) = project_extents(
          (x0, y0, x1, y1), img.crs, proj
      )
  
      # Some bug in cartopy is causing zero values
      eps = sys.float_info.epsilon
      src_extent = tuple(
          e + v if e == 0 else e
          for e, v in zip((x0, x1, y0, y1), (eps, -eps, eps, -eps))
      )
      tgt_extent = (px0, px1, py0, py1)
  
      if img.crs == proj and np.isclose(src_extent, tgt_extent).all():
          return img
  
      arrays = []
      for vd in img.vdims:
          arr = img.dimension_values(vd, flat=False)
          if arr.size:
              projected, _ = warp_array(
                  arr, proj, img.crs, (xn, yn), src_extent, tgt_extent
              )
          else:
              projected = arr
          arrays.append(projected)
  
      if xn == 0 or yn == 0:
          return img.clone([], bounds=tgt_extent, crs=proj)
  
      xunit = ((tgt_extent[1] - tgt_extent[0]) / float(xn)) / 2.0
      yunit = ((tgt_extent[3] - tgt_extent[2]) / float(yn)) / 2.0
      xs = np.linspace(tgt_extent[0] + xunit, tgt_extent[1] - xunit, xn)
      ys = np.linspace(tgt_extent[2] + yunit, tgt_extent[3] - yunit, yn)
      return img.clone(
          (xs, ys) + tuple(arrays),
          bounds=None,
          kdims=img.kdims,
          vdims=img.vdims,
          crs=proj,
          xdensity=None,
          ydensity=None,
      )
  
imports: import logging
  import sys
  import param
  import numpy
  import pandas
  from cartopy import crs
  from holoviews.core.data import MultiInterface
  from holoviews.core.util import cartesian_product, get_param_values
  from holoviews.operation import Operation
  from shapely.geometry import Polygon, MultiPolygon
  from shapely.geometry.collection import GeometryCollection
  from ..data import GeoPandasInterface
  from ..element import Image, Shape, Polygons, Path, Points, Contours, RGB, Graph, Nodes, EdgePaths, QuadMesh, VectorField, HexTiles, Labels, Rectangles, Segments, WindBarbs
  from ..util import project_extents, path_to_geom_dicts, polygons_to_geom_dicts, geom_dict_to_array_dict
label_desc: Use image node_id 1 for calling the project_image obj's underlying member method code with example usage: obj._process(img, key) and returns: img, self, img, img